Skip to content

Instantly share code, notes, and snippets.

@AshMartian
Created May 5, 2017 15:19
Show Gist options
  • Save AshMartian/8177da3aec8f5a84cfbefe84f77354a0 to your computer and use it in GitHub Desktop.
Save AshMartian/8177da3aec8f5a84cfbefe84f77354a0 to your computer and use it in GitHub Desktop.
Shibboleth Relying Party configuration
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:c="http://www.springframework.org/schema/c"
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">
<!--
Unverified RP configuration, defaults to no support for any profiles. Add <ref> elements to the list
to enable specific default profile settings (as below), or create new beans inline to override defaults.
"Unverified" typically means the IdP has no metadata, or equivalent way of assuring the identity and
legitimacy of a requesting system. To run an "open" IdP, you can enable profiles here.
-->
<bean id="shibboleth.UnverifiedRelyingParty" parent="RelyingParty">
<property name="profileConfigurations">
<list>
<!-- <bean parent="SAML2.SSO" p:encryptAssertions="false" /> -->
</list>
</property>
</bean>
<!--
Default configuration, with default settings applied for all profiles, and enables
the attribute-release consent flow.
-->
<bean id="shibboleth.DefaultRelyingParty" parent="RelyingParty">
<property name="profileConfigurations">
<list>
<bean parent="Shibboleth.SSO" p:postAuthenticationFlows="attribute-release" />
<ref bean="SAML1.AttributeQuery" />
<ref bean="SAML1.ArtifactResolution" />
<bean parent="SAML2.SSO" p:postAuthenticationFlows="attribute-release" />
<ref bean="SAML2.ECP" />
<ref bean="SAML2.Logout" />
<ref bean="SAML2.AttributeQuery" />
<ref bean="SAML2.ArtifactResolution" />
</list>
</property>
</bean>
<!-- Container for any overrides you want to add. -->
<util:list id="shibboleth.RelyingPartyOverrides">
<!--
Override example that identifies a single RP by name and configures it
for SAML 2 SSO without encryption. This is a common "vendor" scenario.
-->
<!--
<bean parent="RelyingPartyByName" c:relyingPartyIds="https://sp.example.org">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="false" />
</list>
</property>
</bean>
-->
<bean parent="RelyingPartyByName" c:relyingPartyIds="https://url-from-service-provider">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:signResponses="never" p:signAssertions="always" p:encryptNameIDs="never" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="schoology-peninsulasso">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="https://psdts.freshdesk.com/login/saml">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="schooldata.net">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:signAssertions="true" p:signResponses="true" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="https://simplesaml.psd401.net/simplesaml/module.php/saml/sp/metadata.php/default-sp">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:transient" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="urn:peninsula.security.follettsoftware.com">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="true" p:signAssertions="true" p:signResponses="true" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:transient" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="urn:federation:MicrosoftOnline">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:persistent" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="https://martinb.jamfcloud.com/saml/metadata">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:signAssertions="true" p:signResponses="true" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" p:encryptNameIDs="never" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="urn:schooldata.net">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="never" p:signAssertions="true" p:signResponses="true" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:transient" />
</list>
</property>
</bean>
<bean parent="RelyingPartyByName" c:relyingPartyIds="https://url-from-service-provider">
<property name="profileConfigurations">
<list>
<bean parent="SAML2.SSO" p:encryptAssertions="true" p:signAssertions="true" p:signResponses="true" p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:persistent" />
</list>
</property>
</bean>
</util:list>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment