This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/master by this push:
new 50b4e5b3e9 [SYNCOPE-1917] bypassTrustedDeviceEnabled managed on WA
(#1196)
50b4e5b3e9 is described below
commit 50b4e5b3e919c1de22e38a31b6d183f54a418df6
Author: Samuel Garofalo <[email protected]>
AuthorDate: Thu Sep 25 16:08:06 2025 +0200
[SYNCOPE-1917] bypassTrustedDeviceEnabled managed on WA (#1196)
---
.../syncope/client/console/policies/AuthPolicyModalPanel.java | 6 ++++++
.../syncope/client/console/policies/AuthPolicyModalPanel.html | 3 +++
.../client/console/policies/PolicyDirectoryPanel.properties | 1 +
.../console/policies/PolicyDirectoryPanel_fr_CA.properties | 1 +
.../client/console/policies/PolicyDirectoryPanel_it.properties | 1 +
.../client/console/policies/PolicyDirectoryPanel_ja.properties | 2 +-
.../console/policies/PolicyDirectoryPanel_pt_BR.properties | 1 +
.../client/console/policies/PolicyDirectoryPanel_ru.properties | 1 +
.../syncope/common/lib/policy/DefaultAuthPolicyConf.java | 10 ++++++++++
.../apache/syncope/wa/starter/mapping/DefaultAuthMapper.java | 1 +
10 files changed, 26 insertions(+), 1 deletion(-)
diff --git
a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java
b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java
index d1bc313fd0..e4edc93d09 100644
---
a/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java
+++
b/client/am/console/src/main/java/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.java
@@ -104,6 +104,12 @@ public class AuthPolicyModalPanel extends
AbstractModalPanel<AuthPolicyTO> {
"bypassPrincipalAttributeValue",
new PropertyModel<>(model.getObject().getConf(),
"bypassPrincipalAttributeValue"),
false));
+
+ add(new AjaxCheckBoxPanel(
+ "bypassTrustedDeviceEnabled",
+ "bypassTrustedDeviceEnabled",
+ new PropertyModel<>(model.getObject().getConf(),
"bypassTrustedDeviceEnabled"),
+ false));
}
@Override
diff --git
a/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html
b/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html
index b5923fc5df..e02ca5f7b0 100644
---
a/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html
+++
b/client/am/console/src/main/resources/org/apache/syncope/client/console/policies/AuthPolicyModalPanel.html
@@ -36,5 +36,8 @@ under the License.
<div class="form-group">
<span wicket:id="bypassPrincipalAttributeValue"/>
</div>
+ <div class="form-group">
+ <span wicket:id="bypassTrustedDeviceEnabled"/>
+ </div>
</wicket:extend>
</html>
diff --git
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties
index 8cb20ac820..be8e092107 100644
---
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties
+++
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel.properties
@@ -58,3 +58,4 @@ bypassEnabled=Enable Bypass
forceMfaExecution=Force multifactor authentication
bypassPrincipalAttributeName=Bypass Principal Attribute Name
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
+bypassTrustedDeviceEnabled=Bypass Trusted Device
diff --git
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properties
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properties
index 57e73fe60b..64dbe7051c 100644
---
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properties
+++
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_fr_CA.properties
@@ -58,3 +58,4 @@ bypassEnabled=Enable Bypass
forceMfaExecution=Forcer l'authentification multifacteur
bypassPrincipalAttributeName=Bypass Principal Attribute Name
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
+bypassTrustedDeviceEnabled=Bypass Trusted Device
diff --git
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_it.properties
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_it.properties
index e2f7c53272..e8ed83957e 100644
---
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_it.properties
+++
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_it.properties
@@ -58,3 +58,4 @@ bypassEnabled=Abilita Bypass
forceMfaExecution=Forza l'autenticazione multifattore
bypassPrincipalAttributeName=Bypass Nome Attributo
bypassPrincipalAttributeValue=Bypass Valore Attributo
+bypassTrustedDeviceEnabled=Bypass Trusted Device
diff --git
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ja.properties
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ja.properties
index 860cc40a22..7091e17593 100644
---
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ja.properties
+++
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ja.properties
@@ -58,4 +58,4 @@ bypassEnabled=Enable Bypass
forceMfaExecution=\u591a\u8981\u7d20\u8a8d\u8a3c\u3092\u5f37\u5236\u3059\u308b
bypassPrincipalAttributeName=Bypass Principal Attribute Name
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
-
+bypassTrustedDeviceEnabled=Bypass Trusted Device
diff --git
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_pt_BR.properties
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_pt_BR.properties
index 1e5471a0e2..6d67750db5 100644
---
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_pt_BR.properties
+++
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_pt_BR.properties
@@ -58,3 +58,4 @@ bypassEnabled=Enable Bypass
forceMfaExecution=For\u00e7ar autentica\u00e7\u00e3o multifator
bypassPrincipalAttributeName=Bypass Principal Attribute Name
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
+bypassTrustedDeviceEnabled=Bypass Trusted Device
diff --git
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ru.properties
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ru.properties
index a3c2c698af..60a0530fd7 100644
---
a/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ru.properties
+++
b/client/idrepo/console/src/main/resources/org/apache/syncope/client/console/policies/PolicyDirectoryPanel_ru.properties
@@ -59,3 +59,4 @@ bypassEnabled=Enable Bypass
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
bypassPrincipalAttributeName=Bypass Principal Attribute Name
bypassPrincipalAttributeValue=Bypass Principal Attribute Value
+bypassTrustedDeviceEnabled=Bypass Trusted Device
diff --git
a/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAuthPolicyConf.java
b/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAuthPolicyConf.java
index 0d0584f748..0398171f7d 100644
---
a/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAuthPolicyConf.java
+++
b/common/am/lib/src/main/java/org/apache/syncope/common/lib/policy/DefaultAuthPolicyConf.java
@@ -37,6 +37,8 @@ public class DefaultAuthPolicyConf implements AuthPolicyConf {
private String bypassPrincipalAttributeValue;
+ private boolean bypassTrustedDeviceEnabled = true;
+
private final List<String> authModules = new ArrayList<>();
public boolean isTryAll() {
@@ -79,6 +81,14 @@ public class DefaultAuthPolicyConf implements AuthPolicyConf
{
this.bypassPrincipalAttributeValue = bypassPrincipalAttributeValue;
}
+ public boolean isBypassTrustedDeviceEnabled() {
+ return bypassTrustedDeviceEnabled;
+ }
+
+ public void setBypassTrustedDeviceEnabled(final boolean
bypassTrustedDeviceEnabled) {
+ this.bypassTrustedDeviceEnabled = bypassTrustedDeviceEnabled;
+ }
+
@JacksonXmlElementWrapper(localName = "authModules")
@JacksonXmlProperty(localName = "authModule")
public List<String> getAuthModules() {
diff --git
a/wa/starter/src/main/java/org/apache/syncope/wa/starter/mapping/DefaultAuthMapper.java
b/wa/starter/src/main/java/org/apache/syncope/wa/starter/mapping/DefaultAuthMapper.java
index 60adf1ecaa..ea1f657191 100644
---
a/wa/starter/src/main/java/org/apache/syncope/wa/starter/mapping/DefaultAuthMapper.java
+++
b/wa/starter/src/main/java/org/apache/syncope/wa/starter/mapping/DefaultAuthMapper.java
@@ -126,6 +126,7 @@ public class DefaultAuthMapper implements AuthMapper {
mfaPolicy.setForceExecution(policyConf.isForceMfaExecution());
mfaPolicy.setMultifactorAuthenticationProviders(mfaProviders);
+
mfaPolicy.setBypassTrustedDeviceEnabled(policyConf.isBypassTrustedDeviceEnabled());
}
DefaultRegisteredServiceDelegatedAuthenticationPolicy
delegatedAuthPolicy = null;