Stopped leaking secrets

This commit is contained in:
2026-10-24 15:43:10 +02:00
parent 385c76510b
commit 29a11f0e0b
10 changed files with 18 additions and 36 deletions
+4 -6
View File
@@ -5,7 +5,7 @@ export interface SecuritySettings {
Authority: string;
Audience: string;
ClientId: string;
ClientSecret: string;
ClientSecret?: string;
Scope?: string;
}
@@ -32,7 +32,6 @@ export const defaultSecuritySettings: SecuritySettings = {
Authority: 'https://sts.security.khongisa.co.za',
Audience: 'pfm-api-dev',
ClientId: 'pfm-console-dev',
ClientSecret: 'secret_dcaeaa28097d9ba5b06ec324d9eac9d9c81de96e0a203cf2c6154c6dd7c89e94',
Scope: 'openid profile roles email address pfm-api-dev',
};
@@ -218,9 +217,8 @@ function resolveConfig(fetchedJson?: Record<string, any>): AppConfig {
const clientSecret = pickFirstNonEmpty(
winCfg.clientSecret,
fetchCfg.clientSecret,
envCfg.clientSecret,
defaultSecuritySettings.ClientSecret
)!;
envCfg.clientSecret
);
const scope = pickFirstNonEmpty(
winCfg.scope,
fetchCfg.scope,
@@ -247,7 +245,7 @@ function resolveConfig(fetchedJson?: Record<string, any>): AppConfig {
Authority: authority,
Audience: audience,
ClientId: clientId,
ClientSecret: clientSecret,
...(clientSecret ? { ClientSecret: clientSecret } : {}),
Scope: scope,
},
ApiSettings: {