Package org.apache.cxf.ws.security.wss4j

Examples of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor


        CustomSamlValidator validator = new CustomSamlValidator();
        customMap.put(WSSecurityEngine.SAML_TOKEN, validator);
        customMap.put(WSSecurityEngine.SAML2_TOKEN, validator);
        inProperties.put(WSS4JInInterceptor.VALIDATOR_MAP, customMap);
       
        WSS4JInInterceptor inInterceptor = new WSS4JInInterceptor(inProperties);
        service.getInInterceptors().add(inInterceptor);
       
        // Create + configure client
        Echo echo = createClientProxy();
       
View Full Code Here


        inProps.put("signaturePropFile", "etc/Server_SignVerf.properties");
        inProps.put("signatureKeyIdentifier", "DirectReference");
        inProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");

        impl.getInInterceptors().add(new WSS4JInInterceptor(inProps));

        // Check to make sure that the SOAP Body and Timestamp were signed
        DefaultCryptoCoverageChecker coverageChecker = new DefaultCryptoCoverageChecker();
        impl.getInInterceptors().add(coverageChecker);
View Full Code Here

        // inProps.put("encryptionKeyIdentifier", "IssuerSerial");

        inProps.put("signaturePropFile", "wssecurity/etc/Client_Encrypt.properties");
        inProps.put("signatureKeyIdentifier", "DirectReference");

        return new WSS4JInInterceptor(inProps);

    }
View Full Code Here

            coverageChecker.setEncryptBody(true);

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();
            org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
            client.getInInterceptors().add(new WSS4JInInterceptor(inProps));
            client.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
            client.getInInterceptors().add(coverageChecker);
           

            String[] names = new String[] {"Anne", "Bill", "Chris", "Sachin Tendulkar"};
View Full Code Here

        inProps.put("signatureKeyIdentifier", "DirectReference");
        inProps.put("encryptionKeyTransportAlgorithm",
                    "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
        inProps.put("signatureAlgorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");

        endpoint.getInInterceptors().add(new WSS4JInInterceptor(inProps));

        // Check to make sure that the SOAP Body and Timestamp were signed,
        // and that the SOAP Body was encrypted
        DefaultCryptoCoverageChecker coverageChecker = new DefaultCryptoCoverageChecker();
        coverageChecker.setSignBody(true);
View Full Code Here

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();
            org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
            client.getOutInterceptors().add(new WSS4JOutInterceptor(outProps));
            client.getInInterceptors().add(new WSS4JInInterceptor(inProps));
            client.getInInterceptors().add(coverageChecker);

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
            // make a sequence of 4 invocations
            for (int i = 0; i < 4; i++) {
View Full Code Here

            inProps.put("passwordCallbackClass", "demo.wssec.client.UTPasswordCallback");

            inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
            inProps.put("signatureKeyIdentifier", "DirectReference");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Scott"};
View Full Code Here

            inProps.put("encryptionKeyIdentifier", "IssuerSerial");

            inProps.put("signaturePropFile", "etc/Client_Encrypt.properties");
            inProps.put("signatureKeyIdentifier", "DirectReference");

            bus.getInInterceptors().add(new WSS4JInInterceptor(inProps));

            GreeterService service = new GreeterService();
            Greeter port = service.getGreeterPort();

            String[] names = new String[] {"Anne", "Bill", "Chris", "Sachin Tendulkar"};
View Full Code Here

            {
                properties.put(SecurityConstants.USERNAME_TOKEN_VALIDATOR, wsSecurity.getSecurityManager());
            }
            if(wsSecurity.getConfigProperties() != null && !wsSecurity.getConfigProperties().isEmpty())
            {
                sfb.getInInterceptors().add(new WSS4JInInterceptor(wsSecurity.getConfigProperties()));
            }
        }
    }
View Full Code Here

        serviceMessageProcessorBuilder.setServiceClass(Echo.class);

        CxfInboundMessageProcessor messageProcessor = serviceMessageProcessorBuilder.build();

        assertNotNull(messageProcessor);
        WSS4JInInterceptor wss4JInInterceptor = getInterceptor(messageProcessor.getServer().getEndpoint().getInInterceptors());
        assertNotNull(wss4JInInterceptor);
       
        Map<String, Object> wss4jProperties = wss4JInInterceptor.getProperties();
        assertFalse(wss4jProperties.isEmpty());
       
        assertEquals(WSHandlerConstants.USERNAME_TOKEN, wss4jProperties.get(WSHandlerConstants.ACTION));
       
        Map<String, Object> properties = serviceMessageProcessorBuilder.getProperties();
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor

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.