...
There are additional properties that can be used to change how other data is stored on a per-use case basis, but note that some components can't rely on client-side storage options, and more specific documentation should address that.
Reference
Localtabgroup | ||
---|---|---|
Localtab live | ||
active | true | |
Expand | ||
| ||
Property | Type | Default | Description |
---|---|---|---|
idp.storage.cleanupInterval | Duration | PT10M | Interval of background thread sweeping server-side storage for expired records |
idp.storage.htmlLocalStorage | Boolean | false | Whether to use HTML Local Storage (if available) instead of cookies |
idp.storage.clientSessionStorageName | String | shib_idp_session_ss | Name of cookie or HTML storage key used by the default per-session instance of the client storage service |
idp.storage.clientPersistentStorageName | String | shib_idp_persistent_ss | Name of cookie or HTML storage key used by the default persistent instance of the client storage service |
idp.session.StorageService | Bean ID of a StorageService | shibboleth.ClientSessionStorageService | Storage back-end to use for IdP sessions, authentication results, and optionally tracking of SP usage for logout |
idp.consent.StorageService | Bean ID of a StorageService | shibboleth.ClientPersistentStorageService | Storage back-end to use for consent and terms-of-use records |
idp.replayCache.StorageService | Bean ID of a StorageService | shibboleth.StorageService | Storage back-end to use for message replay checking (must be server-side) |
idp.replayCache.strict | Boolean | true | Whether storage errors during replay checks should be treated as a replay |
idp.artifact.StorageService | Bean ID of a StorageService | shibboleth.StorageService | Storage back-end to use for short-lived SAML Artifact mappings (must be server-side) |
idp.cas.StorageService | Bean ID of a StorageService | shibboleth.StorageService | Storage back-end to use for CAS ticket mappings (must be server-side) |
Expand | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
The following beans (most of which are internal to the system) can be used in various properties to control what storage instances are used for specific purposes. You can define your own beans also (e.g. in global.xml).
|
Storage Implementations
There are three functionally-complete implementations of the storage interface supplied with the software.
Localtabgroup | ||
---|---|---|
| ||
Localtab live | ||
active | true | |
Expand | ||
| ||
The ClientStorageService is an advanced, and highly recommended, option that includes support for HTML Local Storage along with cookies as a fallback or alternative. Local Storage support is enabled by default for new installations, but note that there are visual impacts from the use of the feature and it requires JavaScript be enabled, because reading and writing to the client requires an explicit page be rendered. Controlling this feature is handled by the idp.storage.htmlLocalStorage property. No configuration is required, but you may want to change the look and feel of the templates that are displayed to the client while data is being read or written. These pages don't require any user interaction as long as JavaScript is enabled, but they tend to be visible at least briefly, particularly the first time through. They're somewhat similar to the templates displayed when SAML messages are handed off to the browser. Much of that look is obviously controlled by style sheets and message properties, but the "visible" portions are in views/client-storage (to avoid losing your changes on upgrades). As to why you would use Local Storage, there are really two main reasons:
The main reason for this feature is to enable the IdP's session manager to track and index the sessions created with SPs, and that information does not fit reliably in a cookie. That makes the single-logout feature unusable with client-side sessions unless Local Storage is enabled, since the IdP doesn't know what SPs to communicate with. Enabling the Local Storage feature is necessary but not sufficient to allow at least some form of single logout to work without moving session storage to the server. You also will need to ensure a couple of additional session management properties (idp.session.trackSPSessions and idp.session.secondaryServiceIndex) are enabled, and they are also on by default in new installs. There are two properties because the latter is more a SAML-specific need that may not extend to other protocols in the future. The consent feature is very limited when cookies are used because the number of records it can store is extremely small. If Local Storage is available, that limit is essentially ignored. If you're comfortable with tracking consent per-device, this is a much more practical way to deploy it at most sites than with a database. Of course, many deployers are not comfortable with per-device consent, but those same deployers may become a lot more comfortable with it after enough database connection failures due to the nearly universally poor quality of JDBC networking code. localtab-live |
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
The JPA storage facility uses Hibernate ORM for searching and persistence using a relational database for storage. Example schemas are shown below.
MySQL
PostgreSQL or H2
Oracle
In order to configure this service you must provide Spring bean configuration for the JPAStorageService that includes the driver, URL, and credentials for your database. You are required to provide a jar containing the driver for your particular database. In addition, we recommend the use of a DataSource that provides connection pooling, which may require installing an additional library as well. The following libraries provide connection pooling functionality: In the DB-specific examples below use of HikariCP is demonstrated (
InstallationPlace the driver jar and connection pooling jar in edit-webapp/WEB-INF/lib then execute bin/build.sh or bin/build.bat as appropriate for your environment. The following configuration should be placed in conf/global.xml: DB-independent Configuration
Postgres Configuration
MySQL Configuration
Oracle Configuration
H2 Configuration
Further ConfigurationThe LocalContainerEntityManagerFactoryBean contains more configuration options and is designed to eliminate the need for a persistence.xml file. If you need to alter the database schema you can deploy a custom mapping file which overrides column names and types. ORM Mapping
Place your custom orm.xml file in edit-webapp/WEB-INF/classes/META-INF/orm.xml then rebuild your war. While you can configure a custom name and path for this file it must be located on your web application classpath. File system paths are not supported. Postgres LOB ConcernsSwitch identified an issue with the Postgres JDBC driver and the storage of LOBs related to the default mapping. Deployers can experience data loss when the Postgres vacuumlo command is run. It is recommend that a custom orm.xml file be used to override the value type: Postgres ORM
See the Switch Installation Docs for more details. localtab-live |
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Requirements: memcached v1.4.14 or later The memcached-based storage facility in IdPv3 is based on the spymemcached library, which has a number of compelling features for HA deployments:
The failover facility merits further discussion. Failover is enabled by specifying multiple memcached hosts and Bear in mind that different storage use cases have different failover properties. While the replay cache would be similarly unimpacted, the artifact map failing to retrieve a previously stored artifact mapping would result in a failed login to the service to which the artifact was sent. The following architecture is strongly recommended for HA deployments: Thus every IdP node runs a memcached service and the Java process running the IdP software connects to every memcached service. The following configuration example assumes the recommended architecture above and should be placed in conf/global.xml . MemcachedStorageService Configuration
Once a MemcachedStorageService bean has been defined as above, it can be used with subsystems that require a StorageService component. The following configuration snippet from conf/idp.properties indicates how to use memcached for session storage. Memcached for IdP Sessions
|