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

Examples of org.apache.cxf.ws.security.wss4j.CryptoCoverageChecker.XPathExpression


    @Test
    public void testSignedWithIncompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no prefixes.
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                null,
                Arrays.asList(new XPathExpression(
                        "//*", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no expressions.
        this.runInterceptorAndValidate(
View Full Code Here


                true);
       
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                true);
    }
View Full Code Here

    @Test
    public void testEncryptedWithIncompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "encrypted_missing_enc_header.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                false);
       
        this.runInterceptorAndValidate(
                "encrypted_body_content.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                false);
       
        this.runInterceptorAndValidate(
                "encrypted_body_element.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.CONTENT)),
                false);
    }
View Full Code Here

    @Test
    public void testEncryptedWithCompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "encrypted_body_content.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                true);
       
        this.runInterceptorAndValidate(
                "encrypted_body_element.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                true);
       
        this.runInterceptorAndValidate(
                "encrypted_body_content.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.CONTENT)),
                true);
    }
View Full Code Here

    @Test
    public void testSignedWithIncompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no prefixes.
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                null,
                Arrays.asList(new XPathExpression(
                        "//*", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This fails as the SOAP Body is not signed
        this.runInterceptorAndValidate(
View Full Code Here

                true);
       
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                true);
    }
View Full Code Here

    @Test
    public void testSignedWithIncompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no prefixes.
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial_missing_signed_header.xml",
                null,
                Arrays.asList(new XPathExpression(
                        "//*", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                false);
       
        // This is mostly testing that things work with no expressions.
        this.runInterceptorAndValidate(
View Full Code Here

                true);
       
        this.runInterceptorAndValidate(
                "signed_x509_issuer_serial.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.SIGNED, CoverageScope.ELEMENT)),
                true);
    }
View Full Code Here

    @Test
    public void testEncryptedWithIncompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "encrypted_missing_enc_header.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                false);
       
        this.runInterceptorAndValidate(
                "encrypted_body_content.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                false);
       
        this.runInterceptorAndValidate(
                "encrypted_body_element.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.CONTENT)),
                false);
    }
View Full Code Here

    @Test
    public void testEncryptedWithCompleteCoverage() throws Exception {
        this.runInterceptorAndValidate(
                "encrypted_body_content.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//ser:Header", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                true);
       
        this.runInterceptorAndValidate(
                "encrypted_body_element.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.ELEMENT)),
                true);
       
        this.runInterceptorAndValidate(
                "encrypted_body_content.xml",
                this.getPrefixes(),
                Arrays.asList(new XPathExpression(
                        "//soap:Body", CoverageType.ENCRYPTED, CoverageScope.CONTENT)),
                true);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.security.wss4j.CryptoCoverageChecker.XPathExpression

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.