Skip to content

Users, roles & groups

Capability Viewer User Operator Admin
Log in to the dashboard Yes Yes Yes Yes
Access forward-auth apps (when granted) Yes Yes Yes Yes
Manage hosts and agents - edit, enable, delete No No Only what their groups were granted Yes
Create hosts No No No Yes
Manage certificates and access lists No No No Yes
Manage users, groups and settings No No No Yes
View analytics, logs and the audit log No No No Yes
Create and manage own API tokens Yes Yes Yes Yes

New accounts default to user. The first administrator comes from first run. There is always at least one active administrator: a role change, a disable or a delete that would remove the last one is refused, and an OIDC role sync skips that demotion - even when two of them happen at the same moment.

Its baseline is nothing, and it reaches exactly what its groups were granted. Starting from nothing is what makes grants safe to add: viewer and user gain nothing from a grant, so creating one can never widen an existing account. Someone has to be made an operator deliberately.

Grants apply to the dashboard. Over the API a role reaches hosts and agents only if it holds them outright, so an operator’s token gets the same user-scoped endpoints a user’s does.

Users → Roles lists the four built-in roles, which can’t be changed, and lets you make your own. A role is a set of permissions, one choice per area: none, read, or read and change, which includes read.

  • Areas follow the dashboard: the overview, hosts, agents, access lists, certificates, WAF and security, analytics, logs, users, groups, roles, settings, backups, alerts, the audit log, and everyone’s API tokens. Your own tokens are always yours to manage, whatever your role.
  • Scoped to granted objects makes the role work like operator for hosts and agents: it reaches only those its groups were granted, and can’t create one. Every other area it holds outright.
  • Nobody hands out more than they hold. Making, changing, deleting or giving a role needs every permission in it, held outright. The same goes for acting on an account: someone who manages users can’t disable, demote or reset anyone holding more than they do, an administrator included. Granting hosts or agents to a group needs managing every host or agent.
  • You can’t change or delete the role you hold, and the built-in roles can’t be changed at all.
  • A role in use can’t be deleted while a user, a group, a sign-in mapping or a provider’s default role still gives it.
  • API tokens never exceed their owner’s role, custom or built-in: a token’s scope narrows the role, and a request needs both.

When the two-factor policy, notifications and the last-administrator guard say administrators, they mean the built-in admin role, never a custom role however many permissions it holds.

A group can give a role to all its members, on top of their own, from Groups → Access → Role. It can’t give the admin role, and adding someone to a group that gives a role needs the same permissions as giving that role directly. View-as with a group brings the group’s role too.

A group is a list of users, and it does two jobs:

  1. Gating access to forward-auth protected apps.
  2. Deciding what an operator may manage, through Groups → Access: choose the capability - manage, or view only - then tick the proxy hosts, L4 hosts and agents the group should reach.
Groups → AccessOpen Access, change the grants and save; the card reads back what an operator in the group gets.Nothing you change here is saved
Network team
Filled from the IdP group platform-networking.Operators in it can manage grafana.example.com.

To check what a delegated operator can actually reach, an administrator can view the dashboard as one: Users → View as a role (the eye beside the heading), or View as an operator in this group on a group. Pick any role but admin, custom ones included, and the groups to be in.

  • Nobody is impersonated. CPM grants to roles and groups, not to people, so that is what it previews. The view lives on the administrator’s own session, and anything done while viewing is done - and recorded in the audit log - as them.
  • It can only narrow. Pages, menus and every permission check follow the chosen role and groups, over the REST and GraphQL APIs with the same session too. It can’t be used to gain anything.
  • A banner says so on every page, with Exit. The view also ends by itself after an hour.
  • Two things wait until you return: creating an API token, which would carry your real role, and signing in to a host behind CPM’s forward auth.

The sign-in screen asks for the username on its own, then the password. The dashboard’s /login and the forward-auth portal work the same way.

  • It is still one form. The password field is in the page from the start, only hidden, so a password manager can fill both at once - and when it has, Continue signs straight in.
  • Any username continues. The first step never checks whether the account exists, or which provider it belongs to, so the screen cannot be used to find out which usernames are real.
  • The username stays on screen for the second step, with a way to change it, so a typo in it can be told apart from a wrong password.
  • The primary provider stands out. Its button is filled with a lighter tint of the accent; the other providers are plain. The solid accent stays with Sign in.
Signing inAny username continues. No password is accepted - there is no controller behind this page.Nothing you change here is saved

Caddy Proxy Manager

Enter the username for this instance
Version 4.0.0-rc.11

Settings → Authentication → CAPTCHA puts a challenge on the username step of both the dashboard and the forward-auth portal: Google reCAPTCHA v2, hCaptcha, Cloudflare Turnstile, or a self-hosted Cap instance. With one configured, Continue only moves on once it is solved.

  • The server enforces it. A solve earns a pass for that one username, and the password endpoint refuses any sign-in without one, so a script posting straight to the API gets nowhere.
  • One solve, one password attempt. The pass is spent by the attempt whether the password was right or not, and the server remembers it was, so replaying it does nothing. After a wrong password the CAPTCHA appears again beside the password field, rather than sending you back to the username. An unused pass lapses after ten minutes, or when the controller restarts.
  • A failed solve and a broken setup read differently. A wrong answer is refused as failed. The provider not answering, or refusing the secret or site key - a wrong Cap key pair included - is reported as unavailable, since that one is the administrator’s to fix.
  • Each portal host can opt out. A host using the built-in forward auth has Require the sign-in CAPTCHA, on by default. Turned off, that host’s portal skips it - and its sign-in is open to scripted guessing again, held back only by the login throttles.
  • Single sign-on is untouched, and in OIDC-only mode there is no username step to put it on.
  • The sign-in pages load the provider’s script and are given a Content Security Policy that allows that provider’s origins, on those pages only.

With email set up, the password step offers Forgot your password?, which emails a single-use link to a local account. Users can then also create an account by invitation, so its owner chooses the password, and send any local account a fresh link later.

Anyone with a password can add a code from an authenticator app, from Profile → Two-factor sign-in. Turning it on asks for the password, shows a QR code and the key behind it, and takes one code to prove the app is set up. Ten backup codes follow, shown once - each signs in a single time if the phone is lost.

Profile → Two-factor sign-inAny password and any six digits work here; nothing is saved.Nothing you change here is saved
Off
Add a code from an authenticator app to your password, so a leaked password alone can't sign in as you.

Turn on

Enter your password to start. You'll need an authenticator app such as 1Password, Bitwarden, Google Authenticator or Aegis.

New backup codes

Your old backup codes stop working as soon as the new ones are made.

Turn off

Signing in will only ask for your password again.
  • It applies to the forward-auth portal too. A portal sign-in with a correct password asks for the code before it lets anyone through to the host. The portal doesn’t offer to remember the device; the dashboard does, for 30 days.
  • Wrong codes lock the second factor. Ten in a row, across sign-ins and across the dashboard and portal, locks it for fifteen minutes.
  • Single sign-on accounts are left to their provider. There is no password for a second factor to protect, so the section says so rather than offering it.
  • A second factor can be required. See the two-factor policy.

An administrator can reset another user’s second factor from Users, which also signs that user out everywhere. For the one administrator who has lost both the phone and the backup codes, the server can reset it from inside its own container:

Terminal window
docker compose exec web /app/cpm-server --reset-2fa admin

It asks the running server to do it, so the reset is in the audit log like any other, and it only works from inside the container: the request is signed with a key derived from SESSION_SECRET and answered only on the container’s own loopback. It removes the user’s passkeys too.

Settings → Authentication → Two-factor sign-in decides who must have a second factor: nobody, administrators, or every password account. An authenticator app or a passkey satisfies it.

  • Accounts without a local password are exempt. Single sign-on and directory accounts are left to their identity provider or directory, which is where their second factor belongs.
  • A grace period comes first. For 0 to 90 days (7 by default) after the policy reaches an account - when the policy is turned on or widened, or when the account is created, whichever is later - a banner across the dashboard asks for setup and names the date. After that, signing in leads straight to setup, and until it is done the dashboard, REST and GraphQL answer nothing else. Changing only the number of days keeps the clock that is running.
  • API tokens follow their owner. A token keeps working through its owner’s grace period and is refused, with 403, once setup is overdue; it works again as soon as the owner has a second factor. An account in its grace period cannot create a token, since one would outlast the deadline. Scopes are on the API page.
  • The forward-auth portal holds to it too. A password sign-in there from an account whose setup is overdue is refused with a link to finish it in the dashboard, since the portal has no setup of its own, and so is a dashboard session the portal would otherwise turn into a sign-in. A passkey counts as the second factor on the portal as it does on the dashboard.
  • “Require for administrators” from an earlier release is the administrators policy, enforced at once as it was.

If the policy locks out everyone who could change it, turn it off from inside the server’s container. Like the reset below, it is signed with a key derived from SESSION_SECRET, answered only on the container’s loopback, and recorded in the audit log:

Terminal window
docker compose exec web /app/cpm-server --lift-mfa-policy

A passkey signs in with a fingerprint, a face or the device’s PIN, and no password. Profile → Passkeys lists them, renames and removes them, and adds new ones; the sign-in screen and the forward-auth portal get a Sign in with a passkey button. With Offer passkeys automatically (Settings → Authentication, AUTH_PASSKEY_AUTOFILL) on, browsers that support it also offer saved passkeys in the username field’s autofill as the screen opens; off, the default, nothing asks for a passkey until the button is clicked.

  • A passkey is both factors. The authenticator must verify the person, not just that someone is present, and a passkey that did not is refused. So a passkey sign-in never asks for a two-factor code, and skips the CAPTCHA and the per-account login lockout, which exist to slow password guessing: there is no name to guess against, and no guess without the private key. Better Auth’s request limit (Settings → Authentication → Sign-in) still applies to each address.
  • It counts as a second factor. The two-factor policy is satisfied by a passkey as well as by an authenticator app.
  • Adding one needs a recent sign-in. It is a new way into the account, so a session more than ten minutes old is asked to sign in again first - a borrowed or stolen one usually is older.
  • It needs HTTPS and the Public URL’s hostname. Every passkey belongs to the hostname of the Public URL, and browsers only offer it on that hostname or a subdomain of it, over HTTPS or on localhost. At http://192.168.1.10:3000 the Profile section says why it can’t add one. Changing the Public URL to another hostname orphans every passkey already registered, which Settings → General → Instance warns about while any exist.
  • The portal works because it is on the Public URL. A host behind CPM’s forward auth still sends people to the portal on the dashboard’s address, where the passkey belongs.
  • The last way in can’t be removed. Removing the only passkey of an account with no password and no linked provider is refused; with a passkey, the password can be removed instead.
  • Not in OIDC-only mode, where the identity provider is the only way in.

An administrator can remove another user’s passkeys from Users, next to the two-factor reset, which signs them out everywhere too. Removing a passkey here doesn’t delete it from the device or password manager that holds it; it just no longer signs in.

Users shows, for each account, where it came from (local, single sign-on or a directory), its second factor (none, an authenticator app, a passkey, or both), and its last sign-in: when, and whether with a password, a passkey, single sign-on or a directory password. Sign-ins from before this release show the newest session’s start instead, with no method. Administrators who sign in with a password alone get a badge in the list and a banner above it, which shows only them or, with no policy on, leads to requiring a second factor.

Users → Sign-in overview (the arrow icon beside the heading) puts every way in on one page:

  • Each method and whether it is on: username and password, passkeys (with the hostname they are bound to), every OIDC and SAML provider and every directory, each with the number of accounts using it and a link to where it is configured. Directories are checked as Needs attention checks them, and one not answering is marked.
  • The second-factor policy and how many accounts have an authenticator app or a passkey.
  • Single sign-on enforcement: whether it is on, the break-glass accounts, and whether directory accounts still sign in with their LDAP password.
  • The login page as it stands: what someone signing in sees first, drawn from the same settings. Nothing in it signs anyone in.
  • Group and role mappings: which provider or directory group becomes which role, the role for anyone else, and the IdP groups mapped onto CPM groups.

Profile → Display holds three choices of your own. Table density applies at once. The time zone and the number format are stored on the account, so they follow it to every browser: times show in the zone you pick (or the browser’s, by default), and large numbers group the way you choose - 1,234.5, 1.234,5, 1 234,5 or 1'234.5 - whatever language the pages are in. A browser you have not set a zone for tells the server its own.

The session list on the same page shows each session’s approximate place, such as “Near Lyon, France”, when the GeoIP City or Country database is on the controller.

Any OAuth2/OIDC provider works: Authentik, Keycloak, Auth0 and others. Accounts can be linked from the Profile page, so an existing local account gains SSO rather than becoming a duplicate.

A provider sign-in that is refused comes back to the sign-in screen with the reason. The common one is an email that already belongs to an account the provider is not linked to: sign in with the password, then link the provider from Profile. Once one is linked, Profile can also remove the password, after confirming the current one, so the account signs in through the provider only.

Two provider options change how accounts are handled:

  • Group-based role mapping. Members of a claimed group become admins, operators, users, viewers or holders of a custom role automatically, so role changes happen in your IdP rather than here. When several match, admin wins, then operator, then custom roles in the order they were made, then user and viewer. Role when no group matches, per provider, sets the role for anyone in none of them; it defaults to user.

    Roles claim. Some providers keep roles apart from groups (Keycloak’s realm_access.roles, Entra’s roles). Name that claim and the role names are matched against it, while Sync groups keeps reading the groups claim. Left empty, roles come from the groups claim as before.

  • OIDC-only mode. Disables local accounts entirely. There is no bootstrap admin and no credential sign-in: every identity comes from the provider.

Settings → Authentication → Single sign-on providers lists OIDC and SAML providers together; Add provider with the type SAML 2.0 adds one. To someone signing in it is one more Continue with button, and its users, linked accounts and group mappings work as an OIDC provider’s do.

  1. Give CPM the identity provider’s metadata: its URL, fetched each time the provider is saved, or the XML pasted in. The metadata must describe one identity provider with a sign-on URL for the HTTP-Redirect binding and a signing certificate, or saving says which is missing. Sign-in uses the copy saved, never a fresh fetch.
  2. Save. The provider then shows two URLs to register with the identity provider: the assertion consumer service URL and the service provider metadata URL, which most identity providers can import directly.
  3. The service provider entity ID is what the identity provider knows CPM as. Left blank it is the metadata URL; set it to whatever the identity provider’s client is called.
  4. CPM sends its sign-in requests unsigned, so the identity provider’s client must not require signed requests (Keycloak: turn off Client signature required under the client’s Keys).

CPM refuses a response unless:

  • The assertion itself is signed with a certificate from the saved metadata, using SHA-256 or stronger. A signed response around an unsigned assertion is not enough, so turn on assertion signing in the identity provider (Keycloak: Sign assertions).
  • It answers a sign-in CPM started. Sign-ins the identity provider starts on its own are refused, and each assertion is accepted once, on every controller.
  • It names CPM as its audience and recipient.
  • It carries timestamps and is valid within two minutes of the controller’s clock.

Attributes. The email and display name come from the attributes named on the provider (email and displayName by default). The groups attribute feeds the same group-to-role mapping and group sync as an OIDC groups claim, on every sign-in, so a group change at the identity provider lands at the next one.

Existing accounts. A first SAML sign-in whose email already belongs to a CPM account is refused, unless the email’s domain is one of the provider’s Domains to link: then it joins that account. List only domains the identity provider is the authority for. Whether a first sign-in may create an account at all follows the same setting as OIDC providers.

Settings → Authentication → Single sign-on enforcement → Require single sign-on stops passwords and passkeys typed into CPM, so everyone signs in through an enabled OIDC or SAML provider, and its own second factor applies. It is refused while no provider is enabled.

  • Break-glass accounts keep their password and passkeys, for when the identity provider is down. Pick up to 20 accounts that have a local password.
  • Allow LDAP while single sign-on is enforced, on by default, keeps the directory sign-in. Directory accounts are created and removed in the directory, which is usually what enforcing single sign-on is for, but the password is still typed into CPM and the identity provider’s second factor never runs. Turn it off to send directory users through a provider too.
  • The forward-auth portal follows the same rules, and self-registration is refused.
  • The sign-in overview shows whether it is on, the break-glass accounts, and which methods it leaves working.

If the identity provider is down and no break-glass account was named, turn enforcement off from inside the server’s container. It is signed and answered like the two-factor policy’s lift, and recorded in the audit log:

Terminal window
docker compose exec web /app/cpm-server --lift-sso-enforcement

An identity provider can also create, update and disable accounts and groups ahead of any sign-in, through SCIM 2.0 on PostgreSQL. See SCIM provisioning.

Users → Access reviews asks reviewers, item by item, whether each role, group membership, grant, API token or SCIM connection should stay, and applies what they revoke when the review closes. See Access reviews.

Settings → Authentication → Directories (LDAP) adds an LDAP server, and its users sign in on the ordinary sign-in form and the forward-auth portal with their directory username and password. Nothing about a directory is set by environment variable.

  • One directory is invisible. The form tries an account on this instance first, then the directory, so local accounts keep working and nobody has to pick. With several directories the form shows a Sign in with selector instead.
  • How a user is found. A service account (the bind DN) searches the base DN with the user filter, which has to match exactly one entry; then CPM binds as that entry with the typed password. Or, with Bind as the user, there is no service account: the typed name fills a bind name, such as uid={username},ou=people,dc=example,dc=org for OpenLDAP. The typed name is escaped for the filter or the DN, so * or )( in it is just a character. OpenLDAP and Active Directory buttons fill in the usual filters.
  • Active Directory without a service account. Choose Bind as the user and the Active Directory preset fills in a UPN, {username}@ad.example.org from the base DN; a down-level name such as EXAMPLE\{username} works too. This is the recommended setup when there is no service account. CPM binds with the user’s own password, then finds their entry with the user filter using the user’s own rights, and reads their groups, nested ones included, the same way. The entry found must be the account that bound - its userPrincipalName for a UPN, its sAMAccountName for a down-level name - or the sign-in is refused, so a filter matching too much can never sign someone in as another person. A UPN or down-level name can’t be escaped, so in these two forms a username may hold only letters, digits, dots, hyphens and underscores; anything else is refused like a wrong password. These forms need ldaps:// or StartTLS, and saving without either is refused, since every sign-in sends the user’s real password.
  • TLS is verified. Use ldaps://, or ldap:// with StartTLS; a server that refuses the upgrade fails the sign-in rather than carrying on unencrypted. A private CA’s certificate can be pasted in. Turning verification off works, with a warning about what it gives up.
  • The first sign-in makes the account, when Let a first-time OAuth identity create an account is on (Settings → Authentication → Sign-in); otherwise an administrator’s account has to exist and be linked first. The account is tied to the entry’s objectGUID or entryUUID, which survive a rename, never to its name.
  • An existing account is joined only by choice. An entry whose email matches an existing account is refused, unless Link accounts by email is on for that directory. Turn that on only where administrators, not users, set the directory’s email addresses: whoever holds an address takes over the account with it, an administrator’s included.
  • No password here. A directory account has no local password and can’t set one; Profile says its password is managed by the directory. Disabling someone in the directory stops their next password sign-in, but not a session they already have or a passkey they added - disable them in Users as well.
  • A passkey lasts as long as the directory. For someone the directory is the only way in for, a passkey stops working while the directory is disabled, and deleting the directory removes their passkeys and signs them out.
  • Groups work as for OAuth. Groups come from the entry’s memberOf, or from a search for groups naming the user - Active Directory’s preset searches nested groups too. Each group is known by its name, the first part of its DN: CN=Proxy Admins,OU=Groups,... is Proxy Admins. Role mapping, the group prefix and explicit group mappings behave exactly as they do for a provider.
  • The same checks as a password. A directory sign-in goes through the CAPTCHA and the per-account lockout, asks for a two-factor code when the account has one, and is audited once it completes. Every refusal - a wrong password, an unknown name, a name matching two entries, a filter finding someone other than who bound, a directory that is down - answers “Invalid username or password”; the reason is in the server log.
  • Test before saving. Test checks the address, the TLS handshake, the bind and the base DN, and with a test username and password signs in as that user and shows the groups and role it would get. Binding as the user has no account to test with, so without a test user it checks only the address and TLS, and says so. A stored bind password is only ever sent to the address and bind DN it was saved with: change either and it has to be typed again.

Two-factor sign-in can’t be set up on a directory account (it protects a local password, and there isn’t one), so the two-factor policy’s Administrators setting leaves directory administrators to the directory, as it does single sign-on ones.

Production enforces strong passwords, and two independent throttles guard the auth endpoints: a request limit and a login lockout, both configurable in Settings. Accounts still on an older password hash can be forced to reset, which rehashes them on next sign-in.

An account that keeps failing is locked for a delay that doubles with each failure past the fifth, from 1 second up to 15 minutes, whichever address the guesses come from. The number of free failures, the first delay and the cap are fields under Settings → Authentication → Sign-in, next to a switch that turns the lock off. A sign-in to a locked account gets a 429 with the code ACCOUNT_LOCKED, the wait in seconds as retryAfter in the body and a Retry-After header, so the sign-in page and the forward-auth portal can say how long. It replaced TOO_MANY_REQUESTS for that response. The per-address limit keeps its generic message.

Disable accounts after repeated failed sign-ins, off by default in the same place, goes further: once an account reaches that many failures (10 by default), it is disabled until an administrator enables it again. The count is the lock’s own, so it is forgotten a day after the last failure and a successful sign-in resets it. Turning it on means anyone who knows a username can disable that account by guessing at it, which is why it is off by default.

  • The sign-in answers as for any wrong password, so the guesser is not told.
  • The last active administrator is never disabled. It stays on the timed lock, and the administrators are notified either way.
  • A directory account is left to its directory. A refused LDAP password names no CPM account, so it never disables one; use the directory’s own lockout.
  • Enabling it on Users starts the count over, and the user’s page says an account was disabled by failed sign-ins rather than by an administrator. It is audited as user_disabled_failed_sign_ins.

If the account disabled is the only administrator’s, the server can enable it from inside its own container, the same way it resets a second factor:

Terminal window
docker compose exec web /app/cpm-server --enable-user admin