Acceptable Usage Policy

Also known as Terms of Use or EULA, CAS presents the ability to allow the user to accept the usage policy before moving on to the application. Production-level deployments of this feature would require modifications to the flow such that the retrieval and/or acceptance of the policy would be handled via an external storage mechanism such as LDAP or JDBC.

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-aup-webflow</artifactId>
    <version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-aup-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-aup-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-aup-webflow"
}

Customize the policy by modifying the casAcceptableUsagePolicyView.html. See this guide to learn more about user interface customizations. Note that the view here should have full access to the resolved principal and attributes, if you wish to dynamically alter the page to present different text, etc.

Webflow Sequence

Remember that acceptable usage policy executes after a successful authentication event where CAS has already established the authentication principal, since the policy record is strongly tied to the identified user record. Implementing this feature before the authentication event would require rather heavy modifications to the CAS webflow as well as alternative means of storing and remembering decisions such as cookies or browser storage, etc.

The following settings and properties are available from the CAS configuration catalog:

The configuration settings listed below are tagged as Required in the CAS configuration metadata. This flag indicates that the presence of the setting may be needed to activate or affect the behavior of the CAS feature and generally should be reviewed, possibly owned and adjusted. If the setting is assigned a default value, you do not need to strictly put the setting in your copy of the configuration, but should review it nonetheless to make sure it matches your deployment expectations.

  • cas.acceptable-usage-policy.core.aup-attribute-name=aupAccepted
  • AUP attribute to choose in order to determine whether policy has been accepted or not. The attribute is expected to contain a boolean value where true indicates policy has been accepted and false indicates otherwise. The attribute is fetched for the principal from configured sources and compared for the right match to determine policy status. If the attribute is not found, the policy status is considered as denied.

    org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyCoreProperties.

    How can I configure this property?

  • cas.acceptable-usage-policy.core.enabled=true
  • Allows AUP to be turned off on startup.

    org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyCoreProperties.

    How can I configure this property?

    The configuration settings listed below are tagged as Optional in the CAS configuration metadata. This flag indicates that the presence of the setting is not immediately necessary in the end-user CAS configuration, because a default value is assigned or the activation of the feature is not conditionally controlled by the setting value. You should only include this field in your configuration if you need to modify the default value.

  • cas.acceptable-usage-policy.core.aup-omit-if-attribute-missing=false
  • By default, the policy status is considered as denied when the attribute #aupAttributeName is not found. If set to true, the policy status in those cases is considered as accepted.

    org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyCoreProperties.

    How can I configure this property?

  • cas.acceptable-usage-policy.core.aup-policy-terms-attribute-name=
  • AUP attribute to choose whose single value dictates how CAS should fetch the policy terms from the relevant message bundles.

    org.apereo.cas.configuration.model.support.aup.AcceptableUsagePolicyCoreProperties.

    How can I configure this property?