Class BaseRedisProperties
java.lang.Object
org.apereo.cas.configuration.model.support.redis.BaseRedisProperties
- All Implemented Interfaces:
Serializable
,CasFeatureModule
- Direct Known Subclasses:
AuditRedisProperties
,RedisAcceptableUsagePolicyProperties
,RedisAuthenticationProperties
,RedisConsentProperties
,RedisEventsProperties
,RedisGoogleAuthenticatorMultifactorProperties
,RedisPrincipalAttributesProperties
,RedisSamlMetadataProperties
,RedisServiceRegistryProperties
,RedisTicketRegistryProperties
,RedisTrustedDevicesMultifactorProperties
,WebAuthnRedisMultifactorProperties
,YubiKeyRedisMultifactorProperties
@RequiresModule(name="cas-server-support-redis-core")
public class BaseRedisProperties
extends Object
implements Serializable, CasFeatureModule
This is
BaseRedisProperties
.- Since:
- 5.2.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The Lettuce libraryReadFrom
types that determine how Lettuce routes read operations to replica nodes.Nested classes/interfaces inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
CasFeatureModule.FeatureCatalog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRedis cluster settings.Connection timeout.int
Database index used by the connection factory.getHost()
Redis server host.May be used when making SSL connections.May be used when making SSL connections.The password of thekeyFile
, ornull
if it's not password-protected.Login password of the redis server.getPool()
Redis connection pool settings.int
getPort()
Redis server port.Redis protocol version.Setting that describes how Lettuce routes read operations to replica nodes.long
Redis scan count option.Redis Sentinel settings.The shared native connection is never closed by Lettuce connection, therefore it is not validated by default when connections are retrieved.Command timeout.getUri()
Database URI.Login username of the redis server.boolean
Whether the module is enabled or not, defaults to true.boolean
Start mutual TLS.boolean
isUseSsl()
Whether or not to use SSL for connection factory.boolean
Control how peer verification is handled with redis connections.setCluster
(RedisClusterProperties cluster) Redis cluster settings.setConnectTimeout
(String connectTimeout) Connection timeout.setDatabase
(int database) Database index used by the connection factory.setEnabled
(boolean enabled) Whether the module is enabled or not, defaults to true.Redis server host.setKeyCertificateChainFile
(File keyCertificateChainFile) May be used when making SSL connections.setKeyFile
(File keyFile) May be used when making SSL connections.setKeyPassword
(String keyPassword) The password of thekeyFile
, ornull
if it's not password-protected.setPassword
(String password) Login password of the redis server.setPool
(RedisPoolProperties pool) Redis connection pool settings.setPort
(int port) Redis server port.setProtocolVersion
(String protocolVersion) Redis protocol version.Setting that describes how Lettuce routes read operations to replica nodes.setScanCount
(long scanCount) Redis scan count option.setSentinel
(RedisSentinelProperties sentinel) Redis Sentinel settings.setShareNativeConnections
(Boolean shareNativeConnections) The shared native connection is never closed by Lettuce connection, therefore it is not validated by default when connections are retrieved.setStartTls
(boolean startTls) Start mutual TLS.setTimeout
(String timeout) Command timeout.Database URI.setUsername
(String username) Login username of the redis server.setUseSsl
(boolean useSsl) Whether or not to use SSL for connection factory.setVerifyPeer
(boolean verifyPeer) Control how peer verification is handled with redis connections.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
isDefined, isUndefined
-
Constructor Details
-
BaseRedisProperties
public BaseRedisProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()Whether the module is enabled or not, defaults to true. -
getUri
Database URI. -
getDatabase
public int getDatabase()Database index used by the connection factory. -
getHost
Redis server host. -
getUsername
Login username of the redis server. -
getPassword
Login password of the redis server. -
getPort
public int getPort()Redis server port. -
getTimeout
Command timeout. -
getPool
Redis connection pool settings. -
getSentinel
Redis Sentinel settings. -
getCluster
Redis cluster settings. -
getScanCount
public long getScanCount()Redis scan count option. When and if specified, SCAN operations would be "counted" or limited by this setting. While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option. Basically with COUNT the user specified the amount of work that should be done at every call in order to retrieve elements from the collection. This is just a hint for the implementation, however generally speaking this is what you could expect most of the times from the implementation. -
isUseSsl
public boolean isUseSsl()Whether or not to use SSL for connection factory. -
getProtocolVersion
Redis protocol version. -
getConnectTimeout
Connection timeout. -
getReadFrom
Setting that describes how Lettuce routes read operations to replica nodes. Note that modes referencing MASTER/SLAVE are deprecated (but still supported) in the Lettuce redis client dependency so migrate config to UPSTREAM/REPLICA. -
isVerifyPeer
public boolean isVerifyPeer()Control how peer verification is handled with redis connections. Peer verification is a security feature that checks if the host you're connecting to is who it says it is. This is often done by checking a digital certificate. -
isStartTls
public boolean isStartTls()Start mutual TLS. In order to support TLS, Redis should be configured with a X.509 certificate and a private key. In addition, it is necessary to specify a CA certificate bundle file or path to be used as a trusted root when validating certificates. -
getKeyCertificateChainFile
May be used when making SSL connections. Sets the certificate file to use for client authentication. This is typically anX.509
certificate file (or chain file) in PEM format. -
getKeyFile
May be used when making SSL connections. Sets the key file for client authentication. The key is reloaded on each connection attempt that allows to replace certificates during runtime. This is typically aPKCS#8
private key file in PEM format. -
getKeyPassword
The password of thekeyFile
, ornull
if it's not password-protected. -
setEnabled
Whether the module is enabled or not, defaults to true.- Returns:
this
.
-
setUri
Database URI.- Returns:
this
.
-
setDatabase
Database index used by the connection factory.- Returns:
this
.
-
setHost
Redis server host.- Returns:
this
.
-
setUsername
Login username of the redis server.- Returns:
this
.
-
setPassword
Login password of the redis server.- Returns:
this
.
-
setPort
Redis server port.- Returns:
this
.
-
setTimeout
Command timeout.- Returns:
this
.
-
setPool
Redis connection pool settings.- Returns:
this
.
-
setSentinel
Redis Sentinel settings.- Returns:
this
.
-
setCluster
Redis cluster settings.- Returns:
this
.
-
setScanCount
Redis scan count option. When and if specified, SCAN operations would be "counted" or limited by this setting. While SCAN does not provide guarantees about the number of elements returned at every iteration, it is possible to empirically adjust the behavior of SCAN using the COUNT option. Basically with COUNT the user specified the amount of work that should be done at every call in order to retrieve elements from the collection. This is just a hint for the implementation, however generally speaking this is what you could expect most of the times from the implementation.- Returns:
this
.
-
setUseSsl
Whether or not to use SSL for connection factory.- Returns:
this
.
-
setProtocolVersion
Redis protocol version.- Returns:
this
.
-
setConnectTimeout
Connection timeout.- Returns:
this
.
-
setReadFrom
Setting that describes how Lettuce routes read operations to replica nodes. Note that modes referencing MASTER/SLAVE are deprecated (but still supported) in the Lettuce redis client dependency so migrate config to UPSTREAM/REPLICA.- Returns:
this
.
-
setVerifyPeer
Control how peer verification is handled with redis connections. Peer verification is a security feature that checks if the host you're connecting to is who it says it is. This is often done by checking a digital certificate.- Returns:
this
.
-
setStartTls
Start mutual TLS. In order to support TLS, Redis should be configured with a X.509 certificate and a private key. In addition, it is necessary to specify a CA certificate bundle file or path to be used as a trusted root when validating certificates.- Returns:
this
.
-
setKeyCertificateChainFile
May be used when making SSL connections. Sets the certificate file to use for client authentication. This is typically anX.509
certificate file (or chain file) in PEM format.- Returns:
this
.
-
setKeyFile
May be used when making SSL connections. Sets the key file for client authentication. The key is reloaded on each connection attempt that allows to replace certificates during runtime. This is typically aPKCS#8
private key file in PEM format.- Returns:
this
.
-
setKeyPassword
The password of thekeyFile
, ornull
if it's not password-protected.- Returns:
this
.
-