List<PolicySet> policySets = ((PolicySetAttachPoint)binding).getApplicablePolicySets();
for (PolicySet ps : policySets) {
for (Object p : ps.getPolicies()) {
if (ConfidentialityPolicy.class.isInstance(p) && isConfidentialityRequired) {
//Handle enabling and configuring SSL
ConfidentialityPolicy confidentialityPolicy = (ConfidentialityPolicy)p;
securityContext.setSSLEnabled(true);
securityContext.setSSLProperties(confidentialityPolicy.toProperties());
} else if(AuthenticationConfigurationPolicy.class.isInstance(p) && isAuthenticationRequired) {
// Handle authentication and user configuration
AuthenticationConfigurationPolicy authenticationConfiguration = (AuthenticationConfigurationPolicy)p;
securityContext.setAuthenticationEnabled(true);