Skip to content

Commit 50b4e5b

Browse files
SamuelGaroilgrosso
authored andcommitted
[SYNCOPE-1917] bypassTrustedDeviceEnabled managed on WA (#1196)
1 parent cea6ecd commit 50b4e5b

File tree

10 files changed

+26
-1
lines changed

10 files changed

+26
-1
lines changed

client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ public AuthPolicyModalPanel(
104104
"bypassPrincipalAttributeValue",
105105
new PropertyModel<>(model.getObject().getConf(), "bypassPrincipalAttributeValue"),
106106
false));
107+
108+
add(new AjaxCheckBoxPanel(
109+
"bypassTrustedDeviceEnabled",
110+
"bypassTrustedDeviceEnabled",
111+
new PropertyModel<>(model.getObject().getConf(), "bypassTrustedDeviceEnabled"),
112+
false));
107113
}
108114

109115
@Override

client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,8 @@
3636
<div class="form-group">
3737
<span wicket:id="bypassPrincipalAttributeValue"/>
3838
</div>
39+
<div class="form-group">
40+
<span wicket:id="bypassTrustedDeviceEnabled"/>
41+
</div>
3942
</wicket:extend>
4043
</html>

client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ bypassEnabled=Enable Bypass
5858
forceMfaExecution=Force multifactor authentication
5959
bypassPrincipalAttributeName=Bypass Principal Attribute Name
6060
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
61+
bypassTrustedDeviceEnabled=Bypass Trusted Device

client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ bypassEnabled=Enable Bypass
5858
forceMfaExecution=Forcer l'authentification multifacteur
5959
bypassPrincipalAttributeName=Bypass Principal Attribute Name
6060
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
61+
bypassTrustedDeviceEnabled=Bypass Trusted Device

client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_it.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ bypassEnabled=Abilita Bypass
5858
forceMfaExecution=Forza l'autenticazione multifattore
5959
bypassPrincipalAttributeName=Bypass Nome Attributo
6060
bypassPrincipalAttributeValue=Bypass Valore Attributo
61+
bypassTrustedDeviceEnabled=Bypass Trusted Device

client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ja.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ bypassEnabled=Enable Bypass
5858
forceMfaExecution=\u591a\u8981\u7d20\u8a8d\u8a3c\u3092\u5f37\u5236\u3059\u308b
5959
bypassPrincipalAttributeName=Bypass Principal Attribute Name
6060
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
61-
61+
bypassTrustedDeviceEnabled=Bypass Trusted Device

client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_pt_BR.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ bypassEnabled=Enable Bypass
5858
forceMfaExecution=For\u00e7ar autentica\u00e7\u00e3o multifator
5959
bypassPrincipalAttributeName=Bypass Principal Attribute Name
6060
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
61+
bypassTrustedDeviceEnabled=Bypass Trusted Device

client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ru.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ bypassEnabled=Enable Bypass
5959
forceMfaExecution=\u041f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043d\u043e\u0433\u043e\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f
6060
bypassPrincipalAttributeName=Bypass Principal Attribute Name
6161
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
62+
bypassTrustedDeviceEnabled=Bypass Trusted Device

common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAuthPolicyConf.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class DefaultAuthPolicyConf implements AuthPolicyConf {
3737

3838
private String bypassPrincipalAttributeValue;
3939

40+
private boolean bypassTrustedDeviceEnabled = true;
41+
4042
private final List<String> authModules = new ArrayList<>();
4143

4244
public boolean isTryAll() {
@@ -79,6 +81,14 @@ public void setBypassPrincipalAttributeValue(final String bypassPrincipalAttribu
7981
this.bypassPrincipalAttributeValue = bypassPrincipalAttributeValue;
8082
}
8183

84+
public boolean isBypassTrustedDeviceEnabled() {
85+
return bypassTrustedDeviceEnabled;
86+
}
87+
88+
public void setBypassTrustedDeviceEnabled(final boolean bypassTrustedDeviceEnabled) {
89+
this.bypassTrustedDeviceEnabled = bypassTrustedDeviceEnabled;
90+
}
91+
8292
@JacksonXmlElementWrapper(localName = "authModules")
8393
@JacksonXmlProperty(localName = "authModule")
8494
public List<String> getAuthModules() {

wa/starter/src/main/java/org/apache/syncope/wa/starter/mapping/DefaultAuthMapper.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public AuthMapperResult build(
126126

127127
mfaPolicy.setForceExecution(policyConf.isForceMfaExecution());
128128
mfaPolicy.setMultifactorAuthenticationProviders(mfaProviders);
129+
mfaPolicy.setBypassTrustedDeviceEnabled(policyConf.isBypassTrustedDeviceEnabled());
129130
}
130131

131132
DefaultRegisteredServiceDelegatedAuthenticationPolicy delegatedAuthPolicy = null;

0 commit comments

Comments
 (0)