[java-shib-common COMMIT] in /branches/REL_1: doc/RELEASE-NOTES.txt src/main/java/edu/internet2/middleware/shibboleth...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Feb 25 15:28:14 EST 2015
Author: putmanb
Date: Wed Feb 25 15:28:14 2015
New Revision: 1128
URL: http://svn.shibboleth.net/view/java-shib-common?rev=1128&view=rev
Log:
SC-202: MetadataPKIXValidationInformationResolver should automatically include entityID in resolved trusted names
Modified:
branches/REL_1/doc/RELEASE-NOTES.txt
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolver.java
branches/REL_1/src/test/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolverTest.java
Modified: branches/REL_1/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/doc/RELEASE-NOTES.txt?rev=1128&r1=1127&r2=1128&view=diff
==============================================================================
--- branches/REL_1/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_1/doc/RELEASE-NOTES.txt Wed Feb 25 15:28:14 2015
@@ -3,6 +3,7 @@
[SC-200] - Update AbstractReloadingMetadataProviderBeanDefinitionParser to by default produce providers which have their own internal Timer for background tasks
[SC-201] - Metadata provider parsers don't proper handle parserPoolRef schema attribute
+[SC-202] - MetadataPKIXValidationInformationResolver should automatically include entityID in resolved trusted names
Changes in Release 1.4.3
=============================================
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolver.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolver.java?rev=1128&r1=1127&r2=1128&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolver.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolver.java Wed Feb 25 15:28:14 2015
@@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -200,8 +201,10 @@
trustedNames = retrieveTrustedNamesFromMetadata(entityID, role, protocol, usage);
cacheTrustedNames(cacheKey, trustedNames);
}
-
- return trustedNames;
+
+ HashSet<String> temp = new HashSet<String>(trustedNames);
+ temp.add(entityID);
+ return temp;
}
/** {@inheritDoc} */
Modified: branches/REL_1/src/test/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolverTest.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/test/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolverTest.java?rev=1128&r1=1127&r2=1128&view=diff
==============================================================================
--- branches/REL_1/src/test/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolverTest.java (original)
+++ branches/REL_1/src/test/java/edu/internet2/middleware/shibboleth/common/security/MetadataPKIXValidationInformationResolverTest.java Wed Feb 25 15:28:14 2015
@@ -92,8 +92,9 @@
assertNotNull("Set of resolved trusted names was null", names);
assertFalse("Set of trusted names was empty", names.isEmpty());
- assertEquals("Set of trusted names had incorrect size", 1, names.size());
+ assertEquals("Set of trusted names had incorrect size", 2, names.size());
assertTrue("Did't find expected name value", names.contains("foo.example.org"));
+ assertTrue("Did't find expected name value", names.contains(fooEntityID));
criteriaSet.clear();
criteriaSet.add( new UsageCriteria(UsageType.SIGNING) );
@@ -108,9 +109,10 @@
assertNotNull("Set of resolved trusted names was null", names);
assertFalse("Set of trusted names was empty", names.isEmpty());
- assertEquals("Set of trusted names had incorrect size", 2, names.size());
+ assertEquals("Set of trusted names had incorrect size", 3, names.size());
assertTrue("Did't find expected name value", names.contains("CN=foo.example.org,O=Internet2"));
assertTrue("Did't find expected name value", names.contains("idp.example.org"));
+ assertTrue("Did't find expected name value", names.contains(fooEntityID));
criteriaSet.clear();
criteriaSet.add( new UsageCriteria(UsageType.SIGNING) );
@@ -124,7 +126,9 @@
}
assertNotNull("Set of resolved trusted names was null", names);
- assertTrue("Set of trusted names was not empty", names.isEmpty());
+ assertFalse("Set of trusted names was empty", names.isEmpty());
[... 6 lines stripped ...]
More information about the commits
mailing list