[java-identity-provider] 02/08: Work on wiring SAML 2 artifact decoder.
Brent Putman
putmanb at georgetown.edu
Fri Sep 21 22:49:07 EDT 2018
This is an automated email from the git hooks/post-receive script.
putmanb pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=f08c00be85320e01b30404fac36696bff149ee46
commit f08c00be85320e01b30404fac36696bff149ee46
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Wed Apr 4 16:38:31 2018 -0400
Work on wiring SAML 2 artifact decoder.
---
.../main/resources/system/conf/webflow-config.xml | 1 +
.../system/flows/saml/saml2/sso-artifact-beans.xml | 41 ++++++++++++++++++++++
.../system/flows/saml/saml2/sso-artifact-flow.xml | 8 +++++
.../idp/profile/config/SecurityConfiguration.java | 22 ++++++++++++
4 files changed, 72 insertions(+)
diff --git a/idp-conf/src/main/resources/system/conf/webflow-config.xml b/idp-conf/src/main/resources/system/conf/webflow-config.xml
index 97949db..3dc6165 100644
--- a/idp-conf/src/main/resources/system/conf/webflow-config.xml
+++ b/idp-conf/src/main/resources/system/conf/webflow-config.xml
@@ -55,6 +55,7 @@
<entry key="SAML2/POST/SSO" value="../system/flows/saml/saml2/sso-post-flow.xml" />
<entry key="SAML2/POST-SimpleSign/SSO" value="../system/flows/saml/saml2/sso-post-flow.xml" />
<entry key="SAML2/Redirect/SSO" value="../system/flows/saml/saml2/sso-redirect-flow.xml" />
+ <entry key="SAML2/Artifact/SSO" value="../system/flows/saml/saml2/sso-artifact-flow.xml" />
<entry key="SAML2/Unsolicited/SSO" value="../system/flows/saml/saml2/sso-unsolicited-flow.xml" />
<entry key="SAML2/SOAP/ECP" value="../system/flows/saml/saml2/sso-ecp-flow.xml" />
<entry key="SAML2/POST/SLO" value="../system/flows/saml/saml2/slo-post-flow.xml" />
diff --git a/idp-conf/src/main/resources/system/flows/saml/saml2/sso-artifact-beans.xml b/idp-conf/src/main/resources/system/flows/saml/saml2/sso-artifact-beans.xml
new file mode 100644
index 0000000..d32880f
--- /dev/null
+++ b/idp-conf/src/main/resources/system/flows/saml/saml2/sso-artifact-beans.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:c="http://www.springframework.org/schema/c"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"
+ default-init-method="initialize"
+ default-destroy-method="destroy">
+
+ <import resource="sso-abstract-beans.xml" />
+
+ <bean id="InitializeProfileRequestContext"
+ class="net.shibboleth.idp.profile.impl.InitializeProfileRequestContext" scope="prototype"
+ p:profileId="#{T(net.shibboleth.idp.saml.saml2.profile.config.BrowserSSOProfileConfiguration).PROFILE_ID}"
+ p:loggingId="%{idp.service.logging.saml2sso:SSO}"
+ p:browserProfile="true" />
+
+ <bean id="DecodeMessage" class="org.opensaml.profile.action.impl.DecodeMessage" scope="prototype">
+ <constructor-arg>
+ <bean class="org.opensaml.saml.saml2.binding.decoding.impl.HTTPArtifactDecoder" scope="prototype"
+ p:parserPool-ref="shibboleth.ParserPool"
+ p:httpServletRequest-ref="shibboleth.HttpServletRequest"
+ p:bindingDescriptor-ref="shibboleth.Binding.SAML2Artifact"
+
+ p:peerEntityRole="#{T(org.opensaml.saml.saml2.metadata.SPSSODescriptor).DEFAULT_ELEMENT_NAME"
+ p:roleDescriptorResolver-ref="shibboleth.RoleDescriptorResolver"
+ p:identifierGenerationStrategy-ref="shibboleth.DefaultIdentifierGenerationStrategy"
+ p:selfEntityIDResolver-ref="TODO"
+ p:artifactEndpointResolver-ref="shibboleth.EndpointResolver"
+ p:SOAPClient-ref="TODO"
+ />
+ </constructor-arg>
+ </bean>
+
+ <alias name="shibboleth.OutgoingSAML2SSOBindings" alias="shibboleth.OutgoingBindings"/>
+
+</beans>
\ No newline at end of file
diff --git a/idp-conf/src/main/resources/system/flows/saml/saml2/sso-artifact-flow.xml b/idp-conf/src/main/resources/system/flows/saml/saml2/sso-artifact-flow.xml
new file mode 100644
index 0000000..a590acb
--- /dev/null
+++ b/idp-conf/src/main/resources/system/flows/saml/saml2/sso-artifact-flow.xml
@@ -0,0 +1,8 @@
+<flow xmlns="http://www.springframework.org/schema/webflow"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
+ parent="saml2.sso.abstract">
+
+ <bean-import resource="sso-artifact-beans.xml" />
+
+</flow>
diff --git a/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/SecurityConfiguration.java b/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/SecurityConfiguration.java
index 5329156..83fcf74 100644
--- a/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/SecurityConfiguration.java
+++ b/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/SecurityConfiguration.java
@@ -28,6 +28,7 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
import net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy;
import net.shibboleth.utilities.java.support.security.SecureRandomIdentifierGenerationStrategy;
+import org.opensaml.security.httpclient.HttpClientSecurityConfiguration;
import org.opensaml.security.x509.tls.ClientTLSValidationConfiguration;
import org.opensaml.xmlsec.DecryptionConfiguration;
import org.opensaml.xmlsec.EncryptionConfiguration;
@@ -58,6 +59,9 @@ public class SecurityConfiguration {
/** Configuration used when validating client TLS X509Credentials. */
@Nullable private ClientTLSValidationConfiguration clientTLSConfig;
+ /** Configuration used when executing HttpClient requests. */
+ @Nullable private HttpClientSecurityConfiguration httpClientConfig;
+
/**
* Constructor.
*
@@ -188,4 +192,22 @@ public class SecurityConfiguration {
public void setClientTLSValidationConfiguration(final ClientTLSValidationConfiguration config) {
clientTLSConfig = config;
}
+
+ /**
+ * Get the configuration used when executing HttpClient requests.
+ *
+ * @return configuration used when executing HttpClient requests, or null
+ */
+ public HttpClientSecurityConfiguration getHttpClientSecurityConfiguration() {
+ return httpClientConfig;
+ }
+
+ /**
+ * Set the configuration used when executing HttpClient requests.
+ *
+ * @param config configuration used when executing HttpClient requests, or null
+ */
+ public void setHttpClientSecurityConfiguration(final HttpClientSecurityConfiguration config) {
+ httpClientConfig = config;
+ }
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list