Cassandra Ticket Registry

Cassandra integration 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-cassandra-ticket-registry</artifactId>
  <version>${cas.version}</version>
</dependency>
1
implementation "org.apereo.cas:cas-server-support-cassandra-ticket-registry:${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-cassandra-ticket-registry"
}

This registry stores tickets in Apache Cassandra instances. Tickets are expected to be found/stored in a castickets table with a default write consistency of LOCAL_QUORUM and read consistency of ONE.

Troubleshooting

To enable additional logging, configure the log4j configuration file to add the following levels:

1
2
3
4
5
6
...
<Logger name="com.datastax.driver" level="debug" additivity="false">
    <AppenderRef ref="console"/>
    <AppenderRef ref="file"/>
</Logger>
...

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.

  • cas.ticket.registry.cassandra.crypto.encryption.key=
  • The encryption key. The encryption key by default and unless specified otherwise must be randomly-generated string whose length is defined by the encryption key size setting.

    org.apereo.cas.configuration.model.core.util.EncryptionRandomizedCryptoProperties.

  • cas.ticket.registry.cassandra.crypto.signing.key=
  • The signing key is a JWT whose length is defined by the signing key size setting.

    org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

  • cas.ticket.registry.cassandra.contact-points=
  • The list of contact points to use for the new cluster.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.keyspace=
  • Keyspace address to use where the cluster would connect.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.password=
  • Password to bind and establish a connection to cassandra.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.username=
  • Username to bind and establish a connection to cassandra.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

    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.

  • cas.ticket.registry.cassandra.crypto.alg=AES
  • The signing/encryption algorithm to use.

    org.apereo.cas.configuration.model.core.util.EncryptionRandomizedSigningJwtCryptographyProperties.

  • cas.ticket.registry.cassandra.crypto.enabled=true
  • Whether crypto operations are enabled.

    org.apereo.cas.configuration.model.core.util.EncryptionRandomizedSigningJwtCryptographyProperties.

  • cas.ticket.registry.cassandra.crypto.encryption.key-size=16
  • Encryption key size.

    org.apereo.cas.configuration.model.core.util.EncryptionRandomizedCryptoProperties.

  • cas.ticket.registry.cassandra.crypto.signing.key-size=512
  • The signing key size.

    org.apereo.cas.configuration.model.core.util.SigningJwtCryptoProperties.

  • cas.ticket.registry.cassandra.consistency-level=LOCAL_QUORUM
  • Query option consistency level. The consistency level set through this method will be use for queries that don't explicitly have a consistency level. Accepted values are:ALL, ANY, EACH_QUORUM, LOCAL_ONE, LOCAL_QUORUM, LOCAL_SERIAL, ONE, QUORUM, SERIAL, THREE, TWO.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.drop-tables-on-startup=false
  • Flag that indicates whether to drop tables on start up.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.local-dc=
  • Used by a DC-ware round-robin load balancing policy. This policy provides round-robin queries over the node of the local data center. It also includes in the query plans returned a configurable number of hosts in the remote data centers, but those are always tried after the local nodes. In other words, this policy guarantees that no host in a remote data center will be queried unless no host in the local data center can be reached.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.serial-consistency-level=LOCAL_SERIAL
  • Query option serial consistency level. The serial consistency level set through this method will be use for queries that don't explicitly have a serial consistency level. Accepted values are:ALL, ANY, EACH_QUORUM, LOCAL_ONE, LOCAL_QUORUM, LOCAL_SERIAL, ONE, QUORUM, SERIAL, THREE, TWO.

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.

  • cas.ticket.registry.cassandra.timeout=PT5S
  • The request timeout. This defines how long the driver will wait for a given Cassandra node to answer a query.

    This settings supports the java.time.Duration syntax [?].

    org.apereo.cas.configuration.model.support.cassandra.ticketregistry.CassandraTicketRegistryProperties.