You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2021/05/11 07:34:20 UTC

[syncope] branch master updated (03a90b2 -> cb34368)

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

ilgrosso pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git.


    from 03a90b2  Upgrading jacoco-maven-plugin, Nimbus Jose JWT and Payara
     new da478e7  Upgrading Nimbus JOSE JWT
     new 87852ca  Fixing audit table settings with Docker and pgjsonb / myjson
     new cb34368  Upgrading CAS + fixing dependencies

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../resources/domains/Master.properties.myjson     |  2 +-
 .../resources/domains/Master.properties.pgjsonb    |  2 +-
 fit/wa-reference/src/main/webapp/WEB-INF/web.xml   |  3 ++
 pom.xml                                            | 44 +++++++++++++++++++++-
 wa/starter/pom.xml                                 | 14 +++++++
 .../syncope/wa/starter/SyncopeWAApplication.java   | 34 +++--------------
 .../SyncopeWAWebAuthnCredentialRepository.java     |  2 +-
 .../apache/syncope/wa/starter/AbstractTest.java    | 19 ++++------
 8 files changed, 75 insertions(+), 45 deletions(-)

[syncope] 02/03: Fixing audit table settings with Docker and pgjsonb / myjson

Posted by il...@apache.org.
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

commit 87852caf522bef8056e8b6bbbccaecf5472cc157
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon May 10 17:34:00 2021 +0200

    Fixing audit table settings with Docker and pgjsonb / myjson
---
 docker/core/src/main/resources/domains/Master.properties.myjson  | 2 +-
 docker/core/src/main/resources/domains/Master.properties.pgjsonb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docker/core/src/main/resources/domains/Master.properties.myjson b/docker/core/src/main/resources/domains/Master.properties.myjson
index 96430ad..958fd2e 100644
--- a/docker/core/src/main/resources/domains/Master.properties.myjson
+++ b/docker/core/src/main/resources/domains/Master.properties.myjson
@@ -25,4 +25,4 @@ Master.orm=META-INF/spring-orm-myjson.xml
 Master.pool.maxActive=${DB_POOL_MAX}
 Master.pool.minIdle=${DB_POOL_MIN}
 
-Master.audit.sql=audit_mysql_innodb.sql
+Master.audit.sql=audit_myjson.sql
diff --git a/docker/core/src/main/resources/domains/Master.properties.pgjsonb b/docker/core/src/main/resources/domains/Master.properties.pgjsonb
index 2f50013..8cb007d 100644
--- a/docker/core/src/main/resources/domains/Master.properties.pgjsonb
+++ b/docker/core/src/main/resources/domains/Master.properties.pgjsonb
@@ -25,4 +25,4 @@ Master.orm=META-INF/spring-orm-pgjsonb.xml
 Master.pool.maxActive=${DB_POOL_MAX}
 Master.pool.minIdle=${DB_POOL_MIN}
 
-Master.audit.sql=audit.sql
+Master.audit.sql=audit_pgjsonb.sql

[syncope] 03/03: Upgrading CAS + fixing dependencies

Posted by il...@apache.org.
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

commit cb34368513af1912152851192fa6e9cb38d00896
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Tue May 11 09:34:00 2021 +0200

    Upgrading CAS + fixing dependencies
---
 fit/wa-reference/src/main/webapp/WEB-INF/web.xml   |  3 ++
 pom.xml                                            | 42 +++++++++++++++++++++-
 wa/starter/pom.xml                                 | 14 ++++++++
 .../syncope/wa/starter/SyncopeWAApplication.java   | 34 +++---------------
 .../SyncopeWAWebAuthnCredentialRepository.java     |  2 +-
 .../apache/syncope/wa/starter/AbstractTest.java    | 19 +++++-----
 6 files changed, 72 insertions(+), 42 deletions(-)

diff --git a/fit/wa-reference/src/main/webapp/WEB-INF/web.xml b/fit/wa-reference/src/main/webapp/WEB-INF/web.xml
index 34b536e..ff8ca74 100644
--- a/fit/wa-reference/src/main/webapp/WEB-INF/web.xml
+++ b/fit/wa-reference/src/main/webapp/WEB-INF/web.xml
@@ -26,4 +26,7 @@ under the License.
 
   <display-name>Apache Syncope ${syncope.version} WA</display-name>
 
+  <session-config>
+    <tracking-mode>COOKIE</tracking-mode>
+  </session-config>
 </web-app>
diff --git a/pom.xml b/pom.xml
index 3bd02f2..7b31e09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -451,7 +451,7 @@ under the License.
 
     <pac4j.version>5.0.1</pac4j.version>
 
-    <cas.version>6.4.0-SNAPSHOT</cas.version>
+    <cas.version>6.4.0-RC4</cas.version>
     <cas-client.version>3.6.2</cas-client.version>
 
     <h2.version>1.4.200</h2.version>
@@ -1653,6 +1653,18 @@ under the License.
             <groupId>org.glassfish.jersey.containers</groupId>
             <artifactId>jersey-container-servlet-core</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>com.yubico</groupId>
+            <artifactId>webauthn-server-core</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>com.yubico</groupId>
+            <artifactId>webauthn-server-attestation</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>com.yubico</groupId>
+            <artifactId>yubico-util</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
       <dependency>
@@ -1676,8 +1688,36 @@ under the License.
             <groupId>com.google.code.findbugs</groupId>
             <artifactId>jsr305</artifactId>
           </exclusion>
+          <exclusion>
+            <groupId>com.yubico</groupId>
+            <artifactId>webauthn-server-core</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>com.yubico</groupId>
+            <artifactId>webauthn-server-attestation</artifactId>
+          </exclusion>
+          <exclusion>
+            <groupId>com.yubico</groupId>
+            <artifactId>yubico-util</artifactId>
+          </exclusion>
         </exclusions>
       </dependency>
+      <!-- TMP until CAS 6.4.0-RC5 -->
+      <dependency>
+        <groupId>com.yubico</groupId>
+        <artifactId>webauthn-server-core</artifactId>
+        <version>1.9.1-RC2</version>
+      </dependency>
+      <dependency>
+        <groupId>com.yubico</groupId>
+        <artifactId>webauthn-server-attestation</artifactId>
+        <version>1.9.1-RC2</version>
+      </dependency>
+      <dependency>
+        <groupId>com.yubico</groupId>
+        <artifactId>yubico-util</artifactId>
+        <version>1.9.1-RC2</version>
+      </dependency>      
       <dependency>
         <groupId>org.apereo.cas</groupId>
         <artifactId>cas-server-support-gauth</artifactId>
diff --git a/wa/starter/pom.xml b/wa/starter/pom.xml
index 65fd2a9..09defb8 100644
--- a/wa/starter/pom.xml
+++ b/wa/starter/pom.xml
@@ -218,6 +218,7 @@ under the License.
       <groupId>org.apereo.cas</groupId>
       <artifactId>cas-server-support-aup-webflow</artifactId>
     </dependency>
+
     <dependency>
       <groupId>org.apereo.cas</groupId>
       <artifactId>cas-server-support-webauthn</artifactId>
@@ -226,6 +227,19 @@ under the License.
       <groupId>org.apereo.cas</groupId>
       <artifactId>cas-server-support-webauthn-core</artifactId>
     </dependency>
+    <!-- TMP until CAS 6.4.0-RC5 -->
+    <dependency>
+      <groupId>com.yubico</groupId>
+      <artifactId>webauthn-server-core</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.yubico</groupId>
+      <artifactId>webauthn-server-attestation</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.yubico</groupId>
+      <artifactId>yubico-util</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.apereo.cas</groupId>
       <artifactId>cas-server-support-u2f</artifactId>
diff --git a/wa/starter/src/main/java/org/apache/syncope/wa/starter/SyncopeWAApplication.java b/wa/starter/src/main/java/org/apache/syncope/wa/starter/SyncopeWAApplication.java
index 7aa8a93..a181c47 100644
--- a/wa/starter/src/main/java/org/apache/syncope/wa/starter/SyncopeWAApplication.java
+++ b/wa/starter/src/main/java/org/apache/syncope/wa/starter/SyncopeWAApplication.java
@@ -18,10 +18,12 @@
  */
 package org.apache.syncope.wa.starter;
 
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.Date;
+import org.apache.syncope.wa.starter.config.SyncopeWARefreshContextJob;
 import org.apereo.cas.configuration.CasConfigurationProperties;
 import org.apereo.cas.configuration.CasConfigurationPropertiesValidator;
-
-import org.apache.syncope.wa.starter.config.SyncopeWARefreshContextJob;
 import org.quartz.JobBuilder;
 import org.quartz.JobDetail;
 import org.quartz.JobKey;
@@ -45,12 +47,10 @@ import org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration;
 import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
 import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
-import org.springframework.boot.autoconfigure.web.ServerProperties;
 import org.springframework.boot.builder.SpringApplicationBuilder;
 import org.springframework.boot.context.event.ApplicationReadyEvent;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.event.EventListener;
@@ -58,15 +58,6 @@ import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.quartz.SchedulerFactoryBean;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
-import org.springframework.web.WebApplicationInitializer;
-
-import javax.servlet.SessionTrackingMode;
-
-import java.time.LocalDateTime;
-import java.time.ZoneId;
-import java.util.Date;
-import java.util.Set;
-import java.util.stream.Collectors;
 
 @PropertySource("classpath:wa.properties")
 @PropertySource(value = "file:${conf.directory}/wa.properties", ignoreResourceNotFound = true)
@@ -84,7 +75,7 @@ import java.util.stream.Collectors;
     DataSourceTransactionManagerAutoConfiguration.class,
     RedisRepositoriesAutoConfiguration.class
 })
-@EnableConfigurationProperties({CasConfigurationProperties.class, ServerProperties.class})
+@EnableConfigurationProperties({ CasConfigurationProperties.class })
 @EnableAsync
 @EnableAspectJAutoProxy(proxyTargetClass = true)
 @EnableTransactionManagement(proxyTargetClass = true)
@@ -96,9 +87,6 @@ public class SyncopeWAApplication extends SpringBootServletInitializer {
     @Autowired
     private SchedulerFactoryBean scheduler;
 
-    @Autowired
-    private ServerProperties serverProperties;
-
     @Value("${contextRefreshDelay:15}")
     private long contextRefreshDelay;
 
@@ -121,18 +109,6 @@ public class SyncopeWAApplication extends SpringBootServletInitializer {
         scheduleJobToRefreshContext();
     }
 
-    @Bean
-    public WebApplicationInitializer syncopeWebApplicationInitializer() {
-        return servletContext -> {
-            Set<SessionTrackingMode> trackingModes = serverProperties.getServlet().getSession().getTrackingModes().
-                stream().
-                map(mode -> SessionTrackingMode.valueOf(mode.name())).
-                collect(Collectors.toSet());
-            servletContext.setSessionTrackingModes(trackingModes);
-            LOG.debug("Set session tracking modes to {}", trackingModes);
-        };
-    }
-
     private void scheduleJobToRefreshContext() {
         try {
             Date date = Date.from(LocalDateTime.now().plusSeconds(this.contextRefreshDelay).
diff --git a/wa/starter/src/main/java/org/apache/syncope/wa/starter/webauthn/SyncopeWAWebAuthnCredentialRepository.java b/wa/starter/src/main/java/org/apache/syncope/wa/starter/webauthn/SyncopeWAWebAuthnCredentialRepository.java
index 4639edd..52aab5c 100644
--- a/wa/starter/src/main/java/org/apache/syncope/wa/starter/webauthn/SyncopeWAWebAuthnCredentialRepository.java
+++ b/wa/starter/src/main/java/org/apache/syncope/wa/starter/webauthn/SyncopeWAWebAuthnCredentialRepository.java
@@ -65,7 +65,7 @@ public class SyncopeWAWebAuthnCredentialRepository extends BaseWebAuthnCredentia
     }
 
     @Override
-    protected Stream<CredentialRegistration> load() {
+    public Stream<? extends CredentialRegistration> stream() {
         return getService().list().
                 stream().
                 map(WebAuthnAccount::getCredentials).
diff --git a/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java b/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java
index 79284d7..7c4b798 100644
--- a/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java
+++ b/wa/starter/src/test/java/org/apache/syncope/wa/starter/AbstractTest.java
@@ -19,9 +19,6 @@
 package org.apache.syncope.wa.starter;
 
 import java.util.UUID;
-
-import org.springframework.boot.autoconfigure.web.ServerProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.TestConfiguration;
 import org.springframework.boot.web.server.LocalServerPort;
@@ -30,15 +27,14 @@ import org.springframework.context.annotation.ComponentScan;
 import org.springframework.test.context.ContextConfiguration;
 
 @SpringBootTest(
-    classes = AbstractTest.SyncopeTestConfiguration.class,
-    webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
-    properties = {
-        "cas.authn.accept.users=mrossi::password",
-        "cas.authn.syncope.url=http://localhost:8080",
-        "cas.sso.allow-missing-service-parameter=true"
-})
+        classes = AbstractTest.SyncopeTestConfiguration.class,
+        webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
+        properties = {
+            "cas.authn.accept.users=mrossi::password",
+            "cas.authn.syncope.url=http://localhost:8080",
+            "cas.sso.allow-missing-service-parameter=true"
+        })
 @ContextConfiguration(initializers = ZookeeperTestingServer.class)
-@EnableConfigurationProperties(ServerProperties.class)
 public abstract class AbstractTest {
 
     @LocalServerPort
@@ -51,6 +47,7 @@ public abstract class AbstractTest {
     @TestConfiguration
     @ComponentScan("org.apache.syncope.wa.starter")
     public static class SyncopeTestConfiguration {
+
         @Bean
         public SyncopeCoreTestingServer syncopeCoreTestingServer() {
             return new SyncopeCoreTestingServer();

[syncope] 01/03: Upgrading Nimbus JOSE JWT

Posted by il...@apache.org.
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

commit da478e7264abdd3eec506af5ab5b8207465f0b90
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Mon May 10 17:31:39 2021 +0200

    Upgrading Nimbus JOSE JWT
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b91e2fc..3bd02f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -406,7 +406,7 @@ under the License.
 
     <cxf.version>3.4.3</cxf.version>
     <bouncycastle.version>1.68</bouncycastle.version>
-    <nimbus-jose-jwt.version>9.9.2</nimbus-jose-jwt.version>
+    <nimbus-jose-jwt.version>9.9.3</nimbus-jose-jwt.version>
 
     <jackson.version>2.12.3</jackson.version>