This interface is used to represent message authentication policy.
The internal state of a ProtectionPolicy object defines the message authentication requirements to be applied to the associated Target.
310311312313314315316317318319320321
throws IOException { String id = pConfig.getProviderId(); String type = pConfig.getProviderType(); String moduleClass = pConfig.getClassName(); MessagePolicy requestPolicy = parsePolicy(pConfig.getRequestPolicy()); MessagePolicy responsePolicy = parsePolicy(pConfig.getResponsePolicy()); // get the module options Map options = new HashMap(); String key;
90919293949596979899100
public MessagePolicyDelegate getMessagePolicyDelegate(String appContext) throws AuthException { return new MessagePolicyDelegate() { public MessagePolicy getRequestPolicy(String authContextID, Map properties) { MessagePolicy rvalue; if (MANDATORY_AUTH_CONTEXT_ID.equals(authContextID)) { rvalue = mandatoryPolicy; } else { rvalue = optionalPolicy; }
105106107108109110111112113114115116117
"of AppContext: ", getAppContext(), "unable to load server auth modules"); throw ae; } MessagePolicy requestPolicy = mpDelegate.getRequestPolicy(authContextID, properties); MessagePolicy responsePolicy = mpDelegate.getResponsePolicy(authContextID, properties); boolean noModules = true; for (int i = 0; i < m.length; i++) { if (m[i] != null) {
159160161162163164165166167168169170
throws IOException { String id = pConfig.getProviderId(); String type = pConfig.getProviderType(); String moduleClass = pConfig.getClassName(); MessagePolicy requestPolicy = parsePolicy(pConfig.getRequestPolicy()); MessagePolicy responsePolicy = parsePolicy(pConfig.getResponsePolicy()); // get the module options Map options = new HashMap(); List<Property> props = pConfig.getProperty();
985986987988989990991992993994995996
policies = AuthMessagePolicy.getSOAPPolicies (binding, authContextID, onePolicy); } MessagePolicy requestPolicy = policies[0]; MessagePolicy responsePolicy = policies[1]; Entry entry = getEntry(layer, providerID, requestPolicy, responsePolicy, type); return (entry != null)?
184185186187188189190191192193194195196
throws IOException { String id = pConfig.getProviderId(); String type = pConfig.getProviderType(); String moduleClass = pConfig.getClassName(); MessagePolicy requestPolicy = parsePolicy((RequestPolicy) pConfig.getRequestPolicy()); MessagePolicy responsePolicy = parsePolicy((ResponsePolicy) pConfig.getResponsePolicy()); // get the module options Map options = new HashMap();
198199200201202203204205206207
}) ); } } return new MessagePolicy( targetPolicies.toArray( new TargetPolicy[targetPolicies.size()]), mandatory); }
205206207208209210211212213214215
new TargetPolicy[targetPolicies.size()]), mandatory); } public static MessagePolicy getMessagePolicy(ProtectionDescriptor pd) { MessagePolicy messagePolicy = null; if (pd != null) { String source = pd.getAttributeValue (ProtectionDescriptor.AUTH_SOURCE); String recipient = pd.getAttributeValue (ProtectionDescriptor.AUTH_RECIPIENT);
234235236237238239240241242243244245
public static MessagePolicy[] getSOAPPolicies( MessageSecurityBindingDescriptor binding, String operation, boolean onePolicy) { MessagePolicy requestPolicy = null; MessagePolicy responsePolicy = null; if (binding != null) { ArrayList<MessageSecurityDescriptor> msgSecDescs = null; String layer = binding.getAttributeValue (MessageSecurityBindingDescriptor.AUTH_LAYER);