You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2020/02/19 10:18:32 UTC

[cxf-fediz] 02/02: fediz-systests-oidc: sync idp configuration

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

buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf-fediz.git

commit 0260eaadc6b8d6a1986abdd6eca42e49b290060c
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Wed Feb 19 13:17:52 2020 +0300

    fediz-systests-oidc: sync idp configuration
---
 .../idp/src/main/resources/entities-realma.xml     | 10 +++----
 .../cxf/fediz/systests/oidc/AbstractOIDCTest.java  |  4 +--
 .../src/test/resources/realma/entities-realma.xml  | 35 +++++++++++++++-------
 3 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/services/idp/src/main/resources/entities-realma.xml b/services/idp/src/main/resources/entities-realma.xml
index 2a9c3d6..a2a2aea 100644
--- a/services/idp/src/main/resources/entities-realma.xml
+++ b/services/idp/src/main/resources/entities-realma.xml
@@ -66,7 +66,7 @@
         <property name="applications">
             <util:list>
                 <ref bean="srv-fedizhelloworld" />
-				<ref bean="srv-oidc" />
+                <ref bean="srv-oidc" />
             </util:list>
         </property>
         <property name="trustedIdps">
@@ -108,8 +108,8 @@
         <property name="passiveRequestorEndpointConstraint" value="https://localhost:?(\d)*/.*" />
         <property name="logoutEndpointConstraint" value="https://localhost:?(\d)*/.*" />
     </bean>
-	
-	<bean id="srv-oidc" class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationEntity">
+
+    <bean id="srv-oidc" class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationEntity">
         <property name="realm" value="urn:org:apache:cxf:fediz:oidc" />
         <property name="protocol" value="http://docs.oasis-open.org/wsfed/federation/200706" />
         <property name="serviceDisplayName" value="OIDC Provider" />
@@ -141,12 +141,12 @@
         <property name="claim" ref="claim_email" />
         <property name="optional" value="false" />
     </bean>
-    
     <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
         <property name="application" ref="srv-oidc" />
         <property name="claim" ref="claim_role" />
         <property name="optional" value="false" />
     </bean>
+
     <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
         <property name="application" ref="srv-oidc" />
         <property name="claim" ref="claim_givenname" />
@@ -162,7 +162,7 @@
         <property name="claim" ref="claim_email" />
         <property name="optional" value="false" />
     </bean>
-    
+
     <bean id="claim_role"
         class="org.apache.cxf.fediz.service.idp.service.jpa.ClaimEntity">
         <property name="claimType"
diff --git a/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/AbstractOIDCTest.java b/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/AbstractOIDCTest.java
index f419de7..21d53a8 100644
--- a/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/AbstractOIDCTest.java
+++ b/systests/oidc/src/test/java/org/apache/cxf/fediz/systests/oidc/AbstractOIDCTest.java
@@ -96,9 +96,9 @@ abstract class AbstractOIDCTest {
     private static final Integer RP_HTTPS_PORT = Integer.getInteger("rp.https.port");
 
     private static final String CALLBACK_CONTEXT = "/callback";
-    private static final String REDIRECT_URL = "https://127.0.0.1:" + RP_HTTPS_PORT + CALLBACK_CONTEXT;
+    private static final String REDIRECT_URL = "https://localhost:" + RP_HTTPS_PORT + CALLBACK_CONTEXT;
     private static final String LOGOUT_CONTEXT = "/logout";
-    private static final String LOGOUT_URL = "https://127.0.0.1:" + RP_HTTPS_PORT + LOGOUT_CONTEXT;
+    private static final String LOGOUT_URL = "https://localhost:" + RP_HTTPS_PORT + LOGOUT_CONTEXT;
     private static final String LOGOUT_MSG = "logout";
 
     private static Tomcat idpServer;
diff --git a/systests/oidc/src/test/resources/realma/entities-realma.xml b/systests/oidc/src/test/resources/realma/entities-realma.xml
index 79a29f8..f0c94fa 100644
--- a/systests/oidc/src/test/resources/realma/entities-realma.xml
+++ b/systests/oidc/src/test/resources/realma/entities-realma.xml
@@ -40,10 +40,8 @@
         <property name="disableLogoutAddressValidation" value="true"/>
         <property name="supportedProtocols">
             <util:list>
-                <value>http://docs.oasis-open.org/wsfed/federation/200706
-                </value>
-                <value>http://docs.oasis-open.org/ws-sx/ws-trust/200512
-                </value>
+                <value>http://docs.oasis-open.org/wsfed/federation/200706</value>
+                <value>http://docs.oasis-open.org/ws-sx/ws-trust/200512</value>
             </util:list>
         </property>
         <property name="tokenTypesOffered">
@@ -54,7 +52,8 @@
         </property>
         <property name="authenticationURIs">
             <util:map>
-                <entry key="default" value="federation/up" />
+                <entry key="default"
+                       value="federation/up" />
                 <entry key="http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndKey" 
                        value="federation/krb" />
                 <entry key="http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/default"
@@ -110,7 +109,7 @@
         <property name="passiveRequestorEndpointConstraint" 
                   value="https://localhost:(\d)*/(\w)*helloworld(\w)*/secure/.*" />
     </bean>
-    
+
     <bean id="srv-oidc" class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationEntity">
         <property name="realm" value="urn:org:apache:cxf:fediz:oidc" />
         <property name="protocol" value="http://docs.oasis-open.org/wsfed/federation/200706" />
@@ -128,26 +127,42 @@
         <property name="optional" value="false" />
     </bean>
     <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
+        <property name="application" ref="srv-fedizhelloworld" />
+        <property name="claim" ref="claim_givenname" />
+        <property name="optional" value="false" />
+    </bean>
+    <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
+        <property name="application" ref="srv-fedizhelloworld" />
+        <property name="claim" ref="claim_surname" />
+        <property name="optional" value="false" />
+    </bean>
+    <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
+        <property name="application" ref="srv-fedizhelloworld" />
+        <property name="claim" ref="claim_email" />
+        <property name="optional" value="false" />
+    </bean>
+    <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
         <property name="application" ref="srv-oidc" />
         <property name="claim" ref="claim_role" />
         <property name="optional" value="false" />
     </bean>
+
     <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
-        <property name="application" ref="srv-fedizhelloworld" />
+        <property name="application" ref="srv-oidc" />
         <property name="claim" ref="claim_givenname" />
         <property name="optional" value="false" />
     </bean>
     <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
-        <property name="application" ref="srv-fedizhelloworld" />
+        <property name="application" ref="srv-oidc" />
         <property name="claim" ref="claim_surname" />
         <property name="optional" value="false" />
     </bean>
     <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity">
-        <property name="application" ref="srv-fedizhelloworld" />
+        <property name="application" ref="srv-oidc" />
         <property name="claim" ref="claim_email" />
         <property name="optional" value="false" />
     </bean>
-    
+
     <bean id="claim_role"
         class="org.apache.cxf.fediz.service.idp.service.jpa.ClaimEntity">
         <property name="claimType"