This software is not yet released and this is preliminary documentaton subject to significant change. It should not be used in production or to protect important resources at this stage.
DefiningProfileConfigurations
Quick Summary
Plugins for SAML, OpenID, etc. will automatically register and enable profile configurations with default settings, and supply a property file to globally alter some settings.
Overriding default profile configurations is done by uncommenting and adding beans to shibboleth.sp.DefaultProfileConfigurations and/or shibboleth.sp.UnverifiedProfileConfigurations in agents.xml.
Fine-grained control is possible by installing profile configurations via the
profileConfigurationsbean property in any Agent/Application/RelyingPartyConfiguration.
Available Profile Configurations and Settings
The actual list of available profile configuration beans is dependent on the protocol plugin in question:
OpenID Connect (TBD)
Background
“Profiles” are a term for the interoperable features of the software that other systems interact with. The things that SAML IdPs and SPs do from an external perspective are profiles (principally SSO and Logout, less commonly other features such as Attribute Queries and Artifact Resolution). OpenID is similar, though the specific profiles are different. Any future supported protocols will include their own set of profiles.
The bulk of the settings supported by the Hub are found on a number of specific sub-interfaces of the “root” ProfileConfiguration interface. This is a common API root across both the IdP and the Hub, with more specialized sub-interfaces diverging to reflect the different use cases. Each supported profile is represented by a concrete class that supports some set of ProfileConfiguration interfaces that collectively contain all the settings specific to each profile.
The Hub does not directly support any profiles out of the box. Adding specific protocol plugins adds them to the system and by default will automatically register and enable some of them with default settings that usually can be controlled via property files.
Profiles can be executed in both “verified” and “unverified” situations. Verification refers to the concept of there being registration metadata (in some form) that defines the peer system to the Hub so that it can be securely interacted with. SAML Metadata and OIDC ClientInformation are the two most common sources of such metadata today. Most of the profiles people care about tend to expect to operate in a “verified” state. OpenID (and OAuth) include a few special profiles that are designed to operate in an unverified way because they supply public information to other systems.
Profile Registration
For a profile to be functional it must be registered for use in a particular case based on the information in the request to the Hub regarding the Agent, Application, and in most cases, the applicable RelyingPartyConfiguration in use. There are a few different ways this happens, presented from simplest to most complex.
To illustrate each case, the same example is used below to show it would be handled in that particular case. The example is artificial like most examples, but the same approach could apply to a number of different settings. For illustration’s sake, consider the case of turning off the IP address cross-check between the client’s request to the Agent and the value in a SAML Assertion’s
Addressattribute. This check is on by default. The examples below illustrate how it might be disabled in each case.
Automatic Registration
When a plugin such as the SAML and OpenID shibd plugins are installed, they include information that is detected at runtime to register and enable a default set of profiles within the Hub. The specific settings used are either defaulted inside the code or in a few cases can be overridden globally by properties. This is almost always sufficient when a Hub is used with a single Agent. It may not be sufficient when supporting multiple Agents if they need to support different profiles or use different settings, or it may not be enough to address cases where a specific authenticating authority requires a workaround or non-default option.
For the example discussed earlier, you would turn off the address checking feature by setting the property sp.saml.checkAddress in conf/sp/saml.properties:
sp.saml.checkAddress = false
Default Registration
As described in the AgentResolverBasicstopic, the commented beans shibboleth.sp.DefaultProfileConfigurations and shibboleth.sp.UnverifiedProfileConfigurations provide a mechanism to override the set of profiles and settings to use across the system by default, essentially replacing the automatically registered objects with a different set. This would usually be done to disable particular profiles that might otherwise be active, or to control a setting that can’t be configured without XML.
There are two syntaxes commonly used to explicitly define an active profile (using SAML’s most common profile as an example, but it’s the same with any profile):
<ref bean=”SAML2.SSO” />This syntax is a Spring bean reference and means “use the bean as is with no changes”. In this case, it means inheriting default settings (which may be influenced by global Java properties in some cases, generally in plugin-specific property files, e.g. conf/sp/saml.properties).
You cannot override any bean properties with this syntax, so it is only relevant if not doing so, typically because you are doing so for a different profile.
<bean parent=”SAML2.SSO” />This syntax is for a child bean and means “create a bean that is a copy of the parent”. In this case, it will inherit default settings as in the previous case but you can also add bean properties to override defaults using any supported Spring syntax.
For the example discussed above, you could turn off the address checking feature by using the shibboleth.sp.DefaultProfileConfigurations bean to replace the automatic registration of profiles with your own, and override the specific profile configuration and setting as follows:
<util:list id="shibboleth.sp.DefaultProfileConfigurations"> <!-- This inherits from the system copy and overrides a single setting. --> <bean parent="SAML2.SSO" p:checkAddress="false" /> <!-- Using ref is an alternative syntax for reusing a bean entirely without creating a new one. --> <ref bean="SAML2.Logout" /> </util:list>
Metadata Driven Configuration
In the event that a setting is needed only when interacting with a particular authority, the preferred way to control that is with “tags” in SAML Metadata that can override settings for just that one system. (The IdP documentation on this feature, which works the same way in the Hub, is in MetadataDrivenConfiguration.) Currently this only supports SAML Metadata, but it is hoped that a similar mechanism will eventually be defined for this when using OpenID’s JSON equivalent.
One of the many advantages of this approach is that it allows the use of automatic or default profile configuration registration while still tailoring behavior.
There are two common ways to enable this feature:
TBD (this is not yet enabled in the alpha release)
Explicit Registration
In the most general case, each Agent/Application/RelyingPartyConfiguration across the configuration has a profileConfigurations property that takes a collection of beans corresponding to the profile configurations to use for that particular case. This can in principle support fine-grained control over their use with specific Agents, Applications, or RelyingParty overrides and allows any setting to be controlled in a variety of unusual cases. This is best avoided as it is by far the most complex approach, but it’s there when necessary.
For the example discussed above, you could turn off the address checking feature for only a specific IdP by defining a RelyingParty override for that IdP. When done correctly, the override would apply to all Agents/Applications so you would only need to do this once.
<util:list id="shibboleth.sp.RelyingPartyOverrides"> <bean parent="RelyingPartyByName" c:_0="https://idp.example.org"> <property name="profileConfigurations"> <!-- This inherits from the system copy and overrides a single setting. --> <bean parent="SAML2.SSO" p:checkAddress="false" /> <!-- Using ref is an alternative syntax for reusing a bean entirely without creating a new one. --> <ref bean="SAML2.Logout" /> </property> </bean> </util:list>
Relationship with IdP Profile Beans
Many of the supported profile beans share a name/ID with those supported by the IdP software. They are not the same physical beans and are in fact usually not even the same underlying Java class, though they may share some common interfaces. Many of the supported bean properties and features are similar (or identical), particularly when referring to their use with SAML or OpenID proxy authentication, but they should be viewed as distinct and may diverge to greater or lesser degrees over time.
Nevertheless, IdP familiarity will generally be helpful in understanding many of the options, provided the mental adjustment is made that this is about SP behavior and not IdP behavior.