This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch 4_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/4_0_X by this push:
     new e3dd730865 [SYNCOPE-1890] Setting maxRetryAttempts for Syncope auth 
module (#1119)
e3dd730865 is described below

commit e3dd7308654926c3e8c8d30e92fcb9d23b53e691
Author: alberto bogi <[email protected]>
AuthorDate: Tue Jul 1 11:43:21 2025 +0200

    [SYNCOPE-1890] Setting maxRetryAttempts for Syncope auth module (#1119)
    
    Co-authored-by: alberto bogi <[email protected]>
---
 .../apache/syncope/common/lib/auth/SyncopeAuthModuleConf.java  | 10 ++++++++++
 fit/wa-reference/src/main/resources/wa-embedded.properties     |  2 ++
 pom.xml                                                        |  2 +-
 .../wa/bootstrap/mapping/AuthModulePropertySourceMapper.java   |  1 +
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git 
a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/SyncopeAuthModuleConf.java
 
b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/SyncopeAuthModuleConf.java
index 6f565d974e..77ec530ce5 100644
--- 
a/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/SyncopeAuthModuleConf.java
+++ 
b/common/am/lib/src/main/java/org/apache/syncope/common/lib/auth/SyncopeAuthModuleConf.java
@@ -39,6 +39,8 @@ public class SyncopeAuthModuleConf implements AuthModuleConf {
      */
     private String credentialCriteria;
 
+    private int maxRetryAttempts = 1;
+
     public String getDomain() {
         return domain;
     }
@@ -55,6 +57,14 @@ public class SyncopeAuthModuleConf implements AuthModuleConf 
{
         this.credentialCriteria = credentialCriteria;
     }
 
+    public int getMaxRetryAttempts() {
+        return maxRetryAttempts;
+    }
+
+    public void setMaxRetryAttempts(final int maxRetryAttempts) {
+        this.maxRetryAttempts = maxRetryAttempts;
+    }
+
     @Override
     public Map<String, Object> map(final AuthModuleTO authModule, final Mapper 
mapper) {
         return mapper.map(authModule, this);
diff --git a/fit/wa-reference/src/main/resources/wa-embedded.properties 
b/fit/wa-reference/src/main/resources/wa-embedded.properties
index bf4c180d9f..35c7c8b939 100644
--- a/fit/wa-reference/src/main/resources/wa-embedded.properties
+++ b/fit/wa-reference/src/main/resources/wa-embedded.properties
@@ -36,6 +36,8 @@ service.discovery.address=https://localhost:9443/syncope-wa/
 # registered Spring MVC handler mappings
 spring.mvc.pathmatch.matching-strategy=ant-path-matcher
 
+cas.http-client.allow-local-urls=true
+
 
cas.tgc.crypto.signing.key=GBFdLSLDY0V-a9bc0anJZqygsxYUNPUU80XM6pSKTUjRc_qm7LQQ73m5f0QWidfM_xyymg1L2suMhoFsst4XwQ
 
cas.tgc.crypto.encryption.key=mW6lMvsSo48eZ1Ntt74a-O9jjQQQ_OLUE24RVN2_A_sPX43mpBM5FPuf205Wxae6mWZqmPBRA46RKZWNcM5xaQ
 
diff --git a/pom.xml b/pom.xml
index d09d33622e..e12cef956c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -443,7 +443,7 @@ under the License.
 
     <pac4j.version>6.1.1</pac4j.version>
 
-    <cas.version>7.2.4</cas.version>
+    <cas.version>7.2.5-SNAPSHOT</cas.version>
     <cas-client.version>4.0.4</cas-client.version>
 
     <swagger-core.version>2.2.34</swagger-core.version>
diff --git 
a/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/mapping/AuthModulePropertySourceMapper.java
 
b/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/mapping/AuthModulePropertySourceMapper.java
index 0add168ac6..df1d4a1e07 100644
--- 
a/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/mapping/AuthModulePropertySourceMapper.java
+++ 
b/wa/bootstrap/src/main/java/org/apache/syncope/wa/bootstrap/mapping/AuthModulePropertySourceMapper.java
@@ -392,6 +392,7 @@ public class AuthModulePropertySourceMapper extends 
PropertySourceMapper impleme
         props.setAttributeMappings(authModuleTO.getItems().stream().
                 collect(Collectors.toMap(Item::getIntAttrName, 
Item::getExtAttrName)));
         props.setCredentialCriteria(conf.getCredentialCriteria());
+        props.setMaxRetryAttempts(Math.max(conf.getMaxRetryAttempts(), 1));
 
         return prefix("cas.authn.syncope.", WAConfUtils.asMap(props));
     }

Reply via email to