OIDC login
Sign in through your identity provider, then open a session with a normal SSH client or the WebUI. This example uses Authorization Code with PKCE and runs the session in Docker.
Prerequisites
- A Linux Bifröst host service with access to Docker.
- A domain pointing to Bifröst, with TCP port 443 reachable.
- An OIDC provider and the
subclaim of the user you want to allow.
1. Register the IdP client
Use these settings, substituting your own domain:
| Setting | Value |
|---|---|
| Client type | Confidential web client with a client ID and secret |
| Grant | Authorization Code with PKCE S256 |
| Callback URL | https://gateway.example.org/login/callback |
| Token authentication | client_secret_basic or client_secret_post |
| Tokens | ID token and refresh token |
Enable your provider's refresh-token scope/settings. The example uses offline_access.
2. Configure Bifröst
Merge this into your host configuration. Replace the domain, ACME contact, issuer, credentials and allowed subject.
| /etc/engity/bifroest/configuration.yaml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
(Re)start your Bifröst instance to active this configuration.
3. Sign in
Via SSH
1 | |
- Open the login link shown by your SSH client.
- Sign in at your IdP.
- Select your SSH client's two-character code from the browser's three choices to approve your own connection. A wrong choice or decline aborts the login.
The command should print 1000. Never approve a login link sent by someone else.
Via WebUI
- Open
https://gateway.example.org/#Shelland choose OIDC. - Sign in at your IdP in the automatically opened tab. If popups are blocked, use the displayed login link.
- The login tab closes automatically when possible. Return to the original tab to use the terminal; WebUI login has no SSH code selection.
Keep the original tab open; reloading it loses the pending login.
Alternatives
| Need | Change |
|---|---|
| SSH only, with browser approval | Keep global HTTPS enabled; set the flow's http.enabled to false. / then returns 404 if no HTTP-enabled flow remains. |
| SSH without Bifröst HTTPS | Enable Device Authorization at the IdP and use type: oidcDeviceAuth. Follow the IdP's verification instructions instead of the Bifröst approval step. |
| Saved access | Configure rememberMe. Session and refresh checks still apply. |
Troubleshooting
| Problem | Check |
|---|---|
| Callback fails | Registered callback URL, selected HTTP domain, port and TLS certificate |
| No refresh token | IdP client settings and required scopes |
| IdP login succeeds, access denied | Allowed sub and the environment's loginAllowed rule |
Next steps
- Authorization Code reference covers refresh checks and access-loss behavior.
- Docker reference explains workload privileges and isolation.
- Device Authorization reference covers the alternative flow without a Bifröst HTTP connection for SSH.