<xsd:extension base="SAML2ProfileHandler" />
</xsd:complexContent>
</xsd:complexType>
+
+ <xsd:complexType name="SAML2ArtifactResolution">
+ <xsd:annotation>
+ <xsd:documentation>Configuration type for SAML 2 artifact resolution profile handlers.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="SAML2ProfileHandler">
+ <xsd:attribute name="artifactMapRef" type="xsd:string" default="shibboleth.ArtifactMap">
+ <xsd:annotation>
+ <xsd:documentation>
+ Reference to SAMLArtifactMap used by handler to resolve artifact strings into artifact objects.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
<xsd:complexType name="SAML2ProfileHandler" abstract="true">
<xsd:annotation>
<xsd:extension base="SAML1ProfileHandler" />
</xsd:complexContent>
</xsd:complexType>
+
+ <xsd:complexType name="SAML1ArtifactResolution">
+ <xsd:annotation>
+ <xsd:documentation>Configuration type for SAML 1 artifact resolution profile handlers.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="SAML1ProfileHandler">
+ <xsd:attribute name="artifactMapRef" type="xsd:string" default="shibboleth.ArtifactMap">
+ <xsd:annotation>
+ <xsd:documentation>
+ Reference to SAMLArtifactMap used by handler to resolve artifact strings into artifact objects.
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
<xsd:complexType name="SAML1ProfileHandler" abstract="true">
<xsd:annotation>
<RequestPath>/saml1/SOAP/AttributeQuery</RequestPath>
</ProfileHandler>
+ <ProfileHandler xsi:type="SAML1ArtifactResolution"
+ inboundBinding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
+ outboundBindingEnumeration="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding">
+ <RequestPath>/saml1/SOAP/ArtifactResolution</RequestPath>
+ </ProfileHandler>
+
<ProfileHandler xsi:type="SAML2SSO"
inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
<RequestPath>/saml2/SOAP/AttributeQuery</RequestPath>
</ProfileHandler>
+ <ProfileHandler xsi:type="SAML2ArtifactResolution"
+ inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:SOAP">
+ <RequestPath>/saml2/SOAP/ArtifactResolution</RequestPath>
+ </ProfileHandler>
+
<LoginHandler xsi:type="RemoteUser">
<AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</AuthenticationMethod>
</LoginHandler>
*/
public class ProfileHandlerGroupBeanDefinitionParser extends AbstractBeanDefinitionParser {
- /** Class logger. */
- private static Logger log = Logger.getLogger(ProfileHandlerGroupBeanDefinitionParser.class);
-
/** Schema type name. */
public static final QName SCHEMA_TYPE = new QName(ProfileHandlerNamespaceHandler.NAMESPACE, "ProfileHandlerGroup");
+
+ /** Class logger. */
+ private static Logger log = Logger.getLogger(ProfileHandlerGroupBeanDefinitionParser.class);
/** {@inheritDoc} */
protected AbstractBeanDefinition parseInternal(Element config, ParserContext context) {
import edu.internet2.middleware.shibboleth.common.config.profile.VelocityErrorHandlerBeanDefinitionParser;
import edu.internet2.middleware.shibboleth.idp.config.profile.authn.RemoteUserLoginHandlerBeanDefinitionParser;
import edu.internet2.middleware.shibboleth.idp.config.profile.authn.UsernamePasswordLoginHandlerBeanDefinitionParser;
+import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1ArtifactResolutionProfileHanderBeanDefinitionParser;
import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.SAML1AttributeQueryProfileHandlerBeanDefinitionParser;
import edu.internet2.middleware.shibboleth.idp.config.profile.saml1.ShibbolethSSOProfileHandlerBeanDefinitionParser;
+import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser;
import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2AttributeQueryProfileHandlerBeanDefinitionParser;
import edu.internet2.middleware.shibboleth.idp.config.profile.saml2.SAML2SSOProfileHandlerBeanDefinitionParser;
registerBeanDefinitionParser(ProfileHandlerGroupBeanDefinitionParser.SCHEMA_TYPE,
new ProfileHandlerGroupBeanDefinitionParser());
+
+ registerBeanDefinitionParser(StatusHandlerBeanDefinitionParser.SCHEMA_TYPE,
+ new StatusHandlerBeanDefinitionParser());
registerBeanDefinitionParser(new QName(NAMESPACE, JSPErrorHandlerBeanDefinitionParser.ELEMENT_NAME),
new JSPErrorHandlerBeanDefinitionParser());
registerBeanDefinitionParser(SAML1AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
new SAML1AttributeQueryProfileHandlerBeanDefinitionParser());
-
- registerBeanDefinitionParser(StatusHandlerBeanDefinitionParser.SCHEMA_TYPE,
- new StatusHandlerBeanDefinitionParser());
-
- registerBeanDefinitionParser(SAML2AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
- new SAML2AttributeQueryProfileHandlerBeanDefinitionParser());
+
+ registerBeanDefinitionParser(SAML1ArtifactResolutionProfileHanderBeanDefinitionParser.SCHEMA_TYPE,
+ new SAML1ArtifactResolutionProfileHanderBeanDefinitionParser());
registerBeanDefinitionParser(SAML2SSOProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
new SAML2SSOProfileHandlerBeanDefinitionParser());
+
+ registerBeanDefinitionParser(SAML2AttributeQueryProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
+ new SAML2AttributeQueryProfileHandlerBeanDefinitionParser());
+
+ registerBeanDefinitionParser(SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser.SCHEMA_TYPE,
+ new SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser());
registerBeanDefinitionParser(RemoteUserLoginHandlerBeanDefinitionParser.SCHEMA_TYPE,
new RemoteUserLoginHandlerBeanDefinitionParser());
--- /dev/null
+/*
+ * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package edu.internet2.middleware.shibboleth.idp.config.profile.saml1;
+
+import javax.xml.namespace.QName;
+
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.w3c.dom.Element;
+
+import edu.internet2.middleware.shibboleth.idp.config.profile.ProfileHandlerNamespaceHandler;
+import edu.internet2.middleware.shibboleth.idp.profile.saml1.ArtifactResolution;
+
+/**
+ * Spring bean definition parser for {@link ArtifactResolution}.
+ */
+public class SAML1ArtifactResolutionProfileHanderBeanDefinitionParser extends
+ AbstractSAML1ProfileHandlerBeanDefinitionParser {
+
+ /** Schema type. */
+ public static final QName SCHEMA_TYPE = new QName(ProfileHandlerNamespaceHandler.NAMESPACE,
+ "SAML1ArtifactResolution");
+
+ /** {@inheritDoc} */
+ protected Class getBeanClass(Element element) {
+ return ArtifactResolution.class;
+ }
+
+ /** {@inheritDoc} */
+ protected void doParse(Element config, BeanDefinitionBuilder builder) {
+ super.doParse(config, builder);
+
+ builder.addConstructorArgReference(config.getAttributeNS(null, "artifactMapRef"));
+ }
+}
import javax.xml.namespace.QName;
-import org.opensaml.xml.util.DatatypeHelper;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.w3c.dom.Element;
--- /dev/null
+/*
+ * Copyright [2007] [University Corporation for Advanced Internet Development, Inc.]
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package edu.internet2.middleware.shibboleth.idp.config.profile.saml2;
+
+import javax.xml.namespace.QName;
+
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.w3c.dom.Element;
+
+import edu.internet2.middleware.shibboleth.idp.config.profile.ProfileHandlerNamespaceHandler;
+import edu.internet2.middleware.shibboleth.idp.profile.saml2.ArtifactResolution;
+
+/**
+ * Spring bean definition parser for {@link ArtifactResolution}.
+ */
+public class SAML2ArtifactResolutionProfileHandlerBeanDefinitionParser extends
+ AbstractSAML2ProfileHandlerBeanDefinitionParser {
+
+ /** Schema type. */
+ public static final QName SCHEMA_TYPE = new QName(ProfileHandlerNamespaceHandler.NAMESPACE,
+ "SAML2ArtifactResolution");
+
+ /** {@inheritDoc} */
+ protected Class getBeanClass(Element element) {
+ return ArtifactResolution.class;
+ }
+
+ /** {@inheritDoc} */
+ protected void doParse(Element config, BeanDefinitionBuilder builder) {
+ super.doParse(config, builder);
+
+ builder.addConstructorArgReference(config.getAttributeNS(null, "artifactMapRef"));
+ }
+}
import edu.internet2.middleware.shibboleth.common.relyingparty.provider.saml1.ArtifactResolutionConfiguration;
/**
- * SAML 2.0 Artifact resolution profile handler.
+ * SAML 1 Artifact resolution profile handler.
*/
public class ArtifactResolution extends AbstractSAML1ProfileHandler {
/** Map artifacts to SAML messages. */
private SAMLArtifactMap artifactMap;
- /** Constructor. */
- public ArtifactResolution() {
+ /**
+ * Constructor.
+ *
+ * @param map ArtifactMap used to lookup artifacts to be resolved.
+ */
+ public ArtifactResolution(SAMLArtifactMap map) {
super();
+
+ artifactMap = map;
+
responseBuilder = (SAMLObjectBuilder<Response>) getBuilderFactory().getBuilder(Response.DEFAULT_ELEMENT_NAME);
}
ArtifactResolutionRequestContext requestContext = new ArtifactResolutionRequestContext();
requestContext.setMetadataProvider(metadataProvider);
-
+
requestContext.setInboundMessageTransport(inTransport);
requestContext.setInboundSAMLProtocol(SAMLConstants.SAML11P_NS);
requestContext.setPeerEntityRole(SPSSODescriptor.DEFAULT_ELEMENT_NAME);
-
+
requestContext.setOutboundMessageTransport(outTransport);
requestContext.setOutboundSAMLProtocol(SAMLConstants.SAML11P_NS);
// Set as much information as can be retrieved from the decoded message
try {
String relyingPartyId = requestContext.getInboundMessageIssuer();
-
+
RelyingPartyConfiguration rpConfig = getRelyingPartyConfiguration(relyingPartyId);
requestContext.setRelyingPartyConfiguration(rpConfig);
/** Artifact response object builder. */
private SAMLObjectBuilder<ArtifactResponse> responseBuilder;
- /** Constructor. */
- public ArtifactResolution() {
+ /**
+ * Constructor.
+ *
+ * @param map ArtifactMap used to lookup artifacts to be resolved.
+ */
+ public ArtifactResolution(SAMLArtifactMap map) {
super();
+
+ artifactMap = map;
+
responseBuilder = (SAMLObjectBuilder<ArtifactResponse>) getBuilderFactory().getBuilder(
ArtifactResponse.DEFAULT_ELEMENT_NAME);
}
/**
* Sets the artifact to be resolved.
*
- * @param artifact artifact to be resolved
+ * @param saml2Artifact artifact to be resolved
*/
- public void setArtifact(AbstractSAML2Artifact artifact) {
- this.artifact = artifact;
+ public void setArtifact(AbstractSAML2Artifact saml2Artifact) {
+ this.artifact = saml2Artifact;
}
/**
<RequestPath>/saml1/SOAP/AttributeQuery</RequestPath>
</ProfileHandler>
+ <ProfileHandler xsi:type="SAML1ArtifactResolution"
+ inboundBinding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
+ outboundBindingEnumeration="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding">
+ <RequestPath>/saml1/SOAP/ArtifactResolution</RequestPath>
+ </ProfileHandler>
+
<ProfileHandler xsi:type="SAML2SSO"
inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
<RequestPath>/saml2/SOAP/AttributeQuery</RequestPath>
</ProfileHandler>
+ <ProfileHandler xsi:type="SAML2ArtifactResolution"
+ inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
+ outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:SOAP">
+ <RequestPath>/saml2/SOAP/ArtifactResolution</RequestPath>
+ </ProfileHandler>
+
<LoginHandler xsi:type="RemoteUser">
<AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified</AuthenticationMethod>
</LoginHandler>