Skip to main content

Sign in

Without auth (loopback only) nobody signs in. With auth, the page offers what console.yaml sets up:

  • Console users, a name and password each, kept in the console's own database (auth.login.users: SQLite, PostgreSQL or MySQL, an admin database say). It holds only the console's tables, and the clients' databases only job state. Create its tables, then add people; --url names the database, as for streamwright state. It asks the password twice and stores only its scrypt hash:

    # as a user that may change the console's tables
    URL="postgresql://admin@admin-db/admin?schema=console"
    streamwright console migrate --url "$URL"
    streamwright console users add alice --name "Alice Smith" --url "$URL"

    console users list, password and remove look after them (console.yaml in place of --url uses auth.login.users). A new password or a removed user ends their sessions within a minute; after 5 failed sign-ins, a name waits a minute.

  • Single sign-on with an OpenID Connect provider (Okta, Entra ID, Google, Keycloak). Register https://CONSOLE/login/callback as the console's redirect URI. The provider names the person: name, email, groups.

  • An API key or token, for scripts and tools.

The console's login page: Sign in with Okta, a console user's name and password, and Use an API key or token
The login page, with single sign-on and console users.
auth:
api_keys: [{id: ops, sha256_env: SW_CONSOLE_OPS_SHA256}]
login:
users: {url: "sqlite:///console-users.db"} # or postgresql://, mysql:// ({{ secrets.NAME }} for a password)
sso:
label: Okta # "Sign in with Okta"
issuer: https://example.okta.com/oauth2/default
client_id: 0oa1b2c3d4
client_secret_env: SW_CONSOLE_SSO_SECRET # leave out for a public client (PKCE alone)
session_secret_env: SW_CONSOLE_SESSION_SECRET # signs the sessions: e.g. openssl rand -hex 32
session_ttl: 8h # how long a sign-in lasts (5m to 7d)
clients:
acme:
principals: [ops, alice, sre] # who may see Acme
ack_principals: [alice, sre] # who of them may also acknowledge from the page

A session stays in the browser tab; sign out ends it, and a new session secret signs everyone out. The console only reads its users: give it SELECT on sw_console_users, and its admins the rights to change them.