Skip to main content

StopPrincipal

POST 

/admin/v1/customers/:customer_id/principals/:id/stop

StopPrincipal applies the emergency stop to a record of an install in directory identity mode, which is a principal that has no project (decision record 104). It requires a reason, and it writes one STOP_PRINCIPAL audit row with the reason in the transaction of the stop. When the audit row cannot be written, the stop is not applied.

The stop refuses the caller's token calls and API key calls. It puts the caller's API keys on the revocation list that every data plane pulls: the keys linked to the record, and the other keys of the SCIM user linked to the record. Expired keys are on the list too, because a data plane with skip_user_token_expiry_check does not refuse them by their expiry. The stop stores that user, so a later change to the SCIM link takes no key off the list. A data plane pulls the list every 60 seconds by default, so a call can still be served for about 60 seconds. A call on an MCP route can still be served for up to 5 minutes, because the data plane keeps an MCP authorization for that long, as it does for a revoked key. The stop changes no API key. A second stop changes nothing and answers changed false. LiftPrincipalStop undoes a stop. One API key call is not refused: a call with a legacy sk- key that a data plane checks against its own database, because that check does not read the revocation list.

A stop is its own state. It sets stopped and stopped_at on the principal and never sets disabled.

One customer can have at most 1000 stopped records at one time, and its stopped records can add at most 2000 API keys to the revocation list. A stop that would pass either limit is refused with RESOURCE_EXHAUSTED, and a failed audit row is written.

It refuses with FAILED_PRECONDITION, and writes a failed audit row, a principal that has a project, which is every principal of an install in built-in identity mode.

It refuses a record with UNAVAILABLE, and writes a failed audit row, while the upgrade of the database has not added the stop columns yet. The caller can retry after the upgrade.

Request​

Responses​

Success