Examples of EncryptionProperties


Examples of org.apache.cxf.rs.security.xml.EncryptionProperties

                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
        properties.put("ws-security.encryption.username", "bob");
        properties.put("ws-security.encryption.properties",
                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
       
        EncryptionProperties encryptionProperties = new EncryptionProperties();
        String aes128GCM = "http://www.w3.org/2009/xmlenc11#aes128-gcm";
        encryptionProperties.setEncryptionSymmetricKeyAlgo(aes128GCM);
        encryptionProperties.setEncryptionKeyIdType(SecurityUtils.X509_CERT);
       
        doTestPostEncryptedBook(address, false, properties, encryptionProperties, false, test.streaming);
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.xml.EncryptionProperties

                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
        properties.put("ws-security.encryption.username", "bob");
        properties.put("ws-security.encryption.properties",
                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
       
        EncryptionProperties encryptionProperties = new EncryptionProperties();
        encryptionProperties.setEncryptionSymmetricKeyAlgo(XMLCipher.AES_128);
        encryptionProperties.setEncryptionKeyIdType(SecurityUtils.X509_CERT);
        encryptionProperties.setEncryptionDigestAlgo(XMLCipher.SHA256);
       
        doTestPostEncryptedBook(
            address, false, properties, encryptionProperties, false, test.streaming
        );
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.xml.EncryptionProperties

                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
        properties.put("ws-security.encryption.username", "bob");
        properties.put("ws-security.encryption.properties",
                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
       
        EncryptionProperties encryptionProperties = new EncryptionProperties();
        encryptionProperties.setEncryptionSymmetricKeyAlgo(XMLCipher.AES_128);
        encryptionProperties.setEncryptionKeyIdType(SecurityUtils.X509_ISSUER_SERIAL);
       
        doTestPostEncryptedBook(
            address, false, properties, encryptionProperties, false, test.streaming
        );
    }
View Full Code Here

Examples of org.apache.cxf.rs.security.xml.EncryptionProperties

                       "org/apache/cxf/systest/jaxrs/security/bob.properties");
        properties.put("ws-security.signature.username", "alice");
        properties.put("ws-security.signature.properties",
                       "org/apache/cxf/systest/jaxrs/security/alice.properties");
       
        EncryptionProperties encryptionProperties = new EncryptionProperties();
        encryptionProperties.setEncryptionSymmetricKeyAlgo(
            "http://www.w3.org/2009/xmlenc11#aes128-gcm");
        encryptionProperties.setEncryptionKeyIdType(SecurityUtils.X509_CERT);
       
        try {
            doTestPostEncryptedBook(address, true, properties, encryptionProperties, true, test.streaming);
        } catch (BadRequestException ex) {
            assertEquals(400, ex.getResponse().getStatus());
View Full Code Here

Examples of org.apache.cxf.rs.security.xml.EncryptionProperties

    }
   
    public void doTestPostEncryptedBook(String address, boolean sign, Map<String, Object> properties,
                                        boolean streaming)
        throws Exception {
        EncryptionProperties encryptionProperties = new EncryptionProperties();
        encryptionProperties.setEncryptionSymmetricKeyAlgo(XMLCipher.AES_128);
        encryptionProperties.setEncryptionKeyIdType(SecurityUtils.X509_CERT);
        doTestPostEncryptedBook(
            address, sign, properties, encryptionProperties, false, test.streaming
        );
    }
View Full Code Here

Examples of org.apache.cxf.sts.service.EncryptionProperties

                );
            }
   
            // prepare response
            try {
                EncryptionProperties encryptionProperties = renewerParameters.getEncryptionProperties();
                RequestSecurityTokenResponseType response =
                    createResponse(
                        encryptionProperties, tokenRenewerResponse, tokenRequirements, keyRequirements, context
                    );
                STSRenewSuccessEvent event = new STSRenewSuccessEvent(renewerParameters,
View Full Code Here

Examples of org.apache.cxf.sts.service.EncryptionProperties

        RequestClaimCollection claims = tokenRequirements.getPrimaryClaims();
        providerParameters.setRequestedPrimaryClaims(claims);
        claims = tokenRequirements.getSecondaryClaims();
        providerParameters.setRequestedSecondaryClaims(claims);
       
        EncryptionProperties encryptionProperties = stsProperties.getEncryptionProperties();
        if (address != null) {
            boolean foundService = false;
            // Get the stored Service object corresponding to the Service endpoint
            if (services != null) {
                for (ServiceMBean service : services) {
                    if (service.isAddressInEndpoints(address)) {
                        EncryptionProperties svcEncryptionProperties =
                            service.getEncryptionProperties();
                        if (svcEncryptionProperties != null) {
                            encryptionProperties = svcEncryptionProperties;
                        }
                        if (tokenRequirements.getTokenType() == null) {
View Full Code Here

Examples of org.apache.cxf.sts.service.EncryptionProperties

        stsProperties.setSignatureUsername("mystskey");
        stsProperties.setCallbackHandler(new PasswordCallbackHandler());
        stsProperties.setIssuer("STS");
        parameters.setStsProperties(stsProperties);
       
        parameters.setEncryptionProperties(new EncryptionProperties());
       
        return parameters;
    }
View Full Code Here

Examples of org.apache.cxf.sts.service.EncryptionProperties

        // stsProperties.setSignatureUsername("16c73ab6-b892-458f-abf5-2f875f74882e");
        stsProperties.setCallbackHandler(new PasswordCallbackHandler());
        stsProperties.setIssuer("STS");
        parameters.setStsProperties(stsProperties);

        parameters.setEncryptionProperties(new EncryptionProperties());

        return parameters;
    }
View Full Code Here

Examples of org.apache.cxf.sts.service.EncryptionProperties

        stsProperties.setSignatureUsername(signatureUsername);
        stsProperties.setCallbackHandler(callbackHandler);
        stsProperties.setIssuer(issuer);
        parameters.setStsProperties(stsProperties);

        parameters.setEncryptionProperties(new EncryptionProperties());

        return parameters;
    }
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.