Examples of RampartConfig


Examples of org.apache.rampart.policy.model.RampartConfig

                        || WSSHandlerConstants.RSTR_ACTON_SCT.equals(msgContext.getWSAAction())) &&
                        this.policyData.getIssuerPolicy() != null) {
                   
                    this.servicePolicy = this.policyData.getIssuerPolicy();
                   
                    RampartConfig rampartConfig = policyData.getRampartConfig();
                    if(rampartConfig != null) {
                        /*
                         * Copy crypto info into the new issuer policy
                         */
                        RampartConfig rc = new RampartConfig();
                        rc.setEncrCryptoConfig(rampartConfig.getEncrCryptoConfig());
                        rc.setSigCryptoConfig(rampartConfig.getSigCryptoConfig());
                        rc.setDecCryptoConfig(rampartConfig.getDecCryptoConfig());
                        rc.setUser(rampartConfig.getUser());
                        rc.setEncryptionUser(rampartConfig.getEncryptionUser());
                        rc.setPwCbClass(rampartConfig.getPwCbClass());
                        rc.setSSLConfig(rampartConfig.getSSLConfig());
                       
                        this.servicePolicy.addAssertion(rc);
                    }
   
                    List it = (List)this.servicePolicy.getAlternatives().next();
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

       
    }
   
    public static Policy addRampartConfig (RampartMessageData rmd, Policy policy) {
       
        RampartConfig servicRampConf = rmd.getPolicyData().getRampartConfig();       
        RampartConfig stsRampConf = new RampartConfig();
       
        //TODO copy all the properties of service ramp conf to sts ramp conf
        stsRampConf.setUser(servicRampConf.getUser());
        stsRampConf.setSigCryptoConfig(servicRampConf.getSigCryptoConfig());
        stsRampConf.setPwCbClass(servicRampConf.getPwCbClass());
       
        stsRampConf.setEncryptionUser(servicRampConf.getStsAlias());
        stsRampConf.setEncrCryptoConfig(servicRampConf.getStsCryptoConfig());
       
        policy.addAssertion(stsRampConf);
       
        return policy;
       
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

    }
   

    public static int getTimeToLive(RampartMessageData messageData) {

        RampartConfig rampartConfig = messageData.getPolicyData().getRampartConfig();
        if (rampartConfig != null) {
            String ttl = rampartConfig.getTimestampTTL();
            int ttl_i = 0;
            if (ttl != null) {
                try {
                    ttl_i = Integer.parseInt(ttl);
                } catch (NumberFormatException e) {
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

        }
    }

    public static int getTimestampMaxSkew(RampartMessageData messageData) {

        RampartConfig rampartConfig = messageData.getPolicyData().getRampartConfig();
        if (rampartConfig != null) {
            String maxSkew = rampartConfig.getTimestampMaxSkew();
            int maxSkew_i = 0;
            if (maxSkew != null) {
                try {
                    maxSkew_i = Integer.parseInt(maxSkew);
                } catch (NumberFormatException e) {
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

      if(dotDebug){
        t0 = System.currentTimeMillis();
      }
        RampartPolicyData rpd = rmd.getPolicyData();
        Document doc = rmd.getDocument();
        RampartConfig config = rpd.getRampartConfig();

        /*
         * We need to hold on to these two element to use them as refence in the
         * case of encypting the signature
         */
 
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

public class RampartConfigBuilder implements AssertionBuilder {

    public Assertion build(OMElement element, AssertionBuilderFactory factory)
            throws IllegalArgumentException {

        RampartConfig rampartConfig = new RampartConfig();

        OMElement childElement;

        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.USER_LN));
        if (childElement != null) {
            rampartConfig.setUser(childElement.getText().trim());
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.USER_CERT_ALIAS_LN));
        if (childElement != null) {
            rampartConfig.setUserCertAlias(childElement.getText().trim());
        }

        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.ENCRYPTION_USER_LN));
        if (childElement != null) {
            rampartConfig.setEncryptionUser(childElement.getText().trim());
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.STS_ALIAS_LN));
        if (childElement != null) {
            rampartConfig.setStsAlias(childElement.getText().trim());
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.PW_CB_CLASS_LN));
        if (childElement != null) {
            rampartConfig.setPwCbClass(childElement.getText().trim());
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.POLICY_VALIDATOR_CB_CLASS_LN));
        if (childElement != null) {
            rampartConfig.setPolicyValidatorCbClass(childElement.getText().trim());
        }       
                     
        // handle ssl config 
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.SSL_CONFIG));
        if (childElement != null) {                           
          SSLConfig sslConfig = (SSLConfig)new SSLConfigBuilder().
                                    build(childElement,
                                factory);
            rampartConfig.setSSLConfig(sslConfig);
           
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.SIG_CRYPTO_LN));
        if (childElement != null) {
            rampartConfig.setSigCryptoConfig((CryptoConfig) factory
                    .build(childElement.getFirstElement()));
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.ENCR_CRYPTO_LN));
        if (childElement != null) {
            rampartConfig.setEncrCryptoConfig((CryptoConfig) factory
                    .build(childElement.getFirstElement()));
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.STS_CRYPTO_LN));
        if (childElement != null) {
            rampartConfig.setStsCryptoConfig((CryptoConfig) factory
                    .build(childElement.getFirstElement()));
        }

        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.TS_PRECISION_IN_MS_LN));
        if (childElement != null) {
            rampartConfig.setTimestampPrecisionInMilliseconds(childElement.getText().trim());
        }
       
        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.TS_TTL_LN));
        if (childElement != null) {
            rampartConfig.setTimestampTTL(childElement.getText().trim());
        }

        childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.TS_MAX_SKEW_LN));
        if (childElement != null) {
            rampartConfig.setTimestampMaxSkew(childElement.getText().trim());
        }
       
    childElement = element.getFirstChildWithName(new QName(
                RampartConfig.NS, RampartConfig.OPTIMISE_PARTS));
        if (childElement != null) {
          OptimizePartsConfig config = (OptimizePartsConfig)new OptimizePartsBuilder().
            build(childElement, factory);
          rampartConfig.setOptimizeParts(config);
        }

        return rampartConfig;
    }
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

            return;
        }

        this.servicePolicy = this.policyData.getIssuerPolicy();

        RampartConfig rampartConfig = policyData.getRampartConfig();
        if (rampartConfig != null) {
            /*
            * Copy crypto info into the new issuer policy
            */
            RampartConfig rc = new RampartConfig();
            rc.setEncrCryptoConfig(rampartConfig.getEncrCryptoConfig());
            rc.setSigCryptoConfig(rampartConfig.getSigCryptoConfig());
            rc.setDecCryptoConfig(rampartConfig.getDecCryptoConfig());
            rc.setUser(rampartConfig.getUser());
            rc.setUserCertAlias(rc.getUserCertAlias());
            rc.setEncryptionUser(rampartConfig.getEncryptionUser());
            rc.setPwCbClass(rampartConfig.getPwCbClass());
            rc.setSSLConfig(rampartConfig.getSSLConfig());

            this.servicePolicy.addAssertion(rc);
        }

        List it = (List) this.servicePolicy.getAlternatives().next();
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

      if(tlog.isDebugEnabled()){
        t0 = System.currentTimeMillis();
      }
        RampartPolicyData rpd = rmd.getPolicyData();
        Document doc = rmd.getDocument();
        RampartConfig config = rpd.getRampartConfig();

        /*
         * We need to hold on to these two element to use them as refence in the
         * case of encypting the signature
         */
 
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

       
    }
   
    public static Policy addRampartConfig (RampartMessageData rmd, Policy policy) {
       
        RampartConfig servicRampConf = rmd.getPolicyData().getRampartConfig();       
        RampartConfig stsRampConf = new RampartConfig();
       
        //TODO copy all the properties of service ramp conf to sts ramp conf
        stsRampConf.setUser(servicRampConf.getUser());
        stsRampConf.setSigCryptoConfig(servicRampConf.getSigCryptoConfig());
        stsRampConf.setPwCbClass(servicRampConf.getPwCbClass());
       
        stsRampConf.setEncryptionUser(servicRampConf.getStsAlias());
        stsRampConf.setEncrCryptoConfig(servicRampConf.getStsCryptoConfig());
       
        policy.addAssertion(stsRampConf);
       
        return policy;
       
View Full Code Here

Examples of org.apache.rampart.policy.model.RampartConfig

    }
   

    public static int getTimeToLive(RampartMessageData messageData) {

        RampartConfig rampartConfig = messageData.getPolicyData().getRampartConfig();
        if (rampartConfig != null) {
            String ttl = rampartConfig.getTimestampTTL();
            int ttl_i = 0;
            if (ttl != null) {
                try {
                    ttl_i = Integer.parseInt(ttl);
                } catch (NumberFormatException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.