Configuration Management - Clustered Deployments with AMQP

This is one option for broadcasting change events to CAS nodes. RabbitMQ is open source message broker software (sometimes called message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP).

Support is enabled by including the following dependency in the final overlay:

1
2
3
4
5
<dependency>
    <groupId>org.apereo.cas</groupId>
    <artifactId>cas-server-support-configuration-cloud-amqp</artifactId>
    <version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-configuration-cloud-amqp:${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-configuration-cloud-amqp"
}
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-configuration-cloud-amqp"
}

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.

  • spring.rabbitmq.address-shuffle-mode=none
  • Mode used to shuffle configured addresses.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.addresses=
  • Comma-separated list of addresses to which the client should connect. When set, the host and port are ignored.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.cache.channel.checkout-timeout=
  • Duration to wait to obtain a channel if the cache size has been reached. If 0, always create a new channel.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Cache$Channel.

    How can I configure this property?

  • spring.rabbitmq.cache.channel.size=
  • Number of channels to retain in the cache. When "check-timeout" > 0, max channels per connection.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Cache$Channel.

    How can I configure this property?

  • spring.rabbitmq.cache.connection.mode=channel
  • Connection factory cache mode.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Cache$Connection.

    How can I configure this property?

  • spring.rabbitmq.cache.connection.size=
  • Number of connections to cache. Only applies when mode is CONNECTION.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Cache$Connection.

    How can I configure this property?

  • spring.rabbitmq.channel-rpc-timeout=10m
  • Continuation timeout for RPC calls in channels. Set it to zero to wait forever.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.connection-timeout=
  • Connection timeout. Set it to zero to wait forever.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.dynamic=true
  • Whether to create an AmqpAdmin bean.

    How can I configure this property?

  • spring.rabbitmq.host=localhost
  • RabbitMQ host. Ignored if an address is set.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.acknowledge-mode=
  • Acknowledge mode of container.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.auto-startup=true
  • Whether to start the container automatically on startup.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.consumers-per-queue=
  • Number of consumers per queue.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.de-batching-enabled=true
  • Whether the container should present batched messages as discrete messages or call the listener with the batch.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.default-requeue-rejected=
  • Whether rejected deliveries are re-queued by default.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.force-stop=false
  • Whether the container (when stopped) should stop immediately after processing the current message or stop after processing all pre-fetched messages.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.idle-event-interval=
  • How often idle container events should be published.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.missing-queues-fatal=false
  • Whether to fail if the queues declared by the container are not available on the broker.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.prefetch=
  • Maximum number of unacknowledged messages that can be outstanding at each consumer.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$DirectContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.retry.enabled=false
  • Whether publishing retries are enabled.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.retry.initial-interval=1000ms
  • Duration between the first and second attempt to deliver a message.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.retry.max-attempts=3
  • Maximum number of attempts to deliver a message.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.retry.max-interval=10000ms
  • Maximum duration between attempts.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.retry.multiplier=1
  • Multiplier to apply to the previous retry interval.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.direct.retry.stateless=true
  • Whether retries are stateless or stateful.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.acknowledge-mode=
  • Acknowledge mode of container.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.auto-startup=true
  • Whether to start the container automatically on startup.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.batch-size=
  • Batch size, expressed as the number of physical messages, to be used by the container.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.concurrency=
  • Minimum number of listener invoker threads.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.consumer-batch-enabled=false
  • Whether the container creates a batch of messages based on the 'receive-timeout' and 'batch-size'. Coerces 'de-batching-enabled' to true to include the contents of a producer created batch in the batch as discrete records.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.de-batching-enabled=true
  • Whether the container should present batched messages as discrete messages or call the listener with the batch.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.default-requeue-rejected=
  • Whether rejected deliveries are re-queued by default.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.force-stop=false
  • Whether the container (when stopped) should stop immediately after processing the current message or stop after processing all pre-fetched messages.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.idle-event-interval=
  • How often idle container events should be published.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.max-concurrency=
  • Maximum number of listener invoker threads.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.missing-queues-fatal=true
  • Whether to fail if the queues declared by the container are not available on the broker and/or whether to stop the container if one or more queues are deleted at runtime.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.prefetch=
  • Maximum number of unacknowledged messages that can be outstanding at each consumer.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$SimpleContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.retry.enabled=false
  • Whether publishing retries are enabled.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.retry.initial-interval=1000ms
  • Duration between the first and second attempt to deliver a message.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.retry.max-attempts=3
  • Maximum number of attempts to deliver a message.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.retry.max-interval=10000ms
  • Maximum duration between attempts.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.retry.multiplier=1
  • Multiplier to apply to the previous retry interval.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.retry.stateless=true
  • Whether retries are stateless or stateful.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$ListenerRetry.

    How can I configure this property?

  • spring.rabbitmq.listener.simple.transaction-size=
  • How can I configure this property?

    Deprecation status is ERRORwithout a replacement setting.

  • spring.rabbitmq.listener.stream.auto-startup=true
  • Whether to start the container automatically on startup.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$StreamContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.stream.native-listener=false
  • Whether the container will support listeners that consume native stream messages instead of Spring AMQP messages.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$StreamContainer.

    How can I configure this property?

  • spring.rabbitmq.listener.type=simple
  • Listener container type.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Listener.

    How can I configure this property?

  • spring.rabbitmq.max-inbound-message-body-size=64MB
  • Maximum size of the body of inbound (received) messages.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.password=guest
  • Login to authenticate against the broker.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.port=
  • RabbitMQ port. Ignored if an address is set. Default to 5672, or 5671 if SSL is enabled.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.publisher-confirm-type=
  • Type of publisher confirms to use.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.publisher-confirms=
  • How can I configure this property?

    Deprecation status is ERRORwithout a replacement setting.

  • spring.rabbitmq.publisher-returns=false
  • Whether to enable publisher returns.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.requested-channel-max=2047
  • Number of channels per connection requested by the client. Use 0 for unlimited.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.requested-heartbeat=
  • Requested heartbeat timeout; zero for none. If a duration suffix is not specified, seconds will be used.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.ssl.algorithm=
  • SSL algorithm to use. By default, configured by the Rabbit client library.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.bundle=
  • SSL bundle name.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.enabled=
  • Whether to enable SSL support. Determined automatically if an address is provided with the protocol (amqp:// vs. amqps://).

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.key-store=
  • Path to the key store that holds the SSL certificate.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.key-store-algorithm=SunX509
  • Key store algorithm.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

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

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.key-store-type=PKCS12
  • Key store type.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

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

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.trust-store-algorithm=SunX509
  • Trust store algorithm.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

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

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.trust-store-type=JKS
  • Trust store type.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.validate-server-certificate=true
  • Whether to enable server side certificate validation.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.ssl.verify-hostname=true
  • Whether to enable hostname verification.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Ssl.

    How can I configure this property?

  • spring.rabbitmq.stream.host=localhost
  • Host of a RabbitMQ instance with the Stream plugin enabled.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Stream.

    How can I configure this property?

  • spring.rabbitmq.stream.name=
  • Name of the stream.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Stream.

    How can I configure this property?

  • spring.rabbitmq.stream.password=
  • Login password to authenticate to the broker. When not set spring.rabbitmq.password is used.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Stream.

    How can I configure this property?

  • spring.rabbitmq.stream.port=
  • Stream port of a RabbitMQ instance with the Stream plugin enabled.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Stream.

    How can I configure this property?

  • spring.rabbitmq.stream.username=
  • Login user to authenticate to the broker. When not set, spring.rabbitmq.username is used.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Stream.

    How can I configure this property?

  • spring.rabbitmq.stream.virtual-host=
  • Virtual host of a RabbitMQ instance with the Stream plugin enabled. When not set, spring.rabbitmq.virtual-host is used.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Stream.

    How can I configure this property?

  • spring.rabbitmq.template.default-receive-queue=
  • Name of the default queue to receive messages from when none is specified explicitly.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Template.

    How can I configure this property?

  • spring.rabbitmq.template.exchange=
  • Name of the default exchange to use for send operations.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Template.

    How can I configure this property?

  • spring.rabbitmq.template.mandatory=
  • Whether to enable mandatory messages.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Template.

    How can I configure this property?

  • spring.rabbitmq.template.queue=
  • How can I configure this property?

    Deprecation status is ERRORwith a replacement setting: spring.rabbitmq.template.default-receive-queue.

  • spring.rabbitmq.template.receive-timeout=
  • Timeout for receive() operations.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Template.

    How can I configure this property?

  • spring.rabbitmq.template.reply-timeout=
  • Timeout for sendAndReceive() operations.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Template.

    How can I configure this property?

  • spring.rabbitmq.template.retry.enabled=false
  • Whether publishing retries are enabled.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Retry.

    How can I configure this property?

  • spring.rabbitmq.template.retry.initial-interval=1000ms
  • Duration between the first and second attempt to deliver a message.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Retry.

    How can I configure this property?

  • spring.rabbitmq.template.retry.max-attempts=3
  • Maximum number of attempts to deliver a message.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Retry.

    How can I configure this property?

  • spring.rabbitmq.template.retry.max-interval=10000ms
  • Maximum duration between attempts.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Retry.

    How can I configure this property?

  • spring.rabbitmq.template.retry.multiplier=1
  • Multiplier to apply to the previous retry interval.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Retry.

    How can I configure this property?

  • spring.rabbitmq.template.routing-key=
  • Value of a default routing key to use for send operations.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties$Template.

    How can I configure this property?

  • spring.rabbitmq.username=guest
  • Login user to authenticate to the broker.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    How can I configure this property?

  • spring.rabbitmq.virtual-host=
  • Virtual host to use when connecting to the broker.

    org.springframework.boot.autoconfigure.amqp.RabbitProperties.

    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.

    Troubleshooting

    To enable additional logging, modify the logging configuration file to add the following:

    1
    2
    3
    4
    
    <Logger name="org.springframework.amqp" level="debug" additivity="false">
        <AppenderRef ref="casConsole"/>
        <AppenderRef ref="casFile"/>
    </Logger>