Tutorial
Sign in to a test app with DevRig
Connect DevRig's SSO debugger to your organization with OpenID Connect and sign in to it with your Sovrain account.
In this tutorial we add an application to our organization and sign in to it with our Sovrain account. The application is the SSO debugger of DevRig, a separate product from the team behind Sovrain: it plays the part of a real application and shows exactly what Sovrain sends to it.
It takes about 10 minutes.
Before you start
You need:
- an organization in which you are an admin, for example the one from
Create your organization. We use
https://acme.sovrain.netand the adminjane; - a DevRig account at devrig.app with one zone. In this tutorial the zone is called
acme, so DevRig serves our test application athttps://first-app.acme.rigdev-test.com. Use your own zone name wherever you seeacme.rigdev-test.com.
Keep Sovrain and DevRig open in two browser tabs. We switch between them.
Add the application in Sovrain
- Under Administration, select Open admin.
- In the menu on the left, select Applications, then Add application.
- Fill in the form:
- Application name:
First app - Slug:
first-app - Application type: OpenID Connect (SSO)
- Application name:
- Select Create application.
You are on the page of the new application. Under its name you see OpenID Connect and a long code: that is the application’s client ID. The tabs below are where everything about the application is set up.
Let your people in
Sovrain signs a person in to an application only if one of their groups has access to it.
- Still on the page of First app, open the Access & diagnostics tab.
- Under Group access, select Add group, choose All and select Add.
All appears in the table under Group, with the number of its members under Members. All is a group every member of your organization belongs to, so everyone in Acme can now use First app.
Add the same application in DevRig
- In the DevRig tab, open your zone and go to Applications.
- Under Add application, fill in the form:
- Application name:
First app - Slug:
first-app, the same slug as in Sovrain. - Application type: OpenID Connect (SSO)
- Application name:
- Select Create application.
DevRig opens the application on its Relying Party (RP) tab. Under the name it shows OpenID Connect and
first-app.acme.rigdev-test.com, the address where it serves the application.
Tell Sovrain where to send people back
After signing someone in, Sovrain sends them back to the application, but only to an address the application has registered in advance.
- In DevRig, on the application’s page, find Paste into the IdP. Copy the address under Redirect URIs. It
looks like
https://first-app.acme.rigdev-test.com/callback. - In Sovrain, open the Relying Party (RP) tab of First app.
- Under Redirect URIs, select Add redirect URI, paste the address and select Add.
The message None yet — sign-in will be refused until one is added. is gone, and the address is listed.
Give DevRig the client settings
DevRig needs three values from Sovrain to sign people in: where Sovrain is, who the application is, and a secret that proves it.
In Sovrain, still on the Relying Party (RP) tab, find Client registration. Next to Client secret, select Generate. Copy the secret now: Sovrain shows it only once.
In DevRig, on the Relying Party (RP) tab, under Client registration, paste the secret into Client secret and select Set secret.
DevRig shows Saved: Client secret, and the badge next to the field says set.
Still under Client registration:
- copy Client ID from Sovrain’s Client registration and paste it into Client ID;
- copy Discovery URL from Sovrain’s Our endpoints (
https://acme.sovrain.net/.well-known/openid-configuration) and paste it into Discovery URL; - leave Client type at CONFIDENTIAL,
and select Save. DevRig shows Saved: Client registration.
Under Scopes & options, tick profile and email, the same scopes Sovrain’s application allows, and select Save in that card. DevRig shows Saved: Options.
Under Our endpoints, select Refresh.
DevRig reads Sovrain’s discovery document and lists Sovrain’s addresses. Notice that Issuer is
https://acme.sovrain.net: DevRig has found your organization.
Sign in to the application
- In DevRig, open the application’s Access & diagnostics tab and select Test sign-in.
- DevRig sends you to
acme.sovrain.net. If Sovrain asks, sign in asjane. Sovrain then sends you back to DevRig.
DevRig shows the result of the sign-in. Every check is passed, and the steps list what Sovrain and DevRig said to each other. Open the step with the ID token and notice:
issishttps://acme.sovrain.net, your organization;preferred_usernameisjane;amris["pwd"]: you signed in with a password only.
That is a working single sign-on: an application trusted Sovrain to tell it who you are.
What we did
We registered an application in Sovrain, gave the group All access, connected it with the client ID, the secret and the redirect URI, and signed in to the application with our Sovrain account.
Next steps
- Protect your account with a second step, so that
amrsays more thanpwd. - Connect an OpenID Connect app that your company really uses.