Support new XML Beans for changed SPConfig XSD syntax
authorgilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 28 Mar 2005 01:23:40 +0000 (01:23 +0000)
committergilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Mon, 28 Mar 2005 01:23:40 +0000 (01:23 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1339 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/serviceprovider/AttributeRequestor.java
src/edu/internet2/middleware/shibboleth/serviceprovider/ServiceProviderConfig.java

index 42fa831..a80c009 100644 (file)
@@ -110,9 +110,6 @@ public class AttributeRequestor {
                        return false;
                }
                Application applicationConfig = appinfo.getApplicationConfig();
-               boolean signRequest = applicationConfig.getSignRequest();
-               boolean signedAssertions = applicationConfig.getSignedAssertions();
-               boolean signedResponse = applicationConfig.getSignedResponse();
                
                SAMLRequest request = null;
                
@@ -144,10 +141,6 @@ public class AttributeRequestor {
             return false;
         }
                
-               if (signRequest) {
-                       // TODO Attribute requests are not typically signed, but add
-                       // code to do so optionally later.
-               }
                
                // ShibBinding will extract URLs from the Metadata and build
                // parameters so SAML can create the session. It also interfaces
@@ -162,22 +155,17 @@ public class AttributeRequestor {
                        return false;
                }
                
-               if (signedResponse && 
-                       !response.isSigned()) {
-                       log.error("AttributeRequestor rejected unsigned attribute response from "+session.getEntityId());
-                       return false;
-               }
                
                // Check each assertion in the response.
         int acount = 0;
                Iterator assertions = response.getAssertions();
                while (assertions.hasNext()) {
                        SAMLAssertion assertion = (SAMLAssertion) assertions.next();
-                       if (signedAssertions && !assertion.isSigned()) {
-                               log.warn("AttributeRequestor has removed unsigned assertion from response from "+session.getEntityId());
-                               response.removeAssertion(acount);
-                               continue;
-                       }
+//                     if (signedAssertions && !assertion.isSigned()) {
+//                             log.warn("AttributeRequestor has removed unsigned assertion from response from "+session.getEntityId());
+//                             response.removeAssertion(acount);
+//                             continue;
+//                     }
                        
             try {
                 appinfo.applyAAP(assertion,aa); // apply each AAP to this assertion
index 3711943..10e2877 100644 (file)
@@ -156,15 +156,15 @@ import org.w3c.dom.Node;
 
 import x0.maceShibboleth1.AttributeAcceptancePolicyDocument;
 import x0.maceShibbolethTargetConfig1.ApplicationDocument;
+import x0.maceShibbolethTargetConfig1.LocalConfigurationType;
 import x0.maceShibbolethTargetConfig1.PluggableType;
 import x0.maceShibbolethTargetConfig1.RequestMapDocument;
+import x0.maceShibbolethTargetConfig1.SPConfigType;
 import x0.maceShibbolethTargetConfig1.ShibbolethTargetConfigDocument;
 import x0.maceShibbolethTargetConfig1.ApplicationDocument.Application;
 import x0.maceShibbolethTargetConfig1.ApplicationsDocument.Applications;
 import x0.maceShibbolethTargetConfig1.HostDocument.Host;
 import x0.maceShibbolethTargetConfig1.PathDocument.Path;
-import x0.maceShibbolethTargetConfig1.SHIREDocument.SHIRE;
-import x0.maceShibbolethTargetConfig1.ShibbolethTargetConfigDocument.ShibbolethTargetConfig;
 import edu.internet2.middleware.shibboleth.aap.AAP;
 import edu.internet2.middleware.shibboleth.aap.AttributeRule;
 import edu.internet2.middleware.shibboleth.common.Credentials;
@@ -191,7 +191,7 @@ public class ServiceProviderConfig {
        private static final String INLINEURN = "urn:inlineBS:ID";
     private static Logger log = Logger.getLogger(ServiceProviderConfig.class);
 
-       private ShibbolethTargetConfig  // The XMLBean from the main config file
+       private SPConfigType  // The XMLBean from the main config file
                config = null;              // (i.e. shibboleth.xml)
        
        
@@ -419,7 +419,7 @@ public class ServiceProviderConfig {
                }
                
                // Extract the "root Element" object from the "Document" object
-               ShibbolethTargetConfig config = configBeanDoc.getShibbolethTargetConfig();
+               SPConfigType config = configBeanDoc.getShibbolethTargetConfig();
                
                Applications apps = config.getApplications(); // <Applications>
                
@@ -445,9 +445,6 @@ public class ServiceProviderConfig {
                defaultApp.setProviderId(apps.getProviderId());
                defaultApp.setRevocationProviderArray(apps.getRevocationProviderArray());
                defaultApp.setSessions(apps.getSessions());
-               defaultApp.setSignedAssertions(apps.getSignedAssertions());
-               defaultApp.setSignedResponse(apps.getSignedResponse());
-               defaultApp.setSignRequest(apps.getSignRequest());
                defaultApp.setTrustProviderArray(apps.getTrustProviderArray());
                
                /*
@@ -804,7 +801,7 @@ public class ServiceProviderConfig {
        
        
        private boolean processPluggableRequestMapProvider(){
-           SHIRE shire = config.getSHIRE();
+           LocalConfigurationType shire = config.getSHIRE();
            PluggableType mapProvider = shire.getRequestMapProvider();
            
            String pluggabletype = mapProvider.getType();