Skip to content

Authentication

Authentication illustration

The self-hosted SCF Controls Platform authenticates with the master API_KEY you set in .env — no external identity provider is required. Optional sign-in methods (OIDC single sign-on, Google Sign-In) can be enabled on top when your team needs individual user accounts.

MethodDefaultWhen to use
API key (API_KEY + OSS_SINGLE_TENANT=1)✅ OnSingle-tenant self-hosted installs — the quick-start path
OIDC single sign-onOffTeam installs that want individual accounts via the bundled Keycloak or your own IdP (Okta, Entra ID, Auth0, Google Workspace)
Google Sign-InOffInstalls that prefer direct Google OAuth without an OIDC broker

Out of the box (GOOGLE_AUTH_ENABLED=false, OSS_SINGLE_TENANT=1):

  • You set a master API_KEY in .env before first start (openssl rand -hex 32), and set VITE_API_KEY to the same value — that is the copy the web app uses, baked into the frontend at build time. Installs made with scripts/install.sh skip both steps: the installer generates API_KEY into the secrets directory and the frontend build reads it from there.
  • The web app authenticates to the backend with that key; in single-tenant mode the key acts as the admin of your single organisation, so there is no sign-in screen to configure.
  • The same key authorises direct REST API calls — send it as a Bearer token.

Treat the master key like a root credential: store it in a password manager, rotate it if it may have leaked, and don’t embed it in scripts you share.

In single-tenant mode the master key administers your single organisation, and the REST API treats it as a platform administrator:

AreaMaster key over the REST APIShown in the web app
Organisation data — controls, evidence, risks, vendorsYesYes
Organisation settings, members, API keysYesYes
Platform administration — catalog upgrade, tenant reconciliationYesNo — see below
Consultant PortalYes, once a consultant profile existsOnly with a profile

Outside single-tenant mode the same key is an ordinary automation credential — the platform-admin grant is tied to the single-tenant guard, not to the key itself, so adding a second organisation withdraws it automatically. The guard is evaluated at startup, so restart the backend after changing the number of organisations or members.

Self-hosted deployments can authenticate through OIDC single sign-on — either the bundled Keycloak (docker compose --profile idp up -d) or your own provider. It is off by default. See Identity Provider for setup.

When OIDC is enabled, the sign-in button redirects to your identity provider:

  1. Click Sign in
  2. You’re redirected to your identity provider (the bundled Keycloak, or your own IdP)
  3. Enter your credentials there — the exchange uses the authorization code flow with PKCE
  4. You’re redirected back to the platform and signed in

To let users sign in with Google accounts directly, set in .env:

Terminal window
GOOGLE_AUTH_ENABLED=true
VITE_GOOGLE_AUTH_ENABLED=true
GOOGLE_CLIENT_ID=<your-oauth-client-id>
VITE_GOOGLE_CLIENT_ID=<your-oauth-client-id>

You provide your own Google OAuth client (created in your Google Cloud console). When enabled, users click Sign in with Google and grant access to their basic profile and email. The platform receives only email address, display name, and profile picture — never contacts, calendar, email content, or files.

Access level depends on the assigned role:

RoleAccess
AdminFull access: manage users, configure frameworks, view all data
UserStandard access: view and edit controls, evidence, and risks
ViewerRead-only access: view controls and reports without editing

Your organisation’s administrator assigns roles via User Management.

  • Sessions remain active while you’re using the platform; after extended inactivity you’ll be prompted to sign in again (when a sign-in method is enabled).
  • To sign out, click your profile avatar in the top-right corner and select Sign out.
  • Always sign out on shared computers.

Sign-in popup closes immediately or is blocked (Google Sign-In)

Section titled “Sign-in popup closes immediately or is blocked (Google Sign-In)”

Allow popups for the site (popup-blocker icon in the address bar), then try again. If the button does nothing, temporarily disable ad blockers or try an incognito window.

The account has not been provisioned. An administrator needs to invite the user — see User Management.

What that invite has to cover depends on the deployment. On the bundled Keycloak the invite creates the sign-in account as well, so inviting the user is enough. On a bring-your-own OIDC or Google install the platform does not create accounts in the identity provider: the administrator has to create the account there and invite the user here. The badge on the pending invitation says which case applies — see User provisioning.

The account may not be assigned to an organisation yet. Verify the account setup with your administrator, then sign out and back in.

For deployment-level authentication problems (wrong API_KEY, single-tenant guard refusing to start), see Troubleshooting.