Skip to content

End a user's access

Four actions end an end user’s access, and all four end it now rather than at the user’s next sign-in. They differ in what is left afterwards and in who can undo them.

Action What is left afterwards Who undoes it Console Agent
Deactivate the account, marked inactive whoever manages the account: an administrator, or the directory for a provisioned user More, Deactivate project_user_update with active: false
Lock the account, locked, with the reason recorded an administrator only Lock…, Unlock… project_user_lock, project_user_unlock
Sign out everywhere the account, active and free to sign in again nobody needs to Sign out everywhere project_user_sign_out
Delete nothing nobody can Delete user, on the Profile tab project_user_delete

In the console, all four are on the person’s page, reached from the project’s Users list. The lock is also on the admin API (POST /admin/api/projects/:id/users/:uid/lock, with a reason, and …/unlock).

Each runs the same sequence:

  1. The account is marked, so from this moment every way in refuses it: the password form, a federated sign-in, a refresh, and the device flow and CIBA (sign-ins the user approves on a second device). Sign out everywhere skips this step, and nothing else sets it apart.
  2. Every session gets a back-channel logout to each relying party that registered for one. The sessions are read before anything is removed, because the logout token has to carry the session’s sid, and the session is the only place that holds it. A relying party that is unreachable does not stop the action.
  3. Everything the account owns is swept: sessions, grants and with them consents, refresh tokens, opaque access tokens, authorization codes, pending device and CIBA requests, sign-ins and password resets in progress. The list comes from the server’s storage inventory, where each kind of record declares its owner, so a kind of record added in a later release is swept without anyone remembering to add it.

From that moment, introspection (a resource server asking this server whether a token is still valid) answers active: false for an opaque access token, because the grant behind it is gone. Deletion then also removes the account, its upstream identity links, its group memberships and its connected accounts.

If the sweep fails partway, the action answers 500 naming the areas that survived. The account is already unable to sign in. Repeating the action sweeps again, which is why deactivating an already inactive user is allowed rather than refused as a no-op.

Three things are deliberately not swept. First, the sign-in and password-reset throttles: they are keyed by email address and limit guessing, so they are not access, and clearing them on an account under attack would reset the brute-force count mid-incident. Second, the audit trail: it records the action, never what the action swept. Third, the person’s connected accounts at other services: a lock or a deactivation keeps them, so that undoing it does not make the person connect everything again. Only deletion removes them.

Turning a deactivated user back on, or unlocking a locked one, lets them sign in again. It does not bring back their sessions, refresh tokens or consents. They sign in and consent afresh, as the OpenID IPSIE profile (Interoperability Profiling for Secure Identity in the Enterprise) requires when it says every access mechanism and authorization is to be deactivated.

The active flag belongs to whoever manages the account. For a user a SCIM directory provisioned, that is the directory, and a local deactivation would be undone by the directory’s next update. An incident response cannot wait on someone else’s system, so the lock is a separate flag that only an administrator sets or clears, and nothing a directory sends reaches it. The lock touches sign-in only, never the profile.

The lock is a deliberate departure from the IPSIE profile, which forbids local changes to users an identity service manages. For an agent, unlocking is a high-consequence MCP tool that asks for confirmation, because it re-admits an account an administrator judged compromised. Locking is not high-consequence, and neither is deactivation.

An administrator’s edit, password reset or deletion of a provisioned user is refused with 409, naming the connection that owns them, so deactivate and delete such users in the directory. The lock, sign out everywhere and clearing an authenticator stay available, because none of them changes the profile.

Sign out everywhere is for the stolen laptop

Section titled “Sign out everywhere is for the stolen laptop”

Deactivation and the lock answer “this person should not get in”. Sign out everywhere answers “someone else may be holding this person’s session”: it ends every session and token the way a lock does, and leaves the account as it was. Sign out everywhere is also what an upstream provider asks for when it sends global token revocation, and the audit trail records both under the same action.

  • One application. A person’s Sign-in methods tab lists the applications they are signed in to: when they signed in, and when each app last got a token. Sign out of this app ends that application’s access only. Its tokens stop working, offline access included, and the person’s other applications are untouched. The list shows no network address or device. Where and how the person signed in is on their Activity tab, kept for 90 days (what FoxAuth records about people). Agents use project_user_session_list, project_user_activity_list and project_user_application_sign_out.
  • Many people. Select up to 100 people in a project’s Users list, then Deactivate, Activate, Sign out everywhere or Delete them. Each person is handled exactly as if acted on alone, with their own entry in the audit trail. People an act does not apply to are skipped and counted, not failed: a directory’s people for Deactivate, Activate and Delete, and anyone already in that state. Agents have the same acts (project_user_bulk_*); bulk deactivation and deletion are confirmed in two calls.

Deleting a project ends everyone’s access at once, but it does not destroy anything for 30 days:

  • The project stops answering. Its sign-in page, token endpoint, userinfo, discovery document, key set and SCIM endpoint all answer as if no project were there. A refresh token it issued is refused at every other address of this server too.
  • Nothing in it is deleted. Its accounts, sessions, tokens, keys, groups and directory connections stay as they were, and its address stays reserved, so no other project can take it.
  • Restore brings it back exactly as it was. People who were signed in stay signed in, and apps keep refreshing their tokens. A directory that only sends changes may need a manual resync for what it sent meanwhile.
  • After 30 days the server destroys it, with everything in it. Delete now does that at once, on a project already scheduled, with the same typed confirmation word as the deletion.

Signals from an upstream identity provider that only end access, such as back-channel logout and global token revocation, are still accepted while the project is off. A restore therefore cannot bring back a session the provider ended. An agent can restore a project (project_restore, confirmed in two calls), but cannot schedule or destroy one; those stay in the console.

A JWT access token that a resource server validates on its own, against the published keys, never comes back to this server, so nothing here can recall it. The token stays valid until its exp (expiry time).

The bound on such a token is its lifetime, set as accessTokenTTL on the declared resource: fifteen minutes unless an administrator chose otherwise, and at most a day. Keep it short. IPSIE SL2 allows fifteen minutes for a token not bound to a key, and sixty for one bound with DPoP. A resource server that cannot tolerate even that should ask for opaque tokens and introspect them, which costs a call per request and sees a deactivation immediately.