fix(auth-backend): default catalog presence check to on, rename config
Address review feedback: flip the catalog user existence check to enabled by default and rename the config option to `dangerouslyDisableCatalogPresenceCheck` as an escape hatch. Also use `error.name` instead of `instanceof` for cross-realm error safety. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
Vendored
+7
-4
@@ -134,13 +134,16 @@ export interface Config {
|
||||
*/
|
||||
maxTokensPerUser?: number;
|
||||
/**
|
||||
* Whether to validate that the user's catalog entity exists when
|
||||
* refreshing a token. When enabled, tokens for users removed from
|
||||
* the catalog will be rejected and revoked.
|
||||
* Disables the check that verifies the user's catalog entity still
|
||||
* exists when refreshing a token. This is an escape hatch for
|
||||
* Backstage instances that allow sign-in without a corresponding
|
||||
* catalog user entity. Without the check, refresh tokens for
|
||||
* removed or offboarded users remain valid until they naturally
|
||||
* expire.
|
||||
* @default false
|
||||
* @visibility backend
|
||||
*/
|
||||
validateCatalogUserExistence?: boolean;
|
||||
dangerouslyDisableCatalogPresenceCheck?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user