Authentication Interrupt
CAS has the ability to pause and interrupt the authentication flow to reach out to external services and resources, querying for status and settings that would then dictate how CAS should manage and control the SSO session. Interrupt services are able to present notification messages to the user, provide options for redirects to external services, etc. A common use case deals with presenting a bulletin board during the authentication flow to present messages and announcements to select users and then optionally require the audience to complete a certain task before CAS is able to honor the authentication request and establish a session.
In the interrupt flow, CAS is not at the moment reaching back to an external
resource acting as an interrupt service to store, track or remember a user’s
decision. In other words, we are only dealing with the R
(ie. Read) in CRUD
.
Today’s functionality only deals with inquiring status and reading results
solely in read-only mode. Interrupt services are themselves required and
encouraged to redirect the audience to external resources where execution
of an action resets the interrupt status thereby freeing CAS to proceed
forward later on without having to interrupt the authentication flow again.
Configuration
Support is enabled by including the following dependency in the WAR overlay:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-interrupt-webflow</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-interrupt-webflow:${project.'cas.version'}"
1
2
3
4
5
6
7
8
9
dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-support-interrupt-webflow"
}
1
2
3
4
5
6
7
8
9
10
dependencies {
/*
The following platform references should be included automatically and are listed here for reference only.
implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
*/
implementation "org.apereo.cas:cas-server-support-interrupt-webflow"
}
The following settings and properties are available from the CAS configuration catalog:
cas.interrupt.core.force-execution=false
Whether execution of the interrupt inquiry query should be always forced, and the status of interrupt check should be ignored. This is a global setting that can optionally be overruled for each application policy.
|
cas.interrupt.core.trigger-mode=AFTER_AUTHENTICATION
Define how interrupt notifications should be triggered in the authentication flow. Available values are as follows:
|