Accounts, MFA and API keys
Roles and permissions, TOTP multi-factor authentication, personal tokens and API keys.
Roles and permissions
| Role | Scope |
|---|---|
admin | Full access, including user management and system tools. |
editor | Content work; write access depends on granted permissions. |
viewer | Read-only access to the admin. |
| Permission | Grants |
|---|---|
admin.content.read | Read pages, news, and collection records in the admin API. |
admin.content.write | Create, edit, publish, and delete pages, news, and content records. |
admin.commerce.read | Read orders, products, customers, and commerce settings. |
admin.commerce.write | Manage products, confirm transfers, refund orders, and run commerce operations. |
admin.members.manage | Manage member accounts and member authentication settings. |
admin.users.manage | Invite staff users, change roles, and assign permissions. |
admin.media.manage | Upload, organize, and delete media files. |
admin.site.manage | Manage site settings, maintenance mode, redirects, and webhooks. |
admin.operations.manage | View runtime telemetry, backups, updates, and system operations. |
Grant the minimum a person needs. Every endpoint checks permissions on the server regardless of what the admin UI shows.
Multi-factor authentication (TOTP)
- Install an authenticator app (any TOTP-compatible one).
- In My Account, start MFA enrolment and scan the QR code or enter the secret.
- Confirm with a six-digit code. MFA is now required at every sign-in.
- Store the recovery codes shown at enrolment somewhere safe.
To make MFA mandatory for a role, enrol its users first and then set security.mfa_required_roles: [admin]. Stored secrets are encrypted with security.mfa_master_key; keep that key stable, because losing or changing it invalidates enrolments.
mfa_required_roles before every affected account has enrolled. Accounts without a second factor cannot sign in afterwards.Personal tokens and API keys
| Personal token | API key | |
|---|---|---|
| Created by | Any signed-in user, from a browser session | Administrators |
| Acts as | Its owner | A read-only machine identity |
| Scopes | Owner's full access | read or preview |
| Header | Authorization: Bearer hyd_… | X-API-Key: hyd_… |
| Expiry | Optional, up to 3650 days | Optional, up to 3650 days |
| Revoke | My Account, or DELETE /api/v1/admin/account/tokens/{id} | Users and roles, or DELETE /api/v1/admin/api-keys/{id} |
Social sign-in
Staff can sign in with Google, GitHub or Apple, but only into an existing, active admin or editor account that matches the verified provider identity: social sign-in never creates staff accounts. Members (site visitors) can also use social sign-in to register themselves. Provider credentials are supplied through HYDRO_OAUTH_* and HYDRO_MEMBER_OAUTH_* environment variables.
Onboarding and offboarding
- Invite staff by e-mail instead of sharing passwords.
- To offboard, disable the user; sessions end and history stays intact.