Methods Summary |
---|
protected void | close()
|
protected com.sun.xml.ws.security.policy.Binding | getBinding()
return binding;
|
protected com.sun.xml.wss.impl.policy.mls.EncryptionPolicy | getSecondaryEncryptionPolicy()
throw new UnsupportedOperationException();
|
public void | process()
container.setPolicyContainerMode(binding.getLayout());
if(binding.isIncludeTimeStamp()){
tp = new TimestampPolicy();
tp.setUUID(pid.generateID());
container.insert(tp);
}
|
public void | processSupportingTokens(com.sun.xml.ws.security.policy.SupportingTokens tokens)
Iterator itr = tokens.getTokens();
while(itr.hasNext()){
Token token = (Token) itr.next();
WSSPolicy policy = tokenProcessor.getWSSToken(token);
AuthenticationTokenPolicy atp = new AuthenticationTokenPolicy();
atp.setFeatureBinding(policy);
container.insert(atp);
}
|
public void | processSupportingTokens(com.sun.xml.ws.security.policy.SignedSupportingTokens sst)
Iterator itr = sst.getTokens();
while(itr.hasNext()){
Token token = (Token) itr.next();
WSSPolicy policy = tokenProcessor.getWSSToken(token);
AuthenticationTokenPolicy atp = new AuthenticationTokenPolicy();
atp.setFeatureBinding(policy);
container.insert(atp);
}
|
public void | processSupportingTokens(com.sun.xml.ws.security.policy.EndorsingSupportingTokens est)
Iterator itr = est.getTokens();
while(itr.hasNext()){
Token token = (Token) itr.next();
SignaturePolicy sp = new SignaturePolicy();
SignaturePolicy.FeatureBinding spFB = (com.sun.xml.wss.impl.policy.mls.SignaturePolicy.FeatureBinding)sp.getFeatureBinding();
//spFB.setCanonicalizationAlgorithm(CanonicalizationMethod.EXCLUSIVE);
SecurityPolicyUtil.setCanonicalizationMethod(spFB, binding.getAlgorithmSuite());
sp.setUUID(pid.generateID());
tokenProcessor.addKeyBinding(sp, token,false);
// container.insert(sp.getKeyBinding());
if(tp != null ){
SignatureTarget target = iAP.getTargetCreator().newURISignatureTarget(tp.getUUID());
SecurityPolicyUtil.setName(target, tp);
// there is no primary signature in Transport Binding
//spFB.isEndorsingSignature(true);
spFB.addTargetBinding(target);
container.insert(sp);
}
}
|
public void | processSupportingTokens(com.sun.xml.ws.security.policy.SignedEndorsingSupportingTokens set)
Iterator itr = set.getTokens();
while(itr.hasNext()){
Token token = (Token) itr.next();
SignaturePolicy sp = new SignaturePolicy();
sp.setUUID(pid.generateID());
SignaturePolicy.FeatureBinding spFB = (com.sun.xml.wss.impl.policy.mls.SignaturePolicy.FeatureBinding)sp.getFeatureBinding();
//spFB.setCanonicalizationAlgorithm(CanonicalizationMethod.EXCLUSIVE);
SecurityPolicyUtil.setCanonicalizationMethod(spFB, binding.getAlgorithmSuite());
tokenProcessor.addKeyBinding(sp, token,false);
//protect primary signature
if(tp != null){
SignatureTarget target = iAP.getTargetCreator().newURISignatureTarget(tp.getUUID());
SecurityPolicyUtil.setName(target, tp);
//SignaturePolicy.FeatureBinding spFB = (SignaturePolicy.FeatureBinding)sp.getFeatureBinding();
//spFB.isEndorsingSignature(true);
spFB.addTargetBinding(target);
container.insert(sp);
}
}
|