Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.19'
Browse files Browse the repository at this point in the history
  • Loading branch information
rohityadavcloud committed Oct 16, 2024
2 parents f10d9fe + 4459772 commit 46201ee
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public interface SAML2AuthManager extends PluggableAPIAuthenticator, PluggableSe
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);

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", "",
"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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,6 @@ public ConfigKey<?>[] getConfigKeys() {
SAMLCloudStackRedirectionUrl, SAMLUserAttributeName,
SAMLIdentityProviderMetadataURL, SAMLDefaultIdentityProviderId,
SAMLSignatureAlgorithm, SAMLAppendDomainSuffix, SAMLTimeout, SAMLCheckSignature,
SAMLUserSessionKeyPathAttribute};
SAMLForceAuthn, SAMLUserSessionKeyPathAttribute};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public static AuthnRequest buildAuthnRequestObject(final String authnId, final S
authnRequest.setID(authnId);
authnRequest.setDestination(idpUrl);
authnRequest.setVersion(SAMLVersion.VERSION_20);
authnRequest.setForceAuthn(false);
authnRequest.setForceAuthn(SAML2AuthManager.SAMLForceAuthn.value());
authnRequest.setIsPassive(false);
authnRequest.setIssueInstant(new DateTime());
authnRequest.setProtocolBinding(SAMLConstants.SAML2_POST_BINDING_URI);
Expand Down
10 changes: 10 additions & 0 deletions ui/tests/unit/components/view/ActionButton.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ import mockData from '../../../mockData/ActionButton.mock.json'
import ActionButton from '@/components/view/ActionButton'

jest.mock('axios', () => mockAxios)
jest.mock('@/vue-app', () => ({
vueProps: {
$localStorage: {
set: jest.fn((key, value) => {}),
get: jest.fn((key) => {
return null
})
}
}
}))

let router, store, i18n
const state = {
Expand Down
10 changes: 10 additions & 0 deletions ui/tests/unit/views/compute/MigrateWizard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ import mockData from '../../../mockData/MigrateWizard.mock'
import MigrateWizard from '@/views/compute/MigrateWizard'

jest.mock('axios', () => mockAxios)
jest.mock('@/vue-app', () => ({
vueProps: {
$localStorage: {
set: jest.fn((key, value) => {}),
get: jest.fn((key) => {
return null
})
}
}
}))

let i18n
let store
Expand Down

0 comments on commit 46201ee

Please sign in to comment.