Package com.sun.xml.wss.impl.policy

Examples of com.sun.xml.wss.impl.policy.SecurityPolicy


        //if (fpContext.isJAXRPCIntegration ()) {
        // ILs are expected to turn on the FPContext flag
        ((StaticApplicationContext) context).setOperationIdentifier(identifier);
        //} else {}
       
        SecurityPolicy policy = configuration.getSecurityConfiguration((StaticApplicationContext)context);
       
        MessagePolicy mPolicy = null;
       
        if (PolicyTypeUtil.dynamicSecurityPolicy(policy)) {
           
View Full Code Here


    throws XWSSecurityException {
       
        SecurityHeader header = fpContext.getSecurableSoapMessage().findSecurityHeader();
       
        if (header == null) {
            SecurityPolicy policy = fpContext.getSecurityPolicy();
            if (policy != null) {
                if (PolicyTypeUtil.messagePolicy(policy)) {
                    if (!((MessagePolicy)policy).isEmpty()) {
                        log.log(Level.SEVERE, LogStringsMessages.WSS_0253_INVALID_MESSAGE());
                        throw new XWSSecurityException(
View Full Code Here

        Collection d = new ArrayList();
        Iterator itr   = c.iterator();
        while (itr.hasNext()) {
            ArrayList list = (ArrayList)itr.next();
            for(int i =0;i< list.size();i++){
                SecurityPolicy policy = (SecurityPolicy)list.get(i);
                if (PolicyTypeUtil.applicationSecurityConfiguration(policy)) {
                    d.addAll(((ApplicationSecurityConfiguration)policy).getAllPolicies());
                }else{
                    d.add(policy);
                }
View Full Code Here

        Collection d = new ArrayList();
        Iterator itr   = c.iterator();
        while (itr.hasNext()) {
            ArrayList list = (ArrayList)itr.next();
            for(int i =0;i< list.size();i++){
                SecurityPolicy policy = (SecurityPolicy)list.get(i);
                if (PolicyTypeUtil.applicationSecurityConfiguration(policy)) {
                    d.addAll(((ApplicationSecurityConfiguration)policy).getAllSenderPolicies());
                }else{
                    DeclarativeSecurityConfiguration dsc = (DeclarativeSecurityConfiguration) policy;
                    MessagePolicy mp = dsc.senderSettings();
View Full Code Here

        Collection d = new ArrayList();
        Iterator itr   = c.iterator();
        while (itr.hasNext()) {
            ArrayList list = (ArrayList)itr.next();
            for(int i =0;i< list.size();i++){
                SecurityPolicy policy = (SecurityPolicy)list.get(i);
                if (PolicyTypeUtil.applicationSecurityConfiguration(policy)) {
                    d.addAll(((ApplicationSecurityConfiguration)policy).getAllReceiverPolicies());
                }else{
                    if (PolicyTypeUtil.declarativeSecurityConfiguration(policy)) {
                        DeclarativeSecurityConfiguration dsc = (DeclarativeSecurityConfiguration) policy;
View Full Code Here

    public SecurityPolicy getSecurityConfiguration(StaticApplicationContext context) {
       
        if (configForSingleServiceNoPorts != null)
           return configForSingleServiceNoPorts;

        SecurityPolicy sp = (SecurityPolicy)augmentedCtx2PolicyMap.get(context);
        if (sp != null)
            return sp;

        sp = getDSCORDSP((ArrayList)_ctx2PolicyMap.get(context));
        if (sp != null) {
View Full Code Here

        }
       
        Iterator i = list.iterator();
       
        while (i.hasNext()) {
            SecurityPolicy policy = (SecurityPolicy) i.next();
            if (PolicyTypeUtil.applicationSecurityConfiguration(policy)) {
                return ((ApplicationSecurityConfiguration)policy).getDSCORDSP();
            }
        }
       
View Full Code Here

        // iterate over the values and return the first encountered DSC or DP
        Collection c = _ctx2PolicyMap.values();
        Iterator i = c.iterator();
        while (i.hasNext()) {
            ArrayList al = (ArrayList)i.next();
            SecurityPolicy policy = (SecurityPolicy) al.iterator().next();
            if (PolicyTypeUtil.declarativeSecurityConfiguration(policy) ||
                 PolicyTypeUtil.dynamicSecurityPolicy(policy)) {
                return policy;
            }
        }
View Full Code Here

        SignaturePolicy.FeatureBinding spFB = (SignaturePolicy.FeatureBinding)sp.getFeatureBinding();
        List list = policy.getPrimaryPolicies();
        Iterator i = list.iterator();
        boolean addedSigTarget = false;
        while (i.hasNext()) {
            SecurityPolicy primaryPolicy = (SecurityPolicy) i.next();
            if(PolicyTypeUtil.signaturePolicy(primaryPolicy)){
                SignaturePolicy sigPolicy = (SignaturePolicy)primaryPolicy;
                IntegrityAssertionProcessor iAP = new IntegrityAssertionProcessor(scp.getAlgorithmSuite(), true);
                SignatureTargetCreator stc = iAP.getTargetCreator();
                SignatureTarget sigTarget = stc.newURISignatureTarget(sigPolicy.getUUID());
                SecurityPolicyUtil.setName(sigTarget, sigPolicy);
                spFB.addTargetBinding(sigTarget);
                spFB.isEndorsingSignature(true);
                addedSigTarget = true;
                break;
            }
        }

        // If no primary signature (e.g. TransportBinding), sign the
        // TimeStamp.
        if (!addedSigTarget){
            List sList = policy.getSecondaryPolicies();
            Iterator j = sList.iterator();
            while (j.hasNext()) {
                SecurityPolicy secPolicy = (SecurityPolicy) j.next();
                if(PolicyTypeUtil.timestampPolicy(secPolicy)){
                    TimestampPolicy tsPolicy = (TimestampPolicy)secPolicy;
                    IntegrityAssertionProcessor iAP = new IntegrityAssertionProcessor(scp.getAlgorithmSuite(), true);
                    SignatureTargetCreator stc = iAP.getTargetCreator();
                    SignatureTarget sigTarget = stc.newURISignatureTarget(tsPolicy.getUUID());
View Full Code Here

   
    private void deleteRenewPolicy(final MessagePolicy policy){
        ArrayList list = policy.getPrimaryPolicies();
        Iterator i = list.iterator();
        while (i.hasNext()) {
            SecurityPolicy primaryPolicy = (SecurityPolicy) i.next();
            if(PolicyTypeUtil.signaturePolicy(primaryPolicy)){
                SignaturePolicy sigPolicy = (SignaturePolicy)primaryPolicy;
                if(sigPolicy.getUUID().equals("_99")){
                    policy.remove((SecurityPolicy)sigPolicy);
                    break;
View Full Code Here

TOP

Related Classes of com.sun.xml.wss.impl.policy.SecurityPolicy

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.