New Configuration Summary
This is a draft/parking lot for tracking the new SP configuration as it is being designed and implemented. All settings are subject to change. Most boolean settings can be set using XML syntax (as true, false, 1, or 0).
Most of the configuration is no longer reloadable in the style of older versions, with the exception of the two XML-based configurations.
- 1 Existing/Compatible
- 2 Master Configuraton
- 2.1 [global]
- 2.2 [extensions]
- 2.3 [logging]
- 2.4 [logging-categories]
- 2.5 [remoting]
- 2.6 [session-cache]
- 2.7 [request-mapper]
- 2.8 [handlers]
- 3 IIS
- 3.1 [global]
- 3.2 [<site-id>]
- 4 Handlers
- 4.1 Status Handler
- 4.2 Session Handler
- 4.3 Session Initiator
- 5 Examples
Existing/Compatible
The XML AccessControl and RequestMapper syntaxes are structurally expected to remain mostly compatible/similar to V3, with the exception that the RequestMapper would be in a separate file (due to the surrounding configuration being non-XML-based, so embedding it no longer “fits”). The separate file is assumed to be rooted in a <RequestMap>
element. AccessControl can be embedded in it as before, or placed in external files (more typically via the Apache module’s support for this).
The actual content settings in the RequestMap are likely to be altered, but it’s likely more will be aded than removed, as most of the settings that used to exist in other places will be migrated into the RequestMap (if they continue to exist).
Many settings below are defaulted and likely would never be used or seen, but are there for compatibility or to allow unusual tuning of behavior. Generally if a setting doesn’t look familiar, it’s either new or it was there all along and just isn’t needed much.
Master Configuraton
The top-level “master” file will be an INI file (conventionally in shibboleth.ini). So far the following sections have been sketched out or implemented:
[global]
regexMatching = full | partial
Toggles between backward-compatible regex matching against the entire candidate string, and the more typical, Apache-style partial regex matching such that only a portion of the candidate has to match. Full matching is auto-anchored, and tends to require a lot of extra .*
expressions to “eat” additional content.
agentType = Default
No other values currently defined, extension point allowing for alternative implementations of the bulk of the agent library’s configuration and handling of various components. The old SP has a similar extension point but it’s never been used and the setting won’t normally appear.
allowedSchemes = https http
Space-delimited list of URL schemes permitted to appear in URLs when redirects are issued.
extraAuthTypes = custom1 custom2
Space-delimited list of Apache AuthTypes (unused otherwise) to process as though they were “shibboleth”, which is always included and is the default AuthType the module processes.
unsetHeaderValue = foo
Causes “unset” variables to carry a designated value instead of being “cleared/unset”.
checkSpoofing = true | false
Usually enabled if headers are used, enables logic that tries to detect header spoofing/smuggling by detecting a pre-existing header matching a header name controlled by the agent.
spoofKey = <random value>
On some platfiorms like Apache, this can be set to a random value that reduces the chance of false positives from the spoof checking logic on internal sub-requests, but generally this should be left unset unless experiencing issues.
catchAll = true | false
Whether to try and catch all C++ runtime exceptions or only “known” exceptions. Failure to catch an exception terminates a process with prejudice.
IISConfigPath = iis-config.ini
Pointer to IIS-specific agent settings (this is a separate file because of how the Site mappings are defined). The file extension may be “ini” or “xml”, and the latter implies the format used by the older SP software’s <ISAPI> element.
[extensions]
<pathname> = true | false
Instructs the agent to load an extension DLL/shared library from a file path (the property key). The boolean value is an indicator about whether failure to load the extension should be fatal to startup.
[logging]
type = console | syslog | windows
Controls the logging implementation to use. The three expected types (pending others) are as shown, with the obvious defaults based on platform. In more advanced systems, this would be the “Appender” to use. Notably, much of the critical logging is in the hub, not the agents, as it was before with shibd.
defaultLevel = DEBUG | INFO | WARN | ERROR | CRIT
Sets the default logging level if not overridden for a category.
openSyslog = true | false
Controls whether syslog is opened at agent startup (false is used if the web server relies on syslog as well). Ignored by other logging types.
facility = <int>
Sets the syslog facility as an integer. The default is the LOG_USER bitmask value. Ignored by other logging types.
[logging-categories]
<category> = DEBUG | INFO | WARN | ERROR | CRIT
Basic means of overriding logging level for specific categories, but notably this isn’t hierarchical as with more full-featured logging libraries. We expect to flatten out some of the nesting of categories to reduce the impact of that.
[remoting]
type = CurlHTTP | WinHTTP
Controls the agent/hub remoting service to use. Generally defaulted as appropriate for the platform.
baseURL = http://localhost/idp/profile/
Used to connect to operations implemented by the agent’s hub.
agentID = <string>
Identifies agent to hub for configuraton/authentication purposes.
userAgent = <string>
If set, overrides default User-Agent header sent with requests to hub.
authMethod = basic
Type of authentication used by agent when connecting to hub, will be extended with additional options as supported/warranted.
authCachingCookie = <string>
Enables capture of a named cookie to support caching of authentication with the hub.
tlsCipherList = <platform-specofoc cipher string>
Sets a non-defaulted cipher string to inject into a TLS implementation to limit ciphers or protocols used. The format will depend on the type of remoting service and the TLS library in use (most commonly OpenSSL’s format when not using Windows).
tlsCAFile = trustlist.pem
Specifies file to use as a CA list when connecting over TLS to hub. For the CurlHTTP type, this must be a file with PEM-encoded CA certificates.
chunkedEncoding = true | false
Flag controlling use of chunked content encoding. When false, the request is buffered to determine a content length to supply instead of using a read callback to pull data to send.
connectTimeout = 3
Connection timeout in seconds.
timeout = 10
Overall timeout in seconds.
secretSourceType = File | Env
Source of agent secret for shared secret authentication to hub.
secretFile = <path>
Used with secretSourceType=File, path to file containing secret. Trailing linefeeds/etc. are omitted.
secretEnv = <envname>
Used with secretSourceType=Env, name of environment variable to extract secret from.
[session-cache]
type = filesystem | storage | cookie
Controls the session cache implementation to use. These are “expected” types, but the only certainties are the first type, using the file system or calling on the hub to access a Java-based StorageService implementation such as a database.
[request-mapper]
type = XML | Native
Controls the RequestMapper implementation to use. The XML type essentially points to a reloadable external XML file to hold the configuration, while the Native type is for Apache to turn off the extra mapping layer (same as in V3).
path = <pathname>
For the XML type, specifies the local file containing the XML.
reloadChanges = true | false
Whether to monitor the file for reloads, which occur in the foreground after taking a read lock, based on file modification time. C++-14 support is required for this code to be active and doing so introduces shared locking to the use of the component.
[handlers]
This section contains one or more key/value pairs mapping a “handler configuration ID” to a file defining the handlers that are active for a request that maps to that ID. This section can be omitted in most cases, in which case the default handler configuration will be found in handlers.ini. If this section is defined, then no default mappings are created or assumed.
IIS
The old <ISAPI> material from the configuration will be replaced by an INI file, but the exact name can be controlled from the setting pointing to it in the master file. Optionally the older XML syntax can also be reused.
[global]
authenticatedRole = ShibbolethAuthnN
IIS Role assigned to any authenticated user.
roleAttributes = attribute1 attribute2 attribute3
Space-delimited list of attribute IDs use values will be assigned as additional IIS roles.
normalizeRequest = true | false
Bypasses Site-based mappings (see below) to determine canonical request scheme, host, and port. Unsafe to disable unless not using the RequestMap. Equivalent to Apache’s UseCanonicalName command.
useVariables = true | false
Controls whether attributes are passed to an application as Server Variables.
useHeaders = true | false
Controls whether attributes are passed as HTTP Headers, should never be enabled and if done for compatibility, applications should be remediated to avoid the need.
safeHeaderNames = true | false
Default matches the status of the useHeaders flag. Causes all non-alphanumeric characters to be removed from the names of all SP-controlled headers, as their presence makes header smuggling much harder to guard against due to IIS implementation choices (bad ones, that is).
handlerPrefix = /Shibboleth.sso
Optimizes ignoring non-handler requests when a default or static handlerURL is used, as is generally the case.
[<site-id>]
Every other section in the file represents a Site in IIS, with the Site ID used as the section key. The equivalent of Apache’s ServerName command to virtualize the settings for a site, but with each component separated into a discrete property to avoid the need to parse a URL.
In addition, the global commands are all supported to override their default values.
name = <canonical hostname for site>
The canonical name reported to the SP for any requests to this site. Needed because SERVER_NAME in IIS is untrusted information controlled by the client.
scheme = http | https
Overrides the scheme reported to the SP for any requests to this site. Needed only when the physical scheme differs from the client-observed logical scheme, i.e. when virtualizing a site.
port = <integer>
Overrides the port reported to the SP for any physical HTTP requests to the site. Needed only when the physical port differs from the client-observed logical port, i.e. when virtualizing a site.
sslport = <integer>
Same as port, but is applied for any physical HTTPS requests to the site.
aliases = hostname1 hostname2
Whitespace-delimited list of alternative hostnames that should be accepted as valid if requested by a client.
Handlers
Each handler configuration file contains 1 or more sections. The section names are the relative paths to the handlers they define/mount into the agent. The paths are relative to whatever the handlerURL setting in the Request Mapper is for a given request (defaulting to “/Shibboleth.sso” for now for compatibility, TBD).
Each section must contain a type property indicating what type of handler is being defined, and the rest of the properties will depend on the handler itself.
Status Handler
type = Status
acl = 127.0.0.1 ::1
Space-delimited list of CIDR expressions to match against the client address to authorize access to the handler.
Session Handler
type = Session
acl = 127.0.0.1 ::1
Space-delimited list of CIDR expressions to match against the client address to authorize access to the handler.
Session Initiator
type = SessionInitiator
requestMapperSettings = <setting1> <setting2> <setting3>
Space-delimited list of settings to pull from the RequestMapper based on the request that should be passed to the hub for processing the session request. This allows an arbitrarily extensible set of protocol options to be signalled without awareness by the agent code. The default will be determined closer to completion of SAML and OIDC support but will include the legacy SAML options (e.g., ForceAuthn).
querySettings = <setting1> <setting2> <setting3>
Same as above but for query string parameters to the handler directly. These can be independently controlled for security purposes to limit what can be passed from the client to the handler (and thus be under insecure control).
Examples
; shibboleth.ini
[global]
regexMatching = partial
[logging]
type = syslog
openSyslog = false
defaultLevel = INFO
[logging-categories]
Shibboleth.AgentConfig = DEBUG
Shibboleth.Agent = DEBUG
[remoting]
baseURL = https://localhost/idp/profile/sp
agentID = sp.example.org
authMethod = basic
authCachingCookie = __Host-JSESSIONID
; tlsCAFile = trustfile.pem
secretSourceType = Env
secretEnv = SHIBSP_AGENT_SECRET
[session-cache]
...
[request-mapper]
type = XML
path = request-map.xml
reloadChanges = true
; handlers.ini
[/Status]
type = Status
acl = 127.0.0.1 ::1