feat(auth): allow configuring DCR token expiration

this adds a new config value for exprimental dynamic client registration
feature that allows configuring the token expiration.

added also missing config values to the config schema for this feature.

Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
Hellgren Heikki
2025-09-25 14:21:34 +03:00
parent 9f6f46d234
commit 51ff7d8e46
8 changed files with 208 additions and 31 deletions
+24
View File
@@ -95,6 +95,7 @@ export interface Config {
/**
* The backstage token expiration.
* Defaults to 1 hour (3600s). Maximum allowed is 24 hours.
*/
backstageTokenExpiration?: HumanDuration | string;
@@ -102,5 +103,28 @@ export interface Config {
* Additional app origins to allow for authenticating
*/
experimentalExtraAllowedOrigins?: string[];
/**
* Configuration for dynamic client registration
*/
experimentalDynamicClientRegistration?: {
/**
* Whether to enable dynamic client registration
* Defaults to false
*/
enabled?: boolean;
/**
* A list of allowed URI patterns to use for redirect URIs during
* dynamic client registration. Defaults to '[*]' which allows any redirect URI.
*/
allowedRedirectUriPatterns?: string[];
/**
* The expiration time for the client registration access tokens.
* Defaults to 1 hour (3600s). Maximum allowed is 24 hours.
*/
tokenExpiration?: HumanDuration | string;
};
};
}