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 17:16:59 UTC
[1/5] git commit: Avoiding NPE if either a location/wsdlLocation is
not configured on the STSClient
Repository: cxf
Updated Branches:
refs/heads/2.6.x-fixes 9085c8578 -> 5ef5d91a8
Avoiding NPE if either a location/wsdlLocation is not configured on the STSClient
Conflicts:
rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/Messages.properties
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/33d66d09
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/33d66d09
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/33d66d09
Branch: refs/heads/2.6.x-fixes
Commit: 33d66d09609196f763524474645e49e0d0136153
Parents: 9085c85
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 16:06:36 2014 +0100
----------------------------------------------------------------------
.../org/apache/cxf/ws/security/trust/AbstractSTSClient.java | 4 +++-
.../java/org/apache/cxf/ws/security/trust/Messages.properties | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/33d66d09/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 5c7e711..5ce96c7 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
@@ -559,11 +559,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/33d66d09/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 dddcc67..94193fb 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
@@ -25,3 +25,9 @@ DERIVED_KEY_ERROR=Exception while trying to create secret key from RequestSecuri
ENCRYPTED_KEY_ERROR=Exception while trying to decrypt key from RequestSecurityTokenResponse
VALIDATION_FAILED=Validation of security token failed: {0}
NO_USER_PASSWORD=No user name and/or password is available, name: {0}, password: {1}
+<<<<<<< HEAD
+=======
+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
+>>>>>>> 0c0e20a... Avoiding NPE if either a location/wsdlLocation is not configured on the STSClient
[5/5] git commit: Fixing build
Posted by co...@apache.org.
Fixing build
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5ef5d91a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5ef5d91a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5ef5d91a
Branch: refs/heads/2.6.x-fixes
Commit: 5ef5d91a8cb181dd532c8e83b53e7f8c3f272f5a
Parents: c632ec3
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 26 16:16:35 2014 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 26 16:16:35 2014 +0100
----------------------------------------------------------------------
.../java/org/apache/cxf/ws/security/trust/Messages.properties | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/5ef5d91a/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 94193fb..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
@@ -25,9 +25,6 @@ DERIVED_KEY_ERROR=Exception while trying to create secret key from RequestSecuri
ENCRYPTED_KEY_ERROR=Exception while trying to decrypt key from RequestSecurityTokenResponse
VALIDATION_FAILED=Validation of security token failed: {0}
NO_USER_PASSWORD=No user name and/or password is available, name: {0}, password: {1}
-<<<<<<< HEAD
-=======
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
->>>>>>> 0c0e20a... Avoiding NPE if either a location/wsdlLocation is not configured on the STSClient
[4/5] 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/c632ec3e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c632ec3e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c632ec3e
Branch: refs/heads/2.6.x-fixes
Commit: c632ec3e8c8636824a7efe98fdd1d89d975dc16c
Parents: 45c1a5c
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jun 26 16:06:44 2014 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jun 26 16:06:44 2014 +0100
----------------------------------------------------------------------
.gitmergeinfo | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/c632ec3e/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 709ba2a..be5b77c 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -1168,6 +1168,7 @@ M 08b9bc0abbebf5d73fdb64bf179db21dedfe4946
M 0973f4f58e4f928d557340cc374364876acbee8d
M 0af560bf08cf8f81f8df67d66129ef6f26cf7a6a
M 0bd7c311f46a16d17e68e3d505cd04106feaa669
+M 0c0e20af7cbd57af64584535aa6312e1ec9fcb07
M 0c0ee62dc445ca2f18be30359259ea7352283c28
M 0c68ab6767f7f8b02e8f18b75b76c3ef014c243d
M 0cdd009473b1cc8dd936e212672a180afdb5b37f
@@ -1443,6 +1444,7 @@ M af72503cfd4f4d503168248524155c8b1b3c8a57
M afb0524fa8557cc4d47f480a4d3545ec3a7fcc6d
M b1f9617a49526208dee679fd12ee2af5f2719bae
M b2021ac991a0d7ac29a308de8bd503a10f71227d
+M b3cfe6594d7be3ddd0b914e29c5ada240f97fe59
M b3f6dd19c3b1811746243e922df81a31e6968cc0
M b4f2c0db1b0723d3f622fd02994d4c7aa7f9a2b0
M b5dd92ea99a2a8fc3ae164ac1a66397e5615d6a9
[2/5] 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/7c309b52
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7c309b52
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7c309b52
Branch: refs/heads/2.6.x-fixes
Commit: 7c309b52b8d42011cf47c9d76f3e292cf7caf64d
Parents: 33d66d0
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 16:06:40 2014 +0100
----------------------------------------------------------------------
.../IssuedTokenInterceptorProvider.java | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/7c309b52/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 2f5ab2e..fb6697b 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
@@ -498,12 +498,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
@@ -517,7 +528,7 @@ public class IssuedTokenInterceptorProvider extends AbstractPolicyInterceptorPro
private void parseHandlerResults(
WSHandlerResult rResult,
Message message,
- AssertionInfoMap aim
+ Collection<AssertionInfo> issuedAis
) {
List<WSSecurityEngineResult> signedResults = new ArrayList<WSSecurityEngineResult>();
WSSecurityUtil.fetchAllActionResults(
@@ -526,7 +537,10 @@ 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);
[3/5] 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/45c1a5ca
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/45c1a5ca
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/45c1a5ca
Branch: refs/heads/2.6.x-fixes
Commit: 45c1a5ca5be23a7db38fb623b7e6f2d1933dd9e1
Parents: 7c309b5
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 16:06:43 2014 +0100
----------------------------------------------------------------------
.../interceptors/IssuedTokenInterceptorProvider.java | 14 --------------
1 file changed, 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/45c1a5ca/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 fb6697b..35fb3aa 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
@@ -498,13 +498,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 =
@@ -513,10 +507,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);
@@ -537,10 +527,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);