mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
make saml auth request option forceauthn configurable (#9756)
This commit is contained in:
parent
96610603ca
commit
44597724f5
@ -73,6 +73,9 @@ public interface SAML2AuthManager extends PluggableAPIAuthenticator, PluggableSe
|
|||||||
ConfigKey<Boolean> SAMLCheckSignature = new ConfigKey<Boolean>("Advanced", Boolean.class, "saml2.check.signature", "true",
|
ConfigKey<Boolean> SAMLCheckSignature = new ConfigKey<Boolean>("Advanced", Boolean.class, "saml2.check.signature", "true",
|
||||||
"When enabled (default and recommended), SAML2 signature checks are enforced and lack of signature in the SAML SSO response will cause login exception. Disabling this is not advisable but provided for backward compatibility for users who are able to accept the risks.", false);
|
"When enabled (default and recommended), SAML2 signature checks are enforced and lack of signature in the SAML SSO response will cause login exception. Disabling this is not advisable but provided for backward compatibility for users who are able to accept the risks.", false);
|
||||||
|
|
||||||
|
ConfigKey<Boolean> SAMLForceAuthn = new ConfigKey<Boolean>("Advanced", Boolean.class, "saml2.force.authn", "false",
|
||||||
|
"When enabled (default false), SAML2 will force a new authentication. This can be useful if multiple application use different saml logins from the same application (I.E. browser)", true);
|
||||||
|
|
||||||
ConfigKey<String> SAMLUserSessionKeyPathAttribute = new ConfigKey<String>("Advanced", String.class, "saml2.user.sessionkey.path", "",
|
ConfigKey<String> SAMLUserSessionKeyPathAttribute = new ConfigKey<String>("Advanced", String.class, "saml2.user.sessionkey.path", "",
|
||||||
"The Path attribute of sessionkey cookie when SAML users have logged in. If not set, it will be set to the path of SAML redirection URL (saml2.redirect.url).", true);
|
"The Path attribute of sessionkey cookie when SAML users have logged in. If not set, it will be set to the path of SAML redirection URL (saml2.redirect.url).", true);
|
||||||
|
|
||||||
|
|||||||
@ -543,6 +543,6 @@ public class SAML2AuthManagerImpl extends AdapterBase implements SAML2AuthManage
|
|||||||
SAMLCloudStackRedirectionUrl, SAMLUserAttributeName,
|
SAMLCloudStackRedirectionUrl, SAMLUserAttributeName,
|
||||||
SAMLIdentityProviderMetadataURL, SAMLDefaultIdentityProviderId,
|
SAMLIdentityProviderMetadataURL, SAMLDefaultIdentityProviderId,
|
||||||
SAMLSignatureAlgorithm, SAMLAppendDomainSuffix, SAMLTimeout, SAMLCheckSignature,
|
SAMLSignatureAlgorithm, SAMLAppendDomainSuffix, SAMLTimeout, SAMLCheckSignature,
|
||||||
SAMLUserSessionKeyPathAttribute};
|
SAMLForceAuthn, SAMLUserSessionKeyPathAttribute};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,7 +193,7 @@ public class SAMLUtils {
|
|||||||
authnRequest.setID(authnId);
|
authnRequest.setID(authnId);
|
||||||
authnRequest.setDestination(idpUrl);
|
authnRequest.setDestination(idpUrl);
|
||||||
authnRequest.setVersion(SAMLVersion.VERSION_20);
|
authnRequest.setVersion(SAMLVersion.VERSION_20);
|
||||||
authnRequest.setForceAuthn(false);
|
authnRequest.setForceAuthn(SAML2AuthManager.SAMLForceAuthn.value());
|
||||||
authnRequest.setIsPassive(false);
|
authnRequest.setIsPassive(false);
|
||||||
authnRequest.setIssueInstant(new DateTime());
|
authnRequest.setIssueInstant(new DateTime());
|
||||||
authnRequest.setProtocolBinding(SAMLConstants.SAML2_POST_BINDING_URI);
|
authnRequest.setProtocolBinding(SAMLConstants.SAML2_POST_BINDING_URI);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user