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

Examples of com.sun.xml.wss.impl.policy.mls.AuthenticationTokenPolicy


       
        if (context.isInboundMessage()) {
            return;
        }
       
        AuthenticationTokenPolicy authPolicy =
                (AuthenticationTokenPolicy)context.getSecurityPolicy();
        AuthenticationTokenPolicy.X509CertificateBinding policy =
                (AuthenticationTokenPolicy.X509CertificateBinding)
                authPolicy.getFeatureBinding();
       
        X509Certificate cert = context.getSecurityEnvironment().
                getDefaultCertificate(context.getExtraneousProperties());
        if (cert == null) {
            throw new XWSSecurityException("No default X509 certificate was provided");
View Full Code Here


            }

            if (context.getMode() == FilterProcessingContext.ADHOC) {

                //try to validate against the policy
                AuthenticationTokenPolicy policy = (AuthenticationTokenPolicy)context.getSecurityPolicy();
                AuthenticationTokenPolicy.SAMLAssertionBinding samlPolicy =
                    (AuthenticationTokenPolicy.SAMLAssertionBinding)policy.getFeatureBinding();

                //ensure the authorityId if specified matches
                if (!"".equals(samlPolicy.getAuthorityIdentifier())) {
                    if (!samlPolicy.getAuthorityIdentifier().equals(samlAssertion.getSamlIssuer())) {
                        //log here
View Full Code Here

            if (policy instanceof IssuedTokenKeyBinding){
                ((IssuedTokenKeyBinding)policy).setSTRID(null);
            }else if (policy instanceof AuthenticationTokenPolicy.SAMLAssertionBinding){
                ((AuthenticationTokenPolicy.SAMLAssertionBinding)policy).setSTRID(null);
            }
            AuthenticationTokenPolicy atp = new AuthenticationTokenPolicy();
            atp.setFeatureBinding(policy);
            container.insert(atp);
        }
    }
View Full Code Here

            if (policy instanceof IssuedTokenKeyBinding){
                ((IssuedTokenKeyBinding)policy).setSTRID(null);
            }else if (policy instanceof AuthenticationTokenPolicy.SAMLAssertionBinding){
                ((AuthenticationTokenPolicy.SAMLAssertionBinding)policy).setSTRID(null);
            }
            AuthenticationTokenPolicy atp = new AuthenticationTokenPolicy();
            atp.setFeatureBinding(policy);
            container.insert(atp);
        }
    }
View Full Code Here

            if (policy instanceof IssuedTokenKeyBinding){
                ((IssuedTokenKeyBinding)policy).setSTRID(null);
            }else if (policy instanceof AuthenticationTokenPolicy.SAMLAssertionBinding){
                ((AuthenticationTokenPolicy.SAMLAssertionBinding)policy).setSTRID(null);
            }
            AuthenticationTokenPolicy atp = new AuthenticationTokenPolicy();
            atp.setFeatureBinding(policy);
            container.insert(atp);
        }
    }       
View Full Code Here

    }

   
    public void validateSAMLAssertion(Map context, Element assertion) throws XWSSecurityException {

        AuthenticationTokenPolicy authPolicy = new AuthenticationTokenPolicy();
        AuthenticationTokenPolicy.SAMLAssertionBinding samlPolicy =
                (AuthenticationTokenPolicy.SAMLAssertionBinding) authPolicy.newSAMLAssertionFeatureBinding();
        samlPolicy.setAssertion(assertion);

        DynamicPolicyCallback dynamicCallback =
                new DynamicPolicyCallback(samlPolicy, null);
        //let runtime properties be visible here
View Full Code Here

    }

    public Element locateSAMLAssertion(Map context, Element binding, String assertionId, Document ownerDoc)
            throws XWSSecurityException {

        AuthenticationTokenPolicy authPolicy = new AuthenticationTokenPolicy();
        AuthenticationTokenPolicy.SAMLAssertionBinding samlPolicy =
                (AuthenticationTokenPolicy.SAMLAssertionBinding) authPolicy.newSAMLAssertionFeatureBinding();
        samlPolicy.setAuthorityBinding(binding);
        samlPolicy.setAssertionId(assertionId);

        DynamicPolicyCallback dynamicCallback =
                new DynamicPolicyCallback(samlPolicy, null);
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    public void validateSAMLAssertion(Map context, XMLStreamReader assertion) throws XWSSecurityException {

        AuthenticationTokenPolicy authPolicy = new AuthenticationTokenPolicy();
        AuthenticationTokenPolicy.SAMLAssertionBinding samlPolicy =
                (AuthenticationTokenPolicy.SAMLAssertionBinding) authPolicy.newSAMLAssertionFeatureBinding();
        samlPolicy.setAssertion(assertion);

        DynamicPolicyCallback dynamicCallback =
                new DynamicPolicyCallback(samlPolicy, null);
//        if (!isDefaultHandler) {
View Full Code Here

TOP

Related Classes of com.sun.xml.wss.impl.policy.mls.AuthenticationTokenPolicy

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.