Package org.apache.tuscany.sca.policy.security.http.ssl

Examples of org.apache.tuscany.sca.policy.security.http.ssl.HTTPSPolicy


    public void configureBinding(Object context) {
        SecurityContext securityContext = ((Axis2BaseBindingProvider)context).getHttpSecurityContext();
       
        for (Object policy : findPolicies()) {
            if (policy instanceof HTTPSPolicy) {
                HTTPSPolicy httpsPolicy = (HTTPSPolicy)policy;
               
                securityContext.setSSLEnabled(true);
                securityContext.setSSLProperties(httpsPolicy.toProperties());
               
                // TODO - what is the right way to set trust/key store on client side?
               
                logger.info("HTTPSPolicyProvider: Setting JVM trust store to " + httpsPolicy.getTrustStore());
                System.setProperty("javax.net.ssl.trustStore", httpsPolicy.getTrustStore());
                System.setProperty("javax.net.ssl.trustStorePassword", httpsPolicy.getTrustStorePassword());
                System.setProperty("javax.net.ssl.trustStoreType", httpsPolicy.getTrustStoreType());
               
                logger.info("HTTPSPolicyProvider: Setting JVM key store to " + httpsPolicy.getKeyStore());
                System.setProperty("javax.net.ssl.keyStore", httpsPolicy.getKeyStore());
                System.setProperty("javax.net.ssl.keyStorePassword", httpsPolicy.getKeyStorePassword());
                System.setProperty("javax.net.ssl.keyStoreType", httpsPolicy.getKeyStoreType());               

                return;
            }
        }       
    }
View Full Code Here


    public void configureBinding(Object context) {
        SecurityContext securityContext = ((Axis2BaseBindingProvider)context).getHttpSecurityContext();
       
        for (Object policy : findPolicies()) {
            if (policy instanceof HTTPSPolicy) {
                HTTPSPolicy httpsPolicy = (HTTPSPolicy)policy;
               
                securityContext.setSSLEnabled(true);
                securityContext.setSSLProperties(httpsPolicy.toProperties());
               
                // TODO - what is the right way to set trust/key store on client side?
               
                logger.info("HTTPSPolicyProvider: Setting JVM trust store to " + httpsPolicy.getTrustStore());
                System.setProperty("javax.net.ssl.trustStore", httpsPolicy.getTrustStore());
                System.setProperty("javax.net.ssl.trustStorePassword", httpsPolicy.getTrustStorePassword());
                System.setProperty("javax.net.ssl.trustStoreType", httpsPolicy.getTrustStoreType());
               
                logger.info("HTTPSPolicyProvider: Setting JVM key store to " + httpsPolicy.getKeyStore());
                System.setProperty("javax.net.ssl.keyStore", httpsPolicy.getKeyStore());
                System.setProperty("javax.net.ssl.keyStorePassword", httpsPolicy.getKeyStorePassword());
                System.setProperty("javax.net.ssl.keyStoreType", httpsPolicy.getKeyStoreType());               

                return;
            }
        }       
    }
View Full Code Here

    public void configureBinding(Object context) {
        SecurityContext securityContext = ((Axis2BaseBindingProvider)context).getHttpSecurityContext();
       
        for (Object policy : findPolicies()) {
            if (policy instanceof HTTPSPolicy) {
                HTTPSPolicy httpsPolicy = (HTTPSPolicy)policy;
               
                securityContext.setSSLEnabled(true);
                securityContext.setSSLProperties(httpsPolicy.toProperties());
               
                // TODO - what is the right way to set trust/key store on client side?
               
                logger.info("HTTPSPolicyProvider: Setting JVM trust store to " + httpsPolicy.getTrustStore());
                System.setProperty("javax.net.ssl.trustStore", httpsPolicy.getTrustStore());
                System.setProperty("javax.net.ssl.trustStorePassword", httpsPolicy.getTrustStorePassword());
                System.setProperty("javax.net.ssl.trustStoreType", httpsPolicy.getTrustStoreType());
               
                logger.info("HTTPSPolicyProvider: Setting JVM key store to " + httpsPolicy.getKeyStore());
                System.setProperty("javax.net.ssl.keyStore", httpsPolicy.getKeyStore());
                System.setProperty("javax.net.ssl.keyStorePassword", httpsPolicy.getKeyStorePassword());
                System.setProperty("javax.net.ssl.keyStoreType", httpsPolicy.getKeyStoreType());               

                return;
            }
        }       
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.policy.security.http.ssl.HTTPSPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.