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 2019/12/05 13:07:12 UTC

[syncope] branch 2_1_X updated (7b22224 -> bccd626)

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

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


    from 7b22224  white noise: small cleanup
     new 8747c16  Upgrading Payara
     new bccd626  White noise

The 2 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:
 .../apache/syncope/core/logic/SAML2IdPLogic.java   |  3 +-
 .../apache/syncope/core/logic/SAML2SPLogic.java    | 17 +++++-----
 fit/core-reference/pom.xml                         | 16 ++-------
 src/main/asciidoc/getting-started/obtain.adoc      |  1 -
 .../getting-started/systemRequirements.adoc        |  1 -
 .../systemadministration/dbcp.adoc                 |  3 +-
 .../systemadministration/javaeecontainer.adoc      | 38 ++--------------------
 7 files changed, 15 insertions(+), 64 deletions(-)


[syncope] 02/02: White noise

Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bccd6261d32420014f6a4b67aa4af5809adea825
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Thu Dec 5 08:36:32 2019 +0100

    White noise
---
 .../org/apache/syncope/core/logic/SAML2IdPLogic.java    |  3 ++-
 .../org/apache/syncope/core/logic/SAML2SPLogic.java     | 17 ++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java
index ef9d2c5..53a3c8d 100644
--- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java
+++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2IdPLogic.java
@@ -45,6 +45,7 @@ import org.apache.syncope.core.persistence.api.entity.SAML2IdP;
 import org.apache.syncope.core.provisioning.api.data.SAML2IdPDataBinder;
 import org.apache.wss4j.common.saml.OpenSAMLUtil;
 import org.opensaml.saml.common.xml.SAMLConstants;
+import org.opensaml.saml.saml2.core.NameID;
 import org.opensaml.saml.saml2.metadata.EntitiesDescriptor;
 import org.opensaml.saml.saml2.metadata.EntityDescriptor;
 import org.opensaml.saml.saml2.metadata.IDPSSODescriptor;
@@ -164,7 +165,7 @@ public class SAML2IdPLogic extends AbstractSAML2Logic<SAML2IdPTO> {
 
             ItemTO connObjectKeyItem = new ItemTO();
             connObjectKeyItem.setIntAttrName("username");
-            connObjectKeyItem.setExtAttrName("NameID");
+            connObjectKeyItem.setExtAttrName(NameID.DEFAULT_ELEMENT_LOCAL_NAME);
             idpTO.setConnObjectKeyItem(connObjectKeyItem);
 
             SAML2IdPEntity idp = cache.put(idpEntityDescriptor, idpTO);
diff --git a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
index aca5d7a..814fa41 100644
--- a/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
+++ b/ext/saml2sp/logic/src/main/java/org/apache/syncope/core/logic/SAML2SPLogic.java
@@ -28,6 +28,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 import javax.annotation.Resource;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.Pair;
@@ -438,12 +439,12 @@ public class SAML2SPLogic extends AbstractSAML2Logic<EntityTO> {
         Assertion assertion = validatorResponse.getOpensamlAssertion();
         NameID nameID = assertion.getSubject().getNameID();
         if (nameID == null) {
-            throw new IllegalArgumentException("NameID not found");
+            throw new IllegalArgumentException(NameID.DEFAULT_ELEMENT_LOCAL_NAME + " not found");
         }
 
         String keyValue = null;
         if (StringUtils.isNotBlank(nameID.getValue())
-                && idp.getConnObjectKeyItem().getExtAttrName().equals("NameID")) {
+                && idp.getConnObjectKeyItem().getExtAttrName().equals(NameID.DEFAULT_ELEMENT_LOCAL_NAME)) {
 
             keyValue = nameID.getValue();
         }
@@ -472,13 +473,11 @@ public class SAML2SPLogic extends AbstractSAML2Logic<EntityTO> {
                         }
                     }
 
-                    AttrTO attrTO = new AttrTO();
-                    attrTO.setSchema(attrName);
-                    attr.getAttributeValues().stream().
-                            filter(value -> value.getDOM() != null).
-                            forEachOrdered(value -> {
-                                attrTO.getValues().add(value.getDOM().getTextContent());
-                            });
+                    AttrTO attrTO = new AttrTO.Builder().schema(attrName).
+                            values(attr.getAttributeValues().stream().
+                                    filter(value -> value.getDOM() != null).
+                                    map(value -> value.getDOM().getTextContent()).
+                                    collect(Collectors.toList())).build();
                     responseTO.getAttrs().add(attrTO);
                 }
             }


[syncope] 01/02: Upgrading Payara

Posted by il...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8747c1679155326a4ff2181fec5a8746baa00457
Author: Francesco Chicchiriccò <il...@apache.org>
AuthorDate: Thu Dec 5 08:36:19 2019 +0100

    Upgrading Payara
---
 fit/core-reference/pom.xml                         | 16 ++-------
 src/main/asciidoc/getting-started/obtain.adoc      |  1 -
 .../getting-started/systemRequirements.adoc        |  1 -
 .../systemadministration/dbcp.adoc                 |  3 +-
 .../systemadministration/javaeecontainer.adoc      | 38 ++--------------------
 5 files changed, 5 insertions(+), 54 deletions(-)

diff --git a/fit/core-reference/pom.xml b/fit/core-reference/pom.xml
index 79bfa42..384c79e 100644
--- a/fit/core-reference/pom.xml
+++ b/fit/core-reference/pom.xml
@@ -1499,18 +1499,6 @@ under the License.
 
       <dependencies>
         <dependency>
-          <groupId>org.apache.syncope.core</groupId>
-          <artifactId>syncope-core-persistence-jpa</artifactId>
-          <version>${project.version}</version>
-          <exclusions>
-            <exclusion>
-              <groupId>org.apache.bval</groupId>
-              <artifactId>bval-jsr</artifactId>
-            </exclusion>
-          </exclusions>
-        </dependency>
-
-        <dependency>
           <groupId>com.h2database</groupId>
           <artifactId>h2</artifactId>
         </dependency>
@@ -1526,9 +1514,9 @@ under the License.
             <inherited>true</inherited>
             <configuration>
               <container>
-                <containerId>glassfish5x</containerId>
+                <containerId>payara</containerId>
                 <zipUrlInstaller>
-                  <url>https://repo1.maven.org/maven2/fish/payara/distributions/payara/5.191/payara-5.191.zip</url>
+                  <url>https://repo1.maven.org/maven2/fish/payara/distributions/payara/5.194/payara-5.194.zip</url>
                   <downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
                   <extractDir>${project.build.directory}/cargo/extract</extractDir>
                 </zipUrlInstaller>
diff --git a/src/main/asciidoc/getting-started/obtain.adoc b/src/main/asciidoc/getting-started/obtain.adoc
index 75f9f2c..6f63ecb 100644
--- a/src/main/asciidoc/getting-started/obtain.adoc
+++ b/src/main/asciidoc/getting-started/obtain.adoc
@@ -202,7 +202,6 @@ The actual configuration steps vary significantly depending on the selected Java
 examples:
 
 . https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html[Apache Tomcat 9^]
-. https://javaeesquad.github.io/tutorials/glassfishDatasource/glassFishDatasource.html[Glassfish 5^]
 . https://payara.gitbooks.io/payara-server/content/documentation/user-guides/connection-pools/connection-pools.html[Payara Server 5^]
 . http://docs.wildfly.org/14/Admin_Guide.html#DataSource[Wildfly 14^]
 ====
diff --git a/src/main/asciidoc/getting-started/systemRequirements.adoc b/src/main/asciidoc/getting-started/systemRequirements.adoc
index d88f1fc..d5d745e 100644
--- a/src/main/asciidoc/getting-started/systemRequirements.adoc
+++ b/src/main/asciidoc/getting-started/systemRequirements.adoc
@@ -37,7 +37,6 @@ Apache Syncope {docVersion} requires the latest JDK 8 that is available.
 Apache Syncope {docVersion} is verified with the following Java EE containers:
 
  . http://tomcat.apache.org/download-90.cgi[Apache Tomcat 9^]
- . https://javaee.github.io/glassfish/[Glassfish 5^]
  . http://www.payara.fish/[Payara Server 5^]
  . http://www.wildfly.org/[Wildfly 14^]
 
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc
index 2d3a704..b507384 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/dbcp.adoc
@@ -32,6 +32,5 @@ for the Master domain.
 `java:comp/env/jdbc/syncopeMasterDataSource` for the Master domain. +
 Each JavaEE Container provides its own way to accomplish this task:
   * https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html[Apache Tomcat 9^]
-  * https://javaeesquad.github.io/tutorials/glassfishDatasource/glassFishDatasource.html[Glassfish^]
   * https://payara.gitbooks.io/payara-server/content/documentation/user-guides/connection-pools/connection-pools.html[Payara Server 5^]
-  * http://docs.wildfly.org/14/Admin_Guide.html#DataSource[Wildfly 14^]
\ No newline at end of file
+  * http://docs.wildfly.org/14/Admin_Guide.html#DataSource[Wildfly 14^]
diff --git a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
index a55bdf1..7099ba2 100644
--- a/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
+++ b/src/main/asciidoc/reference-guide/workingwithapachesyncope/systemadministration/javaeecontainer.adoc
@@ -58,41 +58,7 @@ domain and MySQL): please also check that the connection parameters are the same
 [CAUTION]
 Be sure to put the corresponding JDBC driver JAR file under `$CATALINA_HOME/lib` for each datasource defined.
 
-===== Glassfish 5 and Payara Server 5
-
-Replace
-
-[source,xml]
-....
-    <dependency>
-      <groupId>org.apache.syncope.core</groupId>
-      <artifactId>syncope-core-persistence-jpa</artifactId>
-    </dependency>
-....
-
-with
-
-[source,xml]
-....
-    <dependency>
-      <groupId>org.apache.syncope.core</groupId>
-      <artifactId>syncope-core-persistence-jpa</artifactId>
-      <version>${syncope.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.bval</groupId>
-          <artifactId>bval-jsr</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.hibernate.validator</groupId>
-      <artifactId>hibernate-validator</artifactId>
-      <version>6.0.11.Final</version>
-    </dependency>
-....
-
-in `core/pom.xml`.
+===== Payara Server 5
 
 When using a datasource for internal storage, be sure to add
 
@@ -104,7 +70,7 @@ When using a datasource for internal storage, be sure to add
 </resource-ref>
 ....
 
-right after `</context-root>` in `core/src/main/webapp/WEB-INF/glassfish-web.xml`, assuming that your Glassfish instance
+right after `</context-root>` in `core/src/main/webapp/WEB-INF/glassfish-web.xml`, assuming that your Payara Server instance
 provides a datasource named `jdbc/syncopeMasterDataSource`.
 
 [TIP]