SG SealGrid Athena Docs

Authentication & SSO

Athena signs users in with local accounts, an LDAP / Active Directory directory, or Keycloak single sign-on over OIDC. Every provider mints the same Athena session token, so roles and authorization policies work identically no matter how a user signed in.

The Athena sign-in screen
The Athena sign-in screen — local and LDAP accounts sign in here; a Keycloak/OIDC button appears when SSO is configured.

Supported providers#

ProviderProtocolSign-inNotes
LocalUsername / passwordConsole & api/auth/loginAlways available. The first admin is seeded from the DefaultAdmin config section.
LDAP / Active DirectoryLDAP bindConsole & api/auth/loginUsername/password verified against your directory, with directory groups mapped to roles. See LDAP / Active Directory Integration for setup (Admin only).
KeycloakOIDC (OpenID Connect)Browser SSO (auth-code + PKCE) & CLI device-codeConfidential client with authorization-code + PKCE for the browser, and an OIDC device-code flow for the PowerShell module. Configured under api/settings/oidc (Admin only).
Keycloak and ADFS

Keycloak is the officially supported OIDC provider — Athena's SSO connector is built and tested against Keycloak's OIDC endpoints (including how Keycloak emits realm/client roles into the access token). Athena does not implement SAML or WS‑Federation, so there is no dedicated ADFS integration. If your ADFS is fronted by, or federated into, Keycloak (Keycloak brokering ADFS as an upstream identity provider), Athena talks to Keycloak as usual. A direct ADFS-as-OIDC configuration is not a tested/supported path today — if you need native ADFS/SAML, please reach out so we can track the request.

Keycloak SSO — step by step#

Athena is an OIDC relying party. Configuration has two halves: create a client in your Keycloak realm, then point Athena at that realm.

Prefer to watch first? This short walkthrough covers the whole flow — stand up Keycloak in Docker, register the athena-web client, enable and fill in OIDC under Settings → Security, test the connection, save, and sign in with Keycloak — landing on the dashboard. The written steps below follow the same order.

Set up Keycloak SSO in Athena

1. Create the client in Keycloak#

2. Configure Athena#

Configure OIDC as an Admin from the Security settings in the console, or over the REST API / PowerShell. The key fields:

FieldMeaningExample
EnabledTurn Keycloak login on (off = local-only)true
IssuerRealm authority; Athena appends /.well-known/openid-configuration for discoveryhttps://kc.contoso.com/realms/athena
ClientIdThe confidential client id you createdathena-web
ClientSecretClient secret (write-only; stored encrypted, never returned)••••••••
ScopesSpace-delimited scopes requestedopenid profile email roles
CallbackPathServer-side redirect path (combined with the host)/api/auth/oidc/callback
DefaultRoleRole applied when no realm role maps to an Athena roleUser
DenyOnNoMatchDeny sign-in when no role maps (instead of the default role)false
PropagateLogoutToIdpFederated (RP-initiated) logout at Keycloak on sign-outtrue
PostLogoutRedirectUriWhere Keycloak returns after a federated logouthttps://<athena-host>/

Using the Athena PowerShell module (requires an Admin session):

# Point Athena at your Keycloak realm and enable SSO
Set-AthenaOidcSettings -Enabled $true `
  -Issuer "https://kc.contoso.com/realms/athena" `
  -ClientId "athena-web" `
  -ClientSecret "<client-secret>"

# Verify discovery + JWKS are reachable before relying on it
Test-AthenaOidcConnection

# Review the current config (the secret is always masked)
Get-AthenaOidcSettings
Test before you rely on it

The test-connection probe (POST api/settings/oidc/test-connection, or Test-AthenaOidcConnection) checks that the issuer's discovery document and JWKS are reachable. A non-loopback issuer must be served over HTTPS.

3. Sign in#

Once enabled, the console login page offers a Keycloak sign-in button (authorization-code + PKCE): the browser is redirected to Keycloak, and on a successful callback Athena validates the tokens, provisions the user just-in-time, and mints the Athena session. From the CLI, use the device-code flow — see Connect-Athena — Keycloak SSO:

Connect-Athena -Server "athena.contoso.com" -Keycloak

Role mapping & provisioning#

SSO users are provisioned just-in-time on first sign-in and mapped to one of Athena's fixed roles (see Roles & Permissions). Athena reads the realm and client roles from the Keycloak access token and resolves them through the same group→role mapping model used for LDAP / Active Directory:

Federated logout#

Signing out always tears down the local Athena session first. When PropagateLogoutToIdp is on (the default), Athena also performs an RP-initiated logout at Keycloak's end_session_endpoint and returns the browser to the configured PostLogoutRedirectUri (or the app root). If discovery is unreachable, logout falls back to a safe local-only sign-out.