Embedded Servlet Container

Note that CAS itself ships with a number of embedded containers that allow the platform to be self-contained as much as possible. These embedded containers are an integral part of the CAS software, are maintained and updated usually for every release and surely are meant to and can be used in production deployments. You DO NOT need to, but can if you want to, configure and deploy to an externally configured container.

Configuration

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.

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. In other words, you should only include this field in your configuration if you need to modify the default value or if you need to turn on the feature controlled by the setting.

The configuration settings listed below are tagged as Third Party in the CAS configuration metadata. This flag indicates that the configuration setting is not controlled, owned or managed by the CAS ecosystem, and affects functionality that is offered by a third-party library, such as Spring Boot or Spring Cloud to CAS. For additional info, you might have to visit the third-party source to find more details.

  • server.servlet.application-display-name=application
  • Display name of the application.

    org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.

    How can I configure this property?

  • server.servlet.context-parameters=
  • Servlet context init parameters.

    org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.

    How can I configure this property?

  • server.servlet.context-path=
  • Context path of the application.

    org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.

    How can I configure this property?

  • server.servlet.encoding.charset=UTF-8
  • Charset of HTTP requests and responses. Added to the "Content-Type" header if not set explicitly.

    org.springframework.boot.web.servlet.server.Encoding.

    How can I configure this property?

  • server.servlet.encoding.enabled=true
  • Whether to enable http encoding support.

    How can I configure this property?

  • server.servlet.encoding.force=
  • Whether to force the encoding to the configured charset on HTTP requests and responses.

    org.springframework.boot.web.servlet.server.Encoding.

    How can I configure this property?

  • server.servlet.encoding.force-request=
  • Whether to force the encoding to the configured charset on HTTP requests. Defaults to true when "force" has not been specified.

    org.springframework.boot.web.servlet.server.Encoding.

    How can I configure this property?

  • server.servlet.encoding.force-response=
  • Whether to force the encoding to the configured charset on HTTP responses.

    org.springframework.boot.web.servlet.server.Encoding.

    How can I configure this property?

  • server.servlet.encoding.mapping=
  • Mapping of locale to charset for response encoding.

    org.springframework.boot.web.servlet.server.Encoding.

    How can I configure this property?

  • server.servlet.jsp.class-name=org.apache.jasper.servlet.JspServlet
  • Class name of the servlet to use for JSPs. If registered is true and this class * is on the classpath then it will be registered.

    org.springframework.boot.web.servlet.server.Jsp.

    How can I configure this property?

  • server.servlet.jsp.init-parameters=
  • Init parameters used to configure the JSP servlet.

    org.springframework.boot.web.servlet.server.Jsp.

    How can I configure this property?

  • server.servlet.jsp.registered=true
  • Whether the JSP servlet is registered.

    org.springframework.boot.web.servlet.server.Jsp.

    How can I configure this property?

  • server.servlet.path=/
  • Path of the main dispatcher servlet.

    How can I configure this property?

    Deprecation status is ERRORwith a replacement setting: spring.mvc.servlet.path.

  • server.servlet.register-default-servlet=false
  • Whether to register the default Servlet with the container.

    org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.

    How can I configure this property?

  • server.servlet.session.cookie.comment=
  • Comment for the cookie.

    How can I configure this property?

    Deprecation status is ERRORwithout a replacement setting.

  • server.servlet.session.cookie.domain=
  • Domain for the cookie.

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.cookie.http-only=
  • Whether to use "HttpOnly" cookies for the cookie.

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.cookie.max-age=
  • Maximum age of the cookie. If a duration suffix is not specified, seconds will be used. A positive value indicates when the cookie expires relative to the current time. A value of 0 means the cookie should expire immediately. A negative value means no "Max-Age".

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.cookie.name=
  • Name of the cookie.

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.cookie.path=
  • Path of the cookie.

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.cookie.same-site=
  • SameSite setting for the cookie.

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.cookie.secure=
  • Whether to always mark the cookie as secure.

    org.springframework.boot.web.servlet.server.Session$Cookie.

    How can I configure this property?

  • server.servlet.session.persistent=false
  • Whether to persist session data between restarts.

    org.springframework.boot.web.servlet.server.Session.

    How can I configure this property?

  • server.servlet.session.store-dir=
  • Directory used to store session data.

    org.springframework.boot.web.servlet.server.Session.

    How can I configure this property?

  • server.servlet.session.timeout=30m
  • Session timeout. If a duration suffix is not specified, seconds will be used.

    org.springframework.boot.web.servlet.server.Session.

    How can I configure this property?

  • server.servlet.session.tracking-modes=
  • Session tracking modes.

    org.springframework.boot.web.servlet.server.Session.

    How can I configure this property?

  • server.ssl.bundle=
  • The name of a configured SSL bundle.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.certificate=
  • Path to a PEM-encoded SSL certificate file.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.certificate-private-key=
  • Path to a PEM-encoded private key file for the SSL certificate.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.ciphers=
  • Supported SSL ciphers.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.client-auth=
  • Client authentication mode. Requires a trust store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.enabled=true
  • Whether to enable SSL support.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.enabled-protocols=
  • Enabled SSL protocols.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.key-alias=
  • Alias that identifies the key in the key store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.key-password=
  • Password used to access the key in the key store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.key-store=
  • Path to the key store that holds the SSL certificate (typically a jks file).

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.key-store-password=
  • Password used to access the key store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.key-store-provider=
  • Provider for the key store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.key-store-type=
  • Type of the key store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.protocol=TLS
  • SSL protocol to use.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.trust-certificate=
  • Path to a PEM-encoded SSL certificate authority file.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.trust-certificate-private-key=
  • Path to a PEM-encoded private key file for the SSL certificate authority.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.trust-store=
  • Trust store that holds SSL certificates.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.trust-store-password=
  • Password used to access the trust store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.trust-store-provider=
  • Provider for the trust store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

  • server.ssl.trust-store-type=
  • Type of the trust store.

    org.springframework.boot.web.server.Ssl.

    How can I configure this property?

    Configuration Metadata

    The collection of configuration properties listed in this section are automatically generated from the CAS source and components that contain the actual field definitions, types, descriptions, modules, etc. This metadata may not always be 100% accurate, or could be lacking details and sufficient explanations.

    Be Selective

    This section is meant as a guide only. Do NOT copy/paste the entire collection of settings into your CAS configuration; rather pick only the properties that you need. Do NOT enable settings unless you are certain of their purpose and do NOT copy settings into your configuration only to keep them as reference. All these ideas lead to upgrade headaches, maintenance nightmares and premature aging.

    YAGNI

    Note that for nearly ALL use cases, declaring and configuring properties listed here is sufficient. You should NOT have to explicitly massage a CAS XML/Java/etc configuration file to design an authentication handler, create attribute release policies, etc. CAS at runtime will auto-configure all required changes for you. If you are unsure about the meaning of a given CAS setting, do NOT turn it on without hesitation. Review the codebase or better yet, ask questions to clarify the intended behavior.

    Naming Convention

    Property names can be specified in very relaxed terms. For instance cas.someProperty, cas.some-property, cas.some_property are all valid names. While all forms are accepted by CAS, there are certain components (in CAS and other frameworks used) whose activation at runtime is conditional on a property value, where this property is required to have been specified in CAS configuration using kebab case. This is both true for properties that are owned by CAS as well as those that might be presented to the system via an external library or framework such as Spring Boot, etc.

    :information_source: Note

    When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value. The only possible exception to this rule is when naming actuator endpoints; The name of the actuator endpoints (i.e. ssoSessions) MUST remain in camelCase mode.

    Settings and properties that are controlled by the CAS platform directly always begin with the prefix cas. All other settings are controlled and provided to CAS via other underlying frameworks and may have their own schemas and syntax. BE CAREFUL with the distinction. Unrecognized properties are rejected by CAS and/or frameworks upon which CAS depends. This means if you somehow misspell a property definition or fail to adhere to the dot-notation syntax and such, your setting is entirely refused by CAS and likely the feature it controls will never be activated in the way you intend.

    Validation

    Configuration properties are automatically validated on CAS startup to report issues with configuration binding, specially if defined CAS settings cannot be recognized or validated by the configuration schema. Additional validation processes are also handled via Configuration Metadata and property migrations applied automatically on startup by Spring Boot and family.

    Indexed Settings

    CAS settings able to accept multiple values are typically documented with an index, such as cas.some.setting[0]=value. The index [0] is meant to be incremented by the adopter to allow for distinct multiple configuration blocks.

    Execution

    The CAS web application, once built, may be deployed in place with the embedded container via the following command:

    1
    
    java -jar /path/to/cas.war
    

    Additionally, it is also possible to run CAS as a fully executable web application:

    1
    2
    
    # chmod +x /path/to/cas.war
    /path/to/cas.war
    

    This is achieved via the build process of the deployment overlay where a launch script is inserted at the beginning of the web application artifact. If you wish to see and examine the script, run the following commands:

    1
    2
    
     # X is the number of lines from the beginning of the file
     head -n X /path/to.cas.war
    

    Note that running CAS as a standalone and fully executable web application is supported on most Linux and OS X distributions. Other platforms such as Windows may require custom configuration.

    The following embedded servlet containers are available:

    Option Reference
    Apache Tomcat Please see this guide.
    Jetty Please see this guide.
    Undertow Please see this guide.