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 2014/06/26 16:27:44 UTC
[1/4] git commit: Avoiding NPE if either a location/wsdlLocation is
not configured on the STSClient
Repository: cxf
Updated Branches:
refs/heads/2.7.x-fixes ce572e409 -> aaf7e6638
Avoiding NPE if either a location/wsdlLocation is not configured on the STSClient
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0c0e20af
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0c0e20af
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0c0e20af
Branch: refs/heads/2.7.x-fixes
Commit: 0c0e20af7cbd57af64584535aa6312e1ec9fcb07
Parents: ce572e4
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 26 11:10:49 2014 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 26 15:22:23 2014 +0100
----------------------------------------------------------------------
.../java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java | 4 +++-
.../java/org/apache/cxf/ws/security/trust/Messages.properties | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/0c0e20af/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
index f2cda23..68b36b6 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/AbstractSTSClient.java
@@ -638,11 +638,13 @@ public abstract class AbstractSTSClient implements Configurable, InterceptorProv
EndpointInfo ei = service.getEndpointInfo(endpointName);
Endpoint endpoint = new EndpointImpl(bus, service, ei);
client = new ClientImpl(bus, endpoint);
- } else {
+ } else if (location != null) {
Endpoint endpoint = STSUtils.createSTSEndpoint(bus, namespace, null, location, soapVersion,
policy, endpointName);
client = new ClientImpl(bus, endpoint);
+ } else {
+ throw new TrustException(LOG, "NO_LOCATION");
}
client.getInFaultInterceptors().addAll(inFault);
http://git-wip-us.apache.org/repos/asf/cxf/blob/0c0e20af/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/Messages.properties
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/Messages.properties b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/Messages.properties
index d301c27..570dacd 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/Messages.properties
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/Messages.properties
@@ -27,3 +27,4 @@ VALIDATION_FAILED=Validation of security token failed: {0}
NO_USER_PASSWORD=No user name and/or password is available, name: {0}, password: {1}
ADDRESS_NOT_MATCHED=Cannot match the address {0} to the WSDL received via WS-MEX
WS_MEX_ERROR=Exception when trying to retrieve/process a WSDL via WS-MEX
+NO_LOCATION=The STSClient is not configured with either a location or wsdlLocation property
[3/4] git commit: Recording .gitmergeinfo Changes
Posted by co...@apache.org.
Recording .gitmergeinfo Changes
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e01a6ce8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e01a6ce8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e01a6ce8
Branch: refs/heads/2.7.x-fixes
Commit: e01a6ce8114dd1c0731a44b3f946f62113474ab9
Parents: b3cfe65
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 26 15:22:36 2014 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 26 15:22:36 2014 +0100
----------------------------------------------------------------------
.gitmergeinfo | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/e01a6ce8/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index a176f02..dcc1ef0 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -1364,6 +1364,7 @@ M 5ec1b6025d1fd35157b7ce862198c61a7810e499
M 5f9152b79faa7a49a1d82c864e7306dacba4321f
M 6019486954e7e48efbd393f5fe1e7dcee3a2253c
M 608b823b5eb576cca77e92ac6298ef63c6d65c99
+M 60bad6d65fa8ef8b51f72304430cdbde478dd9f0
M 60e570276804496f15e04f06ade2e9308ce04a08
M 61adb143a0f5930357140c0d470e9b44957107f4
M 61c94e87eb7328b7466c21e251d8c5eac0c84574
[4/4] git commit: Fixing IssuedToken commit
Posted by co...@apache.org.
Fixing IssuedToken commit
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/aaf7e663
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/aaf7e663
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/aaf7e663
Branch: refs/heads/2.7.x-fixes
Commit: aaf7e6638eba5d1c91f8e4f132ca9fc8b513914f
Parents: e01a6ce
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 26 15:27:30 2014 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 26 15:27:30 2014 +0100
----------------------------------------------------------------------
.../interceptors/IssuedTokenInterceptorProvider.java | 14 --------------
1 file changed, 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/aaf7e663/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
index 2c37826..9130a2d 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
@@ -544,13 +544,7 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
if (ais == null) {
return;
}
-<<<<<<< HEAD
-=======
- IssuedToken itok = (IssuedToken)ais.iterator().next().getAssertion();
- assertIssuedToken(itok, aim);
-
->>>>>>> 60bad6d... Fixing problem with IssuedToken policy validation
if (!isRequestor(message)) {
message.getExchange().remove(SecurityConstants.TOKEN);
List<WSHandlerResult> results =
@@ -559,10 +553,6 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
parseHandlerResults(results.get(0), message, ais);
}
} else {
- for (AssertionInfo ai : ais) {
- ai.setAsserted(true);
- }
- } else {
//client side should be checked on the way out
for (AssertionInfo ai : ais) {
ai.setAsserted(true);
@@ -581,10 +571,6 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
IssuedTokenPolicyValidator issuedValidator =
new IssuedTokenPolicyValidator(signedResults, message);
-<<<<<<< HEAD
- Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);
-=======
->>>>>>> 60bad6d... Fixing problem with IssuedToken policy validation
for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);
[2/4] git commit: Fixing problem with IssuedToken policy validation
Posted by co...@apache.org.
Fixing problem with IssuedToken policy validation
Conflicts:
rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b3cfe659
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b3cfe659
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b3cfe659
Branch: refs/heads/2.7.x-fixes
Commit: b3cfe6594d7be3ddd0b914e29c5ada240f97fe59
Parents: 0c0e20a
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 26 15:01:54 2014 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 26 15:22:36 2014 +0100
----------------------------------------------------------------------
.../IssuedTokenInterceptorProvider.java | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/b3cfe659/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
index 9d69d17..2c37826 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
@@ -544,12 +544,23 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
if (ais == null) {
return;
}
+<<<<<<< HEAD
+=======
+
+ IssuedToken itok = (IssuedToken)ais.iterator().next().getAssertion();
+ assertIssuedToken(itok, aim);
+
+>>>>>>> 60bad6d... Fixing problem with IssuedToken policy validation
if (!isRequestor(message)) {
message.getExchange().remove(SecurityConstants.TOKEN);
List<WSHandlerResult> results =
CastUtils.cast((List<?>)message.get(WSHandlerConstants.RECV_RESULTS));
if (results != null && results.size() > 0) {
- parseHandlerResults(results.get(0), message, aim);
+ parseHandlerResults(results.get(0), message, ais);
+ }
+ } else {
+ for (AssertionInfo ai : ais) {
+ ai.setAsserted(true);
}
} else {
//client side should be checked on the way out
@@ -563,14 +574,17 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
private void parseHandlerResults(
WSHandlerResult rResult,
Message message,
- AssertionInfoMap aim
+ Collection<AssertionInfo> issuedAis
) {
List<WSSecurityEngineResult> signedResults =
WSS4JUtils.fetchAllActionResults(rResult.getResults(), WSConstants.SIGN);
IssuedTokenPolicyValidator issuedValidator =
new IssuedTokenPolicyValidator(signedResults, message);
+<<<<<<< HEAD
Collection<AssertionInfo> issuedAis = aim.get(SP12Constants.ISSUED_TOKEN);
+=======
+>>>>>>> 60bad6d... Fixing problem with IssuedToken policy validation
for (AssertionWrapper assertionWrapper : findSamlTokenResults(rResult.getResults())) {
boolean valid = issuedValidator.validatePolicy(issuedAis, assertionWrapper);