Configure SSO
Objectives
Why it's useful
Comptalys hosts a Grafana dashboard that tracks the activity of the firm. Until now, each partner had an account and an additional password. Karim connects it to VaultysHub using OpenID Connect: partners click on the Grafana tile and are logged in, without entering anything. When a partner leaves the firm, simply deactivating them in VaultysHub is enough.
With SSO, the application delegates authentication to VaultysHub. Your users log in once, with VaultysID, and access all their applications. SSO is part of the basic offering, in OpenID Connect as well as in SAML 2.0.
The two protocols at a glance
| OpenID Connect (OIDC) | SAML 2.0 | |
|---|---|---|
| For | Modern and cloud applications | Established enterprise applications |
| What VaultysHub provides | Endpoints (Discovery, Authorization, Token, JWKS, Userinfo) and a Client Secret | Entity ID, SSO URL, Metadata URL (in the Identity Provider tab) |
| What you enter in VaultysHub | The application's Redirect URIs and Allowed Scopes | Entity ID, ACS URL and application certificate (in the Service Provider tab) |
The details of each field can be found in SSO Configuration.
Your turn: Grafana with OIDC
This exercise follows the guide Grafana. You need a Grafana instance where you are an administrator. If you don't have one, perform the exercise with another application from the appendix: the steps on the VaultysHub side are the same.
-
Create the application Grafana in Applications, with the URL of your instance. See lesson 5.
-
Choose the protocol. Menu ⋮, Edit, Authentication tab: select OIDC.
-
Take note of the information from the Provider Settings tab: endpoints, client ID, and Client Secret. Leave PKCE enabled, it is recommended.
-
Declare the return URL in Redirect URIs:
https://grafana.example.com/login/generic_oauth, replacing the domain with that of your instance. Keep the scopesopenid,profile, andemail. -
Configure Grafana. In the
auth.generic_oauthsection ofgrafana.ini, fill in the client ID, secret, and the three URLsauth_url,token_url, andapi_url:[auth.generic_oauth]enabled = truename = VaultysHub SSOallow_sign_up = trueclient_id = <client ID>client_secret = <client secret>scopes = openid profile emailauth_url = https://<your-organization>/api/oidc/<appid>/authtoken_url = https://<your-organization>/api/oidc/<appid>/tokenapi_url = https://<your-organization>/api/oidc/<appid>/userinfouse_pkce = trueThe Client Settings tab of VaultysHub also provides a ready-to-use code example.
-
Share the application with your test folder, as in lesson 5. Without sharing, the user will be denied access.
-
Test. Restart Grafana, click on Sign in with VaultysHub SSO and authenticate with VaultysID.
-
Go further with groups. In the Authentication tab, Groups section, click on Add a mapping, associate a folder with a group from the application, check Send groups and Save mappings. On the application side, add
groupsto the requested scopes. See Groups.
- Invalid redirect URI: the return URL must be strictly identical on both sides.
Pay attention to the trailing slash and
httpvshttps. - Invalid client credentials: check the client ID and secret.
- User not authorized: the user does not have access to the application. Check the sharing.
The process is symmetrical. You copy the information from the Identity Provider tab of VaultysHub into the application: Entity ID, SSO URL, or directly the Metadata URL. You enter in the Service Provider tab the information from the application: Entity ID, ACS URL, certificate. Single Logout from VaultysHub is not supported.
Check your understanding
Key takeaways
- VaultysHub is the identity provider: the application delegates the connection to it, in OIDC or SAML.
- A successful configuration relies on an exchange of information on both sides, and on an exact return URL.
- SSO respects sharing: access is granted through folders, as with any application.
Appendix: integration guides
Step-by-step guides exist for many applications. See the SSO Integrations page for an overview and generic endpoints.
| Domain | Guides |
|---|---|
| Collaboration and cloud | Nextcloud, GitLab, Trello, Notion, Monday.com |
| Infrastructure and network | Tailscale, Headscale, Apache Guacamole, Proxmox VE, Portainer |
| Monitoring | Grafana |
| Communication | Mattermost, Rocket.Chat, BlueMind |
| ERP and CRM | Odoo, Dolibarr, EspoCRM, HubSpot |
| Support and management | GLPI, Zammad |
| Security | Vaultwarden |
| HR | Lucca |
Next lesson: Manage your users' devices