-
-
Notifications
You must be signed in to change notification settings - Fork 7
Single Sign On
BBS supports Single Sign-On via OpenID Connect (OIDC), allowing users to authenticate with an external identity provider instead of a local username and password.
Any OIDC-compliant identity provider works, including:
- Keycloak
- Authentik
- Microsoft Entra ID (Azure AD)
- Google Workspace
- Okta
- Auth0
- Authelia
- Cloudflare Access
In your identity provider, create a new application/client with these settings:
| Setting | Value |
|---|---|
| Application type | Web application |
| Grant type | Authorization Code |
| Redirect/Callback URL | https://your-bbs-server/login/oidc/callback |
| Scopes | openid email profile |
Note the Client ID and Client Secret — you'll need these in the next step.
Go to Settings > Authentication and fill in:
- Enable OIDC Single Sign-On — toggle on
-
Provider URL — your provider's base URL for OIDC discovery
- Keycloak:
https://keycloak.example.com/realms/your-realm - Authentik:
https://authentik.example.com/application/o/your-app/ - Azure AD:
https://login.microsoftonline.com/your-tenant-id/v2.0 - Google:
https://accounts.google.com - Okta:
https://your-domain.okta.com
- Keycloak:
- Client ID — from your identity provider
- Client Secret — from your identity provider (encrypted at rest in BBS)
- Button Label — text shown on the login page (e.g. "Login with Company SSO")
-
Scopes — usually
openid email profile(default)
When someone authenticates via SSO for the first time and doesn't have a BBS account, you control what happens:
| Option | Behavior |
|---|---|
| Deny access | The user must already exist in BBS with a matching email address. Unknown users see an error message. This is the safest option. |
| Create user, pending approval | A new account is created but marked as "Pending." The user sees a message that their account is awaiting approval. An admin approves from the Users page. |
| Copy permissions from a template user | A new account is created and automatically receives the same client access and permissions as the selected template user. Useful when most team members need the same access level. |
When enabled, logging out of BBS also redirects the user to the identity provider's logout endpoint. This signs them out of all applications connected to that provider. Disabled by default — most users prefer to only log out of BBS while staying signed into other apps.
- User clicks the SSO button on the login page
- BBS redirects to the identity provider's authorization endpoint
- User authenticates with the provider (password, MFA, etc.)
- Provider redirects back to BBS with an authorization code
- BBS exchanges the code for tokens, verifies the ID token, and extracts the email
- BBS matches the email to a local user account (or creates one per the policy)
- A session is created and the user is logged in
BBS matches SSO users by email address. The email from the OIDC provider's email claim is compared to the email field in BBS's user table.
- If a match is found, the user logs in with their existing permissions
- If no match is found, the new-user policy applies
| Feature | Local Users | SSO Users |
|---|---|---|
| Login method | Username + password | Identity provider |
| Two-factor auth | Managed in BBS | Managed by identity provider |
| Password tab in profile | Visible | Hidden |
| 2FA tab in profile | Visible | Hidden |
| Permission management | Same | Same |
| Force 2FA setting | Enforced | Skipped (IdP handles auth strength) |
SSO does not change how permissions work. Client access, backup plan management, and all other permissions are assigned the same way regardless of authentication method.
When SSO is enabled, the login page shows an SSO button above the standard username/password form:
- Users with SSO click the button to authenticate via their identity provider
- Users with local accounts continue using username and password
- Both methods can coexist — a user whose email matches can use either
If the new-user policy is set to "pending approval":
- Go to Users in the sidebar
- Pending SSO users show a yellow Pending badge
- Click the green Approve button to activate their account
- Once approved, they can log in via SSO
The Users page shows these badges for SSO users:
- SSO (blue) — user authenticates via OIDC
- Pending (yellow) — awaiting admin approval
On the user edit page, SSO users show an "SSO (OIDC)" badge instead of a password field. All other settings (role, client access, permissions) work identically to local users.
- Create a new Client in your realm
- Set Access Type to "confidential"
- Set Valid Redirect URIs to
https://your-bbs-server/login/oidc/callback - Copy the Client ID and Secret from the Credentials tab
- Provider URL:
https://keycloak.example.com/realms/your-realm
- Create a new OAuth2/OpenID Provider
- Set Redirect URIs to
https://your-bbs-server/login/oidc/callback - Create an Application linked to the provider
- Provider URL:
https://authentik.example.com/application/o/your-app/
- Register a new application in Azure Portal > App Registrations
- Add a Web redirect URI:
https://your-bbs-server/login/oidc/callback - Create a client secret under Certificates & Secrets
- Provider URL:
https://login.microsoftonline.com/your-tenant-id/v2.0 - Scopes may need:
openid email profile User.Read
- Create OAuth 2.0 credentials in Google Cloud Console
- Set authorized redirect URI to
https://your-bbs-server/login/oidc/callback - Provider URL:
https://accounts.google.com
| Problem | Solution |
|---|---|
| SSO button doesn't appear | Verify OIDC is enabled and Provider URL, Client ID are filled in (Settings > Authentication) |
| "SSO error" after clicking button | Check Provider URL is correct and accessible from the BBS server |
| "OIDC provider did not return an email" | Ensure the email scope is included and the user has an email set in the IdP |
| "No account found with this email" | New-user policy is set to "deny" — create the user in BBS first with the matching email |
| Redirect loop after login | Check that the callback URL in your IdP exactly matches https://your-server/login/oidc/callback
|
| Session lost after redirect | Ensure your BBS server uses HTTPS — cookies may not persist on HTTP with some browsers |
- User Management — Creating users and assigning permissions
- Security — General security settings
- Two-Factor Authentication — 2FA for local users
📖 User Manual
Getting Started
Using BBS
- Dashboard
- Managing Clients
- Linux Agent Setup
- macOS Agent Setup
- Windows Agent Setup
- Repositories
- Storage Setup
- Backup Plans
- Restoring Files
- Database Backups
- Plugins
- Remote Storage
- S3 Offsite Sync
Monitoring
Administration
- Settings
- User Management
- Single Sign-On
- Two-Factor Authentication
- Updating BBS
- Server Backup and Restore
Reference