mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 20:26:17 +00:00
Fix azure samlConfig
This commit is contained in:
@@ -291,23 +291,19 @@ const initializePassport = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
interface ISAMLConfig {
|
interface ISAMLConfig {
|
||||||
path: string;
|
callbackUrl: string;
|
||||||
callbackURL: string;
|
|
||||||
entryPoint: string;
|
entryPoint: string;
|
||||||
issuer: string;
|
issuer: string;
|
||||||
cert: string;
|
cert: string;
|
||||||
audience: string;
|
audience: string;
|
||||||
protocol: string;
|
|
||||||
wantAuthnResponseSigned?: boolean;
|
wantAuthnResponseSigned?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const samlConfig: ISAMLConfig = ({
|
const samlConfig: ISAMLConfig = ({
|
||||||
path: `/api/v1/sso/saml2/${ssoIdentifier}`,
|
callbackUrl: `${await getSiteURL()}/api/v1/sso/saml2/${ssoIdentifier}`,
|
||||||
callbackURL: `/api/v1/sso/saml2/${ssoIdentifier}`,
|
|
||||||
entryPoint: ssoConfig.entryPoint,
|
entryPoint: ssoConfig.entryPoint,
|
||||||
issuer: ssoConfig.issuer,
|
issuer: ssoConfig.issuer,
|
||||||
cert: ssoConfig.cert,
|
cert: ssoConfig.cert,
|
||||||
protocol: "https://",
|
|
||||||
audience: await getSiteURL()
|
audience: await getSiteURL()
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -316,7 +312,7 @@ const initializePassport = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ssoConfig.authProvider.toString() === AuthMethod.AZURE_SAML.toString()) {
|
if (ssoConfig.authProvider.toString() === AuthMethod.AZURE_SAML.toString()) {
|
||||||
samlConfig.wantAuthnResponseSigned = false;
|
samlConfig.audience = `spn:${ssoConfig.issuer}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
req.ssoConfig = ssoConfig;
|
req.ssoConfig = ssoConfig;
|
||||||
|
|||||||
Reference in New Issue
Block a user