diff --git a/wsit/ws-sx/wssx-api/src/main/java/com/sun/xml/ws/api/security/trust/client/STSIssuedTokenConfiguration.java b/wsit/ws-sx/wssx-api/src/main/java/com/sun/xml/ws/api/security/trust/client/STSIssuedTokenConfiguration.java index f018d1683..821332d9e 100644 --- a/wsit/ws-sx/wssx-api/src/main/java/com/sun/xml/ws/api/security/trust/client/STSIssuedTokenConfiguration.java +++ b/wsit/ws-sx/wssx-api/src/main/java/com/sun/xml/ws/api/security/trust/client/STSIssuedTokenConfiguration.java @@ -35,6 +35,7 @@ public abstract class STSIssuedTokenConfiguration implements IssuedTokenConfigur public static final String STS_SERVICE_NAME ="sts-service-name"; public static final String STS_PORT_NAME ="sts-port-name"; public static final String STS_NAMESPACE ="sts-namespace"; + public static final String STS_SIGNATURE_ALGORITHM ="sts-signature-algorithm"; public static final String LIFE_TIME = "LifeTime"; public static final String MAX_CLOCK_SKEW = "MaxClockSkew"; diff --git a/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/ws/security/trust/impl/TrustPluginImpl.java b/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/ws/security/trust/impl/TrustPluginImpl.java index aba377f8a..a4bf52c4f 100644 --- a/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/ws/security/trust/impl/TrustPluginImpl.java +++ b/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/ws/security/trust/impl/TrustPluginImpl.java @@ -550,7 +550,9 @@ private BaseSTSResponse invokeRST(final RequestSecurityToken request, STSIssuedT } dispatch.getRequestContext().put(WSTrustConstants.IS_TRUST_MESSAGE, "true"); dispatch.getRequestContext().put(WSTrustConstants.TRUST_ACTION, getAction(wstVer, request.getRequestType().toString())); - + + dispatch.getRequestContext().put(STSIssuedTokenConfiguration.STS_SIGNATURE_ALGORITHM, stsConfig.getSignatureAlgorithm()); + // Pass the keys and/or username, password to the message context // String userName = (String) stsConfig.getOtherOptions().get(com.sun.xml.wss.XWSSConstants.USERNAME_PROPERTY); // String password = (String) stsConfig.getOtherOptions().get(com.sun.xml.wss.XWSSConstants.PASSWORD_PROPERTY); diff --git a/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/wss/jaxws/impl/SecurityClientTube.java b/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/wss/jaxws/impl/SecurityClientTube.java index 2d2bce8d2..fd4c85219 100644 --- a/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/wss/jaxws/impl/SecurityClientTube.java +++ b/wsit/ws-sx/wssx-impl/src/main/java/com/sun/xml/wss/jaxws/impl/SecurityClientTube.java @@ -256,6 +256,10 @@ public Packet processClientRequestPacket(Packet packet) { ProcessingContext ctx = initializeOutgoingProcessingContext(packet, isSCMessage); ((ProcessingContextImpl) ctx).setIssuedTokenContextMap(issuedTokenContextMap); ((ProcessingContextImpl) ctx).setSCPolicyIDtoSctIdMap(scPolicyIDtoSctIdMap); + String sigAlg = (String)(packet.invocationProperties.get(STSIssuedTokenConfiguration.STS_SIGNATURE_ALGORITHM)); + if(sigAlg!=null && (!sigAlg.equals(""))) { + ((ProcessingContextImpl) ctx).getAlgorithmSuite().setSignatureAlgorithm(sigAlg); + } ctx.isClient(true); try { if (hasKerberosTokenPolicy()) {