WORKERS AHEAD!
You are viewing the development documentation for the Apereo CAS server. The functionality presented here is not officially released yet. This is a work in progress and will be continually updated as development moves forward. You are most encouraged to test the changes presented.
Overview
CAS takes advantages of Swagger to produce API documentation automatically. The generated documentation supports all CAS endpoints and REST APIs provided they are made available to the runtime application context and are present in the overlay.
Support is enabled by including the following dependency in the overlay:
1
2
3
4
5
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-swagger</artifactId>
<version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-swagger:${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-swagger"
}
1
2
3
4
5
6
dependencies {
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-swagger"
}
The following settings and properties are available from the CAS configuration catalog:
springdoc.api-docs.enabled=true
Whether to generate and serve an OpenAPI document. |
springdoc.api-docs.groups.enabled=false
The Enabled. |
springdoc.api-docs.path=
Path to the generated OpenAPI documentation. For a yaml file, append ".yaml" to the path. |
springdoc.api-docs.resolve-schema-properties=false
The Resolve schema properties. |
springdoc.api-docs.version=
The OpenAPI version. |
springdoc.auto-tag-classes=true
The Auto tag classes. |
springdoc.cache.disabled=false
The Disabled. |
springdoc.consumes-to-match=
The Consumes to match. |
springdoc.default-consumes-media-type=
The Default consumes media type. |
springdoc.default-flat-param-object=false
The param default flatten |
springdoc.default-produces-media-type=
The Default produces media type. |
springdoc.default-support-form-data=false
convert query param to form data when consumes is multipart/form-data |
springdoc.disable-i18n=false
The Disable i18n. |
springdoc.enable-data-rest=true
The Enable hateoas. |
springdoc.enable-groovy=true
The Enable groovy. |
springdoc.enable-hateoas=true
The Enable hateoas. |
springdoc.enable-javadoc=true
The Enable javadoc. |
springdoc.enable-kotlin=true
The Enable kotlin. |
springdoc.enable-native-support=false
The Enable native support. |
springdoc.enable-spring-security=true
The Enable spring security. |
springdoc.group-configs=
The Group configs. |
springdoc.headers-to-match=
The Headers to match. |
springdoc.model-and-view-allowed=false
The Model and view allowed. |
springdoc.model-converters.deprecating-converter.enabled=false
The Enabled. |
springdoc.model-converters.pageable-converter.enabled=false
The Enabled. |
springdoc.model-converters.polymorphic-converter.enabled=false
The Enabled. |
springdoc.nullable-request-parameter-enabled=false
The Nullable request parameter enabled. |
springdoc.override-with-generic-response=
The Override with generic response. |
springdoc.packages-to-exclude=
The Packages to exclude. |
springdoc.packages-to-scan=
The Packages to scan. |
springdoc.paths-to-exclude=
The Paths to exclude. |
springdoc.paths-to-match=
The Paths to match. |
springdoc.pre-loading-enabled=false
Allow for pre-loading OpenAPI |
springdoc.produces-to-match=
The Produces to match. |
springdoc.remove-broken-reference-definitions=true
The Remove broken reference definitions. |
springdoc.show-actuator=false
The Show actuator. |
springdoc.show-login-endpoint=false
The Show login endpoint. |
springdoc.show-oauth2-endpoint=false
The Show oauth 2 endpoint. |
springdoc.show-spring-cloud-functions=true
The Show spring cloud functions. |
springdoc.sort-converter.enabled=false
The Enabled. |
springdoc.swagger-ui.config-url=
URL to fetch external configuration document from. |
springdoc.swagger-ui.csrf.cookie-name=
The Cookie name. |
springdoc.swagger-ui.csrf.enabled=false
The Enabled. |
springdoc.swagger-ui.csrf.header-name=
The Header name. |
springdoc.swagger-ui.csrf.local-storage-key=
The Local storage key. |
springdoc.swagger-ui.csrf.session-storage-key=
The Session storage key. |
springdoc.swagger-ui.csrf.use-local-storage=false
Use Local storage. |
springdoc.swagger-ui.csrf.use-session-storage=false
Use Session storage. |
springdoc.swagger-ui.deep-linking=
Enables or disables deep linking for tags and operations. @see deep-linking.md |
springdoc.swagger-ui.default-model-expand-depth=
The default expansion depth for the model on the model-example section. |
springdoc.swagger-ui.default-model-rendering=
Controls how the model is shown when the API is first rendered. |
springdoc.swagger-ui.default-models-expand-depth=
The default expansion depth for models (set to -1 completely hide the models). |
springdoc.swagger-ui.disable-swagger-default-url=false
The Disable swagger default url. |
springdoc.swagger-ui.display-operation-id=
Controls the display of operationId in operations list. |
springdoc.swagger-ui.display-request-duration=
Controls the display of the request duration (in milliseconds) for Try-It-Out requests. |
springdoc.swagger-ui.doc-expansion=
Controls the default expansion setting for the operations and tags. |
springdoc.swagger-ui.enabled=true
Whether to generate and serve an OpenAPI document. |
springdoc.swagger-ui.filter=
If set, enables filtering. The top bar will show an edit box that could be used to filter the tagged operations that are shown. |
springdoc.swagger-ui.groups-order=
The Groups order. |
springdoc.swagger-ui.layout=
The name of a component available via the plugin system to use as the top-level layout for Swagger UI. |
springdoc.swagger-ui.max-displayed-tags=
If set, limits the number of tagged operations displayed to at most this many. |
springdoc.swagger-ui.oauth.additional-query-string-params=
The Additional query string params. |
springdoc.swagger-ui.oauth.app-name=
The App name. |
springdoc.swagger-ui.oauth.client-id=
The Client id. |
springdoc.swagger-ui.oauth.client-secret=
The Client secret. |
springdoc.swagger-ui.oauth.config-parameters=
|
springdoc.swagger-ui.oauth.realm=
The Realm. |
springdoc.swagger-ui.oauth.scope-separator=
The Scope separator. |
springdoc.swagger-ui.oauth.scopes=
The Scopes selected by default upon authentication. |
springdoc.swagger-ui.oauth.use-basic-authentication-with-access-code-grant=
The Use basic authentication with access code grant. |
springdoc.swagger-ui.oauth.use-pkce-with-authorization-code-grant=
The Use pkce with authorization code grant. |
springdoc.swagger-ui.oauth2-redirect-url=
OAuth redirect URL. |
springdoc.swagger-ui.operations-sorter=
Apply a sort to the operation list of each API |
springdoc.swagger-ui.path=
The path for the Swagger UI pages to load. Will redirect to the springdoc.webjars.prefix property. |
springdoc.swagger-ui.persist-authorization=
The Persist authorization. |
springdoc.swagger-ui.query-config-enabled=
The Query config enabled. |
springdoc.swagger-ui.show-common-extensions=
Controls the display of extensions |
springdoc.swagger-ui.show-extensions=
Controls the display of vendor extension (x-) fields and values. |
springdoc.swagger-ui.supported-submit-methods=
The supported try it out methods |
springdoc.swagger-ui.syntax-highlight.activated=
The Activated. |
springdoc.swagger-ui.syntax-highlight.theme=
The Theme. |
springdoc.swagger-ui.tags-sorter=
Apply a sort to the tag list of each API |
springdoc.swagger-ui.try-it-out-enabled=
Try it out enabled |
springdoc.swagger-ui.url=
The Url. |
springdoc.swagger-ui.urls=
The Urls. |
springdoc.swagger-ui.urls-primary-name=
The Urls primary name. |
springdoc.swagger-ui.use-root-path=false
The Use root path. |
springdoc.swagger-ui.validator-url=
URL to validate specs against. |
springdoc.swagger-ui.version=
The Swagger ui version. |
springdoc.swagger-ui.with-credentials=
The With credentials. |
springdoc.use-fqn=false
Use fully qualified name |
springdoc.use-management-port=false
If set to true, exposes the swagger-ui on the actuator management port. |
springdoc.webjars.prefix=
The Prefix. |
springdoc.writer-with-default-pretty-printer=false
The Writer with default pretty printer. |
springdoc.writer-with-order-by-keys=false
The Writer with order by keys. |
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.

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. The validation process is on by default and can be skipped on startup using a special system
property SKIP_CONFIG_VALIDATION
that should be set to true
. 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.
Endpoints
The following Swagger endpoints may be used to analyze and test the APIs:
Description | URL |
---|---|
Swagger API Specification | https://sso.example.org/cas/v3/api-docs |
Swagger UI | https://sso.example.org/cas/swagger-ui.html |