[java-identity-provider COMMIT] in /trunk/idp-profile-spring/src: main/java/net/shibboleth/idp/profile/spring/relying...

noreply at shibboleth.net noreply at shibboleth.net
Tue Apr 29 05:05:44 EDT 2014


Author: rdw
Date: Tue Apr 29 05:05:43 2014
New Revision: 5790

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5790&view=rev
Log:
IDP-401 "encryptAttributes" for SAML2 profiles

Modified:
    trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAML2ProfileConfigurationParser.java
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/saml/SAML2BrowserSSOProfileTest.java
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/saml2SSOValues.xml

Modified: trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAML2ProfileConfigurationParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAML2ProfileConfigurationParser.java?rev=5790&r1=5789&r2=5790&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAML2ProfileConfigurationParser.java (original)
+++ trunk/idp-profile-spring/src/main/java/net/shibboleth/idp/profile/spring/relyingparty/saml/BaseSAML2ProfileConfigurationParser.java Tue Apr 29 05:05:43 2014
@@ -61,12 +61,15 @@
         if (element.hasAttributeNS(null, "encryptionOptional")) {
             builder.addPropertyValue("encryptionOptional", element.getAttributeNS(null, "encryptionOptional"));
         }
-        
+
         builder.addPropertyValue("encryptAssertionsPredicate",
                 predicateForEncryption(element.getAttributeNS(null, "encryptAssertions"), "conditional"));
         builder.addPropertyValue("encryptNameIDsPredicate",
                 predicateForEncryption(element.getAttributeNS(null, "encryptNameIds"), "never"));
-        // default encryptAttributesPredicate
+        if (element.hasAttributeNS(null, "encryptAttributes")) {
+            builder.addPropertyValue("encryptAttributesPredicate",
+                    predicateForEncryption(element.getAttributeNS(null, "encryptAttributes"), "never"));
+        }
         if (element.hasAttributeNS(null, "assertionProxyCount")) {
             builder.addPropertyValue("proxyCount", element.getAttributeNS(null, "assertionProxyCount"));
         }

Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/saml/SAML2BrowserSSOProfileTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/saml/SAML2BrowserSSOProfileTest.java?rev=5790&r1=5789&r2=5790&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/saml/SAML2BrowserSSOProfileTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/saml/SAML2BrowserSSOProfileTest.java Tue Apr 29 05:05:43 2014
@@ -49,6 +49,7 @@
         assertConditionalPredicate(profile.getSignRequestsPredicate());
         assertTruePredicate(profile.getSignAssertionsPredicate());
         assertFalsePredicate(profile.getSignResponsesPredicate());
+        assertFalsePredicate(profile.getEncryptAttributesPredicate());
         Assert.assertEquals(profile.getAssertionLifetime(), 5 * 60 * 1000);
         Assert.assertTrue(profile.getAdditionalAudiencesForAssertion().isEmpty());
         Assert.assertTrue(profile.includeConditionsNotBefore());
@@ -76,6 +77,7 @@
         assertConditionalPredicate(profile.getSignRequestsPredicate());
         assertTruePredicate(profile.getSignAssertionsPredicate());
         assertFalsePredicate(profile.getSignResponsesPredicate());
+        assertTruePredicate(profile.getEncryptAttributesPredicate());
         Assert.assertEquals(profile.getAssertionLifetime(), 5 * 60 * 1000);
         Assert.assertTrue(profile.getAdditionalAudiencesForAssertion().isEmpty());
         Assert.assertTrue(profile.includeConditionsNotBefore());

Modified: trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/saml2SSOValues.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/saml2SSOValues.xml?rev=5790&r1=5789&r2=5790&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/saml2SSOValues.xml (original)
+++ trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/saml/saml2SSOValues.xml Tue Apr 29 05:05:43 2014
@@ -9,6 +9,7 @@
 	<rp:ProfileConfiguration xsi:type="saml:SAML2SSOProfile"
 		includeAttributeStatement="false" securityPolicyRef="ignore"
 		maximumSPSessionLifetime="1" encryptionOptional="true"
+		encryptAttributes="always"

[... 4 lines stripped ...]


More information about the commits mailing list