ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1659323 - in /webservices/wss4j/trunk: ws-security-common/src/main/java/org/apache/wss4j/common/saml/ ws-security-dom/src/main/java/org/apache/wss4j/dom/validate/ ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/
Date Thu, 12 Feb 2015 17:10:06 GMT
Author: coheigea
Date: Thu Feb 12 17:10:05 2015
New Revision: 1659323

URL: http://svn.apache.org/r1659323
Log:
Removing OpenSAML 2.x "Validators"

Modified:
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/validate/SamlAssertionValidator.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java?rev=1659323&r1=1659322&r2=1659323&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
(original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/SamlAssertionWrapper.java
Thu Feb 12 17:10:05 2015
@@ -981,48 +981,6 @@ public class SamlAssertionWrapper {
     }
     
     /**
-     * Validate the samlAssertion against schemas/profiles
-     */
-    public void validateAssertion(boolean validateSignatureAgainstProfile) throws WSSecurityException
{
-        if (validateSignatureAgainstProfile) {
-            validateSignatureAgainstProfile();
-        }
-        /*
-         * TODO 
-        if (getSaml1() != null) {
-            ValidatorSuite schemaValidators = 
-                org.opensaml.core.config.Configuration.getValidatorSuite("saml1-schema-validator");
-            ValidatorSuite specValidators = 
-                org.opensaml.core.config.Configuration.getValidatorSuite("saml1-spec-validator");
-            try {
-                schemaValidators.validate(getSaml1());
-                specValidators.validate(getSaml1());
-            } catch (ValidationException e) {
-                LOG.debug("Saml Validation error: " + e.getMessage(), e);
-                throw new WSSecurityException(
-                    WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity", e
-                );
-            }
-        } else if (getSaml2() != null) {
-            ValidatorSuite schemaValidators = 
-                org.opensaml.core.config.Configuration.getValidatorSuite("saml2-core-schema-validator");
-            ValidatorSuite specValidators = 
-                org.opensaml.core.config.Configuration.getValidatorSuite("saml2-core-spec-validator");
-            try {
-                schemaValidators.validate(getSaml2());
-                specValidators.validate(getSaml2());
-            } catch (ValidationException e) {
-                LOG.debug("Saml Validation error: " + e.getMessage(), e);
-                throw new WSSecurityException(
-                    WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity", e
-                );
-            }
-        }
-        */
-    }
-
-    
-    /**
      * Parse the DOM Element into Opensaml objects.
      */
     private void parseElement(Element element) throws WSSecurityException {

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/validate/SamlAssertionValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/validate/SamlAssertionValidator.java?rev=1659323&r1=1659322&r2=1659323&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/validate/SamlAssertionValidator.java
(original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/validate/SamlAssertionValidator.java
Thu Feb 12 17:10:05 2015
@@ -277,7 +277,9 @@ public class SamlAssertionValidator exte
      * Validate the samlAssertion against schemas/profiles
      */
     protected void validateAssertion(SamlAssertionWrapper samlAssertion) throws WSSecurityException
{
-        samlAssertion.validateAssertion(validateSignatureAgainstProfile);
+        if (validateSignatureAgainstProfile) {
+            samlAssertion.validateSignatureAgainstProfile();
+        }
     }
 
     /**

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java?rev=1659323&r1=1659322&r2=1659323&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java
(original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java
Thu Feb 12 17:10:05 2015
@@ -273,7 +273,9 @@ public class SamlTokenValidatorImpl exte
      * Validate the samlAssertion against schemas/profiles
      */
     protected void validateAssertion(SamlAssertionWrapper samlAssertion) throws WSSecurityException
{
-        samlAssertion.validateAssertion(validateSignatureAgainstProfile);
+        if (validateSignatureAgainstProfile) {
+            samlAssertion.validateSignatureAgainstProfile();
+        }
     }
 
     public boolean isRequireStandardSubjectConfirmationMethod() {



Mime
View raw message