Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature alg fix #58

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down