Admin accounts and sessions
Create and switch admin accounts, choose how admins sign in, adjust session durations, and set team mode.
By default, admin accounts sign in with a passkey, or with a password and a code from an authenticator app. Their access tokens expire after 5 minutes. Access tokens for regular accounts expire after 10 minutes. You can choose how admins sign in and adjust session durations. Every session ends no later than 12 hours after sign-in.
Create and switch admins
Section titled “Create and switch admins”A User is a regular account by default. Set spec.accountType: Admin to make it an admin account.
Only admin account tokens include the admins group, which Kubernetes recognizes as zeabur:admins. Installing Zeabur Identity binds zeabur:admins to cluster-admin with the ClusterRoleBinding zeabur-identity-cluster-admins. Admins have full cluster permissions immediately after signing in and don't need to sign in again.
Regular accounts have only the permissions you bind to their groups. They have no permission bindings by default.
Create the first admin
Section titled “Create the first admin”Run the following command to create the first user. This user is an admin account with no groups. The command prints a one-time passkey setup link.
zeabur-identityctl setup-link --username adminIf an admin can no longer sign in, use the same command with --reset to recover the account. See Sign out, recover, and remove users.
Invite an admin or switch account types
Section titled “Invite an admin or switch account types”Invite a new user as an admin:
zeabur-identityctl invite --username alice --adminSwitch an existing user's account type:
zeabur-identityctl account-type alice admin # or: regularYou can also use kubectl to make an existing user an admin and check account types:
kubectl -n zeabur-identity patch zbuser alice --type merge -p '{"spec":{"accountType":"Admin"}}'kubectl -n zeabur-identity get zbuser # the Type column shows the account typeChanges take effect the next time the user signs in or refreshes their token. Previously issued access tokens remain valid until they expire, for up to 5 minutes or 10 minutes. After an account becomes an admin account, its existing sessions that the admin-sign-in setting doesn't allow, such as upstream sign-ins, end at the next token refresh.
Directory sync doesn't change an account's admin status. See Sync users from a directory.
Adjust session durations
Section titled “Adjust session durations”Each sign-in creates a session. Applications receive a short-lived access token and a refresh token. Until the session ends, they use the refresh token to obtain new access tokens without another sign-in.
A session ends when it reaches its idle timeout or maximum duration. The default limits are:
| Account | Access token lifetime | Session idle timeout | Maximum session duration |
|---|---|---|---|
| Regular account | 10 minutes | 1 hour | 12 hours after sign-in |
| Admin, single team | 5 minutes | 1 hour | 12 hours after sign-in |
| Admin, multiple teams or device-bound passkeys required | 5 minutes | 15 minutes | 12 hours after sign-in |
The 12-hour limit starts at sign-in. Refreshing tokens doesn't reset this limit.
Zeabur Identity doesn't retain a single sign-on session, so every authorization request displays the sign-in page. The refresh_expires_in field in the token response indicates how many seconds remain before the refresh token reaches its idle timeout.
Pass the following options to zeabur-identity to adjust the limits. When generating installation manifests, pass them with --serve-arg.
| Option | Default | Scope |
|---|---|---|
--token-lifetime | 10m | Access token and ID token lifetime for regular accounts |
--admin-token-lifetime | 5m | Access token and ID token lifetime for admin accounts |
--refresh-idle | 1h | Session idle timeout |
--admin-refresh-idle | 15m | Admin session idle timeout with multiple teams or device-bound passkeys required |
--refresh-absolute | 12h | Maximum session duration from sign-in |
Token lifetimes must be between 1 minute and 1 hour. Idle timeouts must not exceed --refresh-absolute.
Site-wide settings
Section titled “Site-wide settings”The ConfigMap zeabur-identity-settings in the Namespace where Zeabur Identity runs stores the following settings:
| Key | Accepted values | Default | Purpose |
|---|---|---|---|
teams | single, multiple | single | When set to multiple, admin sessions end after 15 minutes of inactivity by default. |
admin-sign-in | any, two-factor, passkey, device-bound-passkey | two-factor | How admin accounts sign in. See Choose how admins sign in. |
Every installation starts in single-team mode, where admin and regular accounts use the same idle timeout.
When multiple teams share a cluster, create the following configuration:
kubectl -n zeabur-identity create configmap zeabur-identity-settings --from-literal=teams=multipleTo switch back to a single team later, update the configuration:
kubectl -n zeabur-identity patch configmap zeabur-identity-settings --type merge -p '{"data":{"teams":"single"}}'The Settings page in Zeabur OSS also writes to this ConfigMap. Zeabur Identity reads the settings at each sign-in and token refresh. No restart is required.
If the ConfigMap or a setting key doesn't exist, Zeabur Identity uses the default value. If a value isn't one of the accepted values, Zeabur Identity uses the stricter choice: multiple for teams and device-bound-passkey for admin-sign-in.
Choose how admins sign in
Section titled “Choose how admins sign in”The admin-sign-in setting decides which sign-in methods admin accounts can use. Regular accounts can always use every method.
| Value | Admin accounts sign in with |
|---|---|
any | Every method regular accounts use: a passkey, a password, or an upstream account |
two-factor (default) | A passkey, a password and a code from an authenticator app, or an upstream account from an OpenID provider marked mfa: Enforced |
passkey | A passkey only |
device-bound-passkey | A device-bound passkey only, such as a security key |
To change the setting, update the ConfigMap:
kubectl -n zeabur-identity patch configmap zeabur-identity-settings --type merge -p '{"data":{"admin-sign-in":"passkey"}}'Zeabur Identity applies the setting at the next sign-in or token refresh. No restart is required. Sessions that the new setting doesn't allow end at their next token refresh.
Passwords with an authenticator app
Section titled “Passwords with an authenticator app”With two-factor, an admin who sets a password on the setup page also scans a QR code with an authenticator app, such as Google Authenticator, Microsoft Authenticator or 1Password, and enters a code from it. The setup page then shows 10 recovery codes once. Each recovery code works once in place of a code from the app.
When the admin signs in with the password, the sign-in page then asks for a code. Each code works once. Wrong codes count toward the same limit as wrong passwords. See Passwords.
An admin password set with any has no authenticator app, so it stops working when you change the setting to two-factor. To reset a password or a lost authenticator app, delete the password's Credential and send a new setup link. If the admin also has a passkey or a linked account, the setup link needs --reset, which deletes those too. The new password comes with a new authenticator and new recovery codes.
Require device-bound passkeys for admins (AAL3)
Section titled “Require device-bound passkeys for admins (AAL3)”When you set admin-sign-in to device-bound-passkey, admin accounts can use only device-bound passkeys, such as security keys or passkeys that stay on a single device.
Zeabur Identity rejects synced passkeys, such as those in iCloud Keychain or Google Password Manager, during sign-in, passkey registration, and token refresh. Sessions created with synced passkeys, passwords or upstream accounts end at the next token refresh. The rejection message is:
This passkey syncs to other devices. Admin accounts here need a security key, or a passkey that stays on one device.
With this setting enabled, admin sessions end after 15 minutes of inactivity by default, regardless of the teams setting. Regular accounts aren't affected.
Check that every admin has a device-bound passkey
Section titled “Check that every admin has a device-bound passkey”Before enabling the restriction, check the BE values of the passkeys:
kubectl -n zeabur-identity get zbcred \ -o custom-columns=NAME:.metadata.name,USER:.spec.user,BE:.spec.passkey.backupEligibleEach admin must have at least one passkey with BE set to false.
Admins without such a passkey won't be able to sign in until you run the following command and they use the new setup link to register a security key:
zeabur-identityctl setup-link --username <admin> --resetChange the setting
Section titled “Change the setting”Update the site-wide settings:
kubectl -n zeabur-identity patch configmap zeabur-identity-settings --type merge -p '{"data":{"admin-sign-in":"device-bound-passkey"}}'Zeabur Identity applies the restriction at the next sign-in or token refresh. No restart is required.