[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/CertificateCo...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Sep 17 16:27:51 EDT 2014
Author: scantor
Date: Wed Sep 17 16:27:51 2014
New Revision: 6542
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6542&view=rev
Log:
IDP-229 - Extend external servlet to handle cert chain, add internal actions and flow.
Added:
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromRequest.java
- copied, changed from r6527, trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromWSSToken.java
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromRequestTest.java (with props)
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateX509CertificateTest.java (with props)
trunk/idp-conf/src/main/resources/conf/authn/x509-internal-authn-config.xml (with props)
trunk/idp-conf/src/main/resources/system/flows/authn/x509-internal-authn-beans.xml (with props)
trunk/idp-conf/src/main/resources/system/flows/authn/x509-internal-authn-flow.xml (with props)
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/CertificateContext.java
trunk/idp-authn-impl/pom.xml
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractX509CertificateFromWSSToken.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateKerberosTicket.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateX509Certificate.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/X509AuthServlet.java
trunk/idp-conf/src/main/resources/conf/authn/general-authn.xml
trunk/idp-conf/src/main/resources/system/conf/webflow-config.xml
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/CertificateContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/CertificateContext.java?rev=6542&r1=6541&r2=6542&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/CertificateContext.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/CertificateContext.java Wed Sep 17 16:27:51 2014
@@ -18,10 +18,19 @@
package net.shibboleth.idp.authn.context;
import java.security.cert.Certificate;
+import java.util.Collection;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
+import net.shibboleth.utilities.java.support.logic.Constraint;
+
import org.opensaml.messaging.context.BaseContext;
+
+import com.google.common.base.Predicates;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.Lists;
/**
* Context, usually attached to {@link AuthenticationContext}, that carries a {@link Certificate} to be
@@ -31,9 +40,17 @@
/** The certificate to be validated. */
@Nullable private Certificate certificate;
+
+ /** Additional certificates as input to validation. */
+ @Nonnull @NonnullElements private Collection<Certificate> intermediates;
+ /** Constructor. */
+ public CertificateContext() {
+ intermediates = Lists.newArrayList();
+ }
+
/**
- * Gets the certificate to be validated.
+ * Get the certificate to be validated.
*
* @return the certificate to be validated
*/
@@ -42,7 +59,7 @@
}
/**
- * Sets the certificate to be validated.
+ * Set the certificate to be validated.
*
* @param cert certificate to be validated
*
@@ -53,4 +70,29 @@
return this;
}
+ /**
+ * Get any additional certificates accompanying the end-entity certificate.
+ *
+ * @return any additional certificates
+ */
+ @Nonnull @NonnullElements public Collection<Certificate> getIntermediates() {
+ return intermediates;
+ }
+
+ /**
+ * Set the additional certificates accompanying the end-entity certificate.
+ *
+ * @param certs additional certificates
+ *
+ * @return this context
+ */
+ public CertificateContext setIntermediates(@Nonnull @NonnullElements final Collection<Certificate> certs) {
+ Constraint.isNotNull(certs, "Intermediate certificate collection cannot be null");
+
+ intermediates.clear();
+ intermediates.addAll(Collections2.filter(certs, Predicates.notNull()));
+
+ return this;
+ }
+
}
Modified: trunk/idp-authn-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/pom.xml?rev=6542&r1=6541&r2=6542&view=diff
==============================================================================
--- trunk/idp-authn-impl/pom.xml (original)
+++ trunk/idp-authn-impl/pom.xml Wed Sep 17 16:27:51 2014
@@ -86,6 +86,13 @@
</dependency>
<dependency>
+ <groupId>${opensaml.groupId}</groupId>
+ <artifactId>opensaml-security-impl</artifactId>
[... 334 lines stripped ...]
More information about the commits
mailing list