You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/03/24 12:29:09 UTC
[2/3] cxf git commit: CXF-6549 - JMX MBean for IdentityCache throws
RuntimeOperationsException
CXF-6549 - JMX MBean for IdentityCache throws RuntimeOperationsException
# Conflicts:
# services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/66b8d91f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/66b8d91f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/66b8d91f
Branch: refs/heads/3.1.x-fixes
Commit: 66b8d91fbda66959bfc41d59878e248ff23239fc
Parents: b951579
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Mar 24 12:04:33 2017 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Mar 24 12:08:15 2017 +0000
----------------------------------------------------------------------
.../cxf/systest/sts/common/CustomIdentityMapper.java | 4 ++--
.../cxf/systest/sts/issueunit/IssueUnitTest.java | 14 ++++++++++++++
.../apache/cxf/systest/sts/deployment/sts/realms.xml | 9 +++++++--
3 files changed, 23 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/66b8d91f/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
index 59c8c31..5a94433 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/common/CustomIdentityMapper.java
@@ -20,13 +20,13 @@ package org.apache.cxf.systest.sts.common;
import java.security.Principal;
-import org.apache.cxf.sts.IdentityMapper;
+import org.apache.cxf.sts.cache.MemoryIdentityCache;
import org.apache.wss4j.common.principal.CustomTokenPrincipal;
/**
* A test implementation of IdentityMapper.
*/
-public class CustomIdentityMapper implements IdentityMapper {
+public class CustomIdentityMapper extends MemoryIdentityCache {
/**
* Map a principal in the source realm to the target realm
http://git-wip-us.apache.org/repos/asf/cxf/blob/66b8d91f/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
index b8de1fb..49963d6 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
@@ -387,8 +387,12 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
bus.shutdown(true);
}
+<<<<<<< HEAD
//CHECKSTYLE:OFF
+=======
+
+>>>>>>> a42362e... CXF-6549 - JMX MBean for IdentityCache throws RuntimeOperationsException
@org.junit.Test
public void testSAMLinWSSecToOtherRealm() throws Exception {
SpringBusFactory bf = new SpringBusFactory();
@@ -476,7 +480,12 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
) throws Exception {
return requestSecurityToken(tokenType, keyType, null, bus, endpointAddress, context, null, null, null);
}
+<<<<<<< HEAD
+=======
+
+ // CHECKSTYLE:OFF
+>>>>>>> a42362e... CXF-6549 - JMX MBean for IdentityCache throws RuntimeOperationsException
private SecurityToken requestSecurityToken(
String tokenType,
String keyType,
@@ -533,7 +542,12 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
return stsClient.requestSecurityToken(endpointAddress);
}
+<<<<<<< HEAD
+=======
+ // CHECKSTYLE:ON
+
+>>>>>>> a42362e... CXF-6549 - JMX MBean for IdentityCache throws RuntimeOperationsException
private Properties getEncryptionProperties() {
Properties properties = new Properties();
properties.put(
http://git-wip-us.apache.org/repos/asf/cxf/blob/66b8d91f/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
index d42be3b..cc1c26f 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml
@@ -36,13 +36,18 @@
</util:map>
<!-- Relationships between realms -->
- <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper"/>
+ <bean id="identityMapper" class="org.apache.cxf.systest.sts.common.CustomIdentityMapper">
+ </bean>
+
+ <bean id="identityCache" class="org.apache.cxf.sts.cache.MemoryIdentityCache">
+ <constructor-arg ref="identityMapper"></constructor-arg>
+ </bean>
<util:list id="relationships">
<bean class="org.apache.cxf.sts.token.realm.Relationship">
<property name="sourceRealm" value="#{realmA.getName()}"/>
<property name="targetRealm" value="#{realmB.getName()}"/>
- <property name="identityMapper" ref="identityMapper"/>
+ <property name="identityMapper" ref="identityCache"/>
<property name="type" value="FederatedIdentity"/>
</bean>
</util:list>