Skip to content

Commit

Permalink
Merge pull request #21116 from Thisara-Welmilla/add-auth-prop
Browse files Browse the repository at this point in the history
Update application app xml files.
  • Loading branch information
Thisara-Welmilla committed Sep 17, 2024
2 parents 358cf42 + aa4cd0c commit 6dbdfb0
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,19 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basicauth</DisplayName>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
<!-- FederatedIdentityProviders>
<IdentityProvider>
<IdentityProviderName>facebook</IdentityProviderName>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<DefaultAuthenticatorConfig>
<FederatedAuthenticatorConfig>
<Name>FacebookAuthenticator</Name>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
</FederatedAuthenticatorConfig>
</DefaultAuthenticatorConfig>
</IdentityProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<Alias>secondaryIS</Alias>
<IsPrimary>true</IsPrimary>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<FederatedAuthenticatorConfigs>
<saml2>
<Name>SAMLSSOAuthenticator</Name>
<DisplayName>samlsso</DisplayName>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties>
<property>
<Name>IdpEntityId</Name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
<IdentityProvider>
<IdentityProviderName>secondaryIS</IdentityProviderName>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<FederatedAuthenticatorConfigs>
<FederatedAuthenticatorConfig>
<Name>SAMLSSOAuthenticator</Name>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
</FederatedAuthenticatorConfig>
</FederatedAuthenticatorConfigs>
<DefaultAuthenticatorConfig>SAMLSSOAuthenticator</DefaultAuthenticatorConfig>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basicauth</DisplayName>
<IsEnabled>true</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Name>BasicAusssthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -21,12 +22,14 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
<LocalAuthenticatorConfig>
<Name>FIDOAuthesssnticator</Name>
<DisplayName>fido</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -79,12 +80,14 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
<LocalAuthenticatorConfig>
<Name>FIDOAuthenticator</Name>
<DisplayName>fido</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -100,41 +103,43 @@
<UseUserstoreDomainInRoles>true</UseUserstoreDomainInRoles>
<UseUserstoreDomainInUsername>true</UseUserstoreDomainInUsername>
<EnableAuthorization>true</EnableAuthorization>
<AuthenticationScript enabled="true" language="application/javascript"><![CDATA[
// Role-Based from Template...
// This script will step up authentication for any user belonging
// to one of the given roles
// If the user has any of the below roles, authentication will be stepped up
var rolesToStepUp = ['admin', 'manager'];
function onLoginRequest(context) {
executeStep(1, {
onSuccess: function (context) {
// Extracting authenticated subject from the first step
var user = context.currentKnownSubject;
// Checking if the user is assigned to one of the given roles
var hasRole = hasAnyOfTheRoles(user, rolesToStepUp);
if (hasRole) {
Log.info(user.username + ' Has one of Roles: ' + rolesToStepUp.toString());
executeStep(2);
}
}
});
}
// End of Role-Based.......
<AuthenticationScript enabled="true" language="application/javascript"><![CDATA[
// Role-Based from Template...
// This script will step up authentication for any user belonging
// to one of the given roles
// If the user has any of the below roles, authentication will be stepped up
var rolesToStepUp = ['admin', 'manager'];
function onLoginRequest(context) {
executeStep(1, {
onSuccess: function (context) {
// Extracting authenticated subject from the first step
var user = context.currentKnownSubject;
// Checking if the user is assigned to one of the given roles
var hasRole = hasAnyOfTheRoles(user, rolesToStepUp);
if (hasRole) {
Log.info(user.username + ' Has one of Roles: ' + rolesToStepUp.toString());
executeStep(2);
}
}
});
}
// End of Role-Based.......
]]></AuthenticationScript>
</LocalAndOutBoundAuthenticationConfig>
<RequestPathAuthenticatorConfigs>
<RequestPathAuthenticatorConfig>
<Name>OAuthRequestPathAuthenticator</Name>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</RequestPathAuthenticatorConfig>
<RequestPathAuthenticatorConfig>
<Name>BasicAuthRequestPathAuthenticator</Name>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</RequestPathAuthenticatorConfig>
</RequestPathAuthenticatorConfigs>
Expand All @@ -154,6 +159,7 @@ function onLoginRequest(context) {
<IsPrimary>false</IsPrimary>
<IsFederationHub>false</IsFederationHub>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<FederatedAuthenticatorConfigs/>
<ProvisioningConnectorConfigs/>
<DefaultProvisioningConnectorConfig>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -21,6 +22,7 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -21,6 +22,7 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -120,6 +121,7 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basicauth</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -22,6 +23,7 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Name>BasicAusssthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -22,12 +23,14 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
<LocalAuthenticatorConfig>
<Name>FIDOAuthesssnticator</Name>
<DisplayName>fido</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down Expand Up @@ -73,11 +76,13 @@ function onLoginRequest(context) {
<RequestPathAuthenticatorConfig>
<Name>OAuthRequestPathAuthesssnticator</Name>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</RequestPathAuthenticatorConfig>
<RequestPathAuthenticatorConfig>
<Name>BasicAuthRequestPathAuthsssenticator</Name>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</RequestPathAuthenticatorConfig>
</RequestPathAuthenticatorConfigs>
Expand All @@ -97,6 +102,7 @@ function onLoginRequest(context) {
<IsPrimary>false</IsPrimary>
<IsFederationHub>false</IsFederationHub>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<FederatedAuthenticatorConfigs/>
<ProvisioningConnectorConfigs/>
<DefaultProvisioningConnectorConfig>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Name>BasicAuthenticator</Name>
<DisplayName>basic</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand All @@ -22,12 +23,14 @@
<Name>totp</Name>
<DisplayName>totp</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
<LocalAuthenticatorConfig>
<Name>FIDOAuthenticator</Name>
<DisplayName>fido</DisplayName>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</LocalAuthenticatorConfig>
</LocalAuthenticatorConfigs>
Expand Down Expand Up @@ -73,11 +76,13 @@ function onLoginRequest(context) {
<RequestPathAuthenticatorConfig>
<Name>OAuthRequestPathAuthenticator</Name>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</RequestPathAuthenticatorConfig>
<RequestPathAuthenticatorConfig>
<Name>BasicAuthRequestPathAuthenticator</Name>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<Properties/>
</RequestPathAuthenticatorConfig>
</RequestPathAuthenticatorConfigs>
Expand All @@ -97,6 +102,7 @@ function onLoginRequest(context) {
<IsPrimary>false</IsPrimary>
<IsFederationHub>false</IsFederationHub>
<IsEnabled>false</IsEnabled>
<DefinedBy>SYSTEM</DefinedBy>
<FederatedAuthenticatorConfigs/>
<ProvisioningConnectorConfigs/>
<DefaultProvisioningConnectorConfig>
Expand Down

0 comments on commit 6dbdfb0

Please sign in to comment.