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

noreply at shibboleth.net noreply at shibboleth.net
Mon Feb 23 18:49:56 EST 2015


Author: putmanb
Date: Mon Feb 23 18:49:56 2015
New Revision: 7372

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7372&view=rev
Log:
IDP-611: Complete testing of TLS TrustEngines for HTTP and dynamic HTTP metadata providers

Added:
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamic-https-noTrustEngine.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamic-https-trustEngine-explicitKey.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamic-https-trustEngine-invalidKey.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamic-https-trustEngine-invalidPKIX.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/dynamic-https-trustEngine-validPKIX.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-noTrustEngine.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-trustEngine-explicitKey.xml
      - copied, changed from r7369, trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-trustEngine.xml
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-trustEngine-invalidKey.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-trustEngine-invalidPKIX.xml   (with props)
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-trustEngine-validPKIX.xml   (with props)
Modified:
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
    trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/HTTPMetadataProviderParserTest.java
    trunk/idp-profile-spring/src/test/resources/net/shibboleth/idp/profile/spring/relyingparty/metadata/https-trustEngine.xml

Modified: trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java?rev=7372&r1=7371&r2=7372&view=diff
==============================================================================
--- trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java (original)
+++ trunk/idp-profile-spring/src/test/java/net/shibboleth/idp/profile/spring/relyingparty/metadata/DynamicHTTPMetadataProviderParserTest.java Mon Feb 23 18:49:56 2015
@@ -177,5 +177,73 @@
         Assert.assertNotNull(ed);
         Assert.assertEquals(ed.getEntityID(), entityID);
     }
+    
+    @Test
+    public void testHTTPSNoTrustEngine() throws Exception {
+        FunctionDrivenDynamicHTTPMetadataResolver resolver = getBean(FunctionDrivenDynamicHTTPMetadataResolver.class, 
+                "dynamic-https-noTrustEngine.xml", "beans.xml");
+        
+        String entityID = "https://www.example.org/sp";
+        
+        CriteriaSet criteriaSet = new CriteriaSet( new EntityIdCriterion(entityID));
+        
+        EntityDescriptor ed = resolver.resolveSingle(criteriaSet);
+        Assert.assertNotNull(ed);
+        Assert.assertEquals(ed.getEntityID(), entityID);
+    }
+    
+    @Test
+    public void testHTTPSTrustEngineExplicitKey() throws Exception {
+        FunctionDrivenDynamicHTTPMetadataResolver resolver = getBean(FunctionDrivenDynamicHTTPMetadataResolver.class, 
+                "dynamic-https-trustEngine-explicitKey.xml", "beans.xml");
+        
+        String entityID = "https://www.example.org/sp";
+        
+        CriteriaSet criteriaSet = new CriteriaSet( new EntityIdCriterion(entityID));
+        
+        EntityDescriptor ed = resolver.resolveSingle(criteriaSet);
+        Assert.assertNotNull(ed);
+        Assert.assertEquals(ed.getEntityID(), entityID);
+    }
+    
+    @Test
+    public void testHTTPSTrustEngineInvalidKey() throws Exception {
+        FunctionDrivenDynamicHTTPMetadataResolver resolver = getBean(FunctionDrivenDynamicHTTPMetadataResolver.class, 
+                "dynamic-https-trustEngine-invalidKey.xml", "beans.xml");
+        
+        String entityID = "https://www.example.org/sp";
+        
+        CriteriaSet criteriaSet = new CriteriaSet( new EntityIdCriterion(entityID));
+        
+        EntityDescriptor ed = resolver.resolveSingle(criteriaSet);
+        Assert.assertNull(ed);
+    }
+    
+    @Test

[... 114 lines stripped ...]


More information about the commits mailing list