Security in distributed KV caching
Distributed key-value (KV) caching uses the same security model as ElastiCache for Valkey. For the security of ElastiCache, see Security in Amazon ElastiCache. The following sections describe only the security settings that are specific to distributed KV caching.
Topics
Infrastructure security
For infrastructure security in ElastiCache, see Infrastructure security in Amazon ElastiCache.
Elastic Fabric Adapter (EFA) requires a security group with a self-referencing inbound rule and a self-referencing outbound rule. Attach it to the cluster, and to the primary interface and every efa and efa-only interface of each client host. For the commands, see Step 2: Create a security group.
Access control
Role-based access control (RBAC) users and user groups control data access. To add a user group when you create the cluster, use --user-group-ids. For more information, see Role-Based Access Control (RBAC).
Amazon Identity and Access Management (IAM) authentication is available for Valkey clients. For more information, see Authenticating with IAM in ElastiCache. LMCache doesn't support IAM authentication. LMCache connects with an RBAC user and a password.
The @largeobj access control list (ACL) category contains all large object commands. For the categories of each command, see Large object ACLs.
Valkey user for LMCache
Limit the Valkey user of LMCache to the LMCache keys and to the commands of its transport. Replace key-prefix with the key_prefix value that LMCache uses. For the access string of the rdma transport, see Step 8: Connect your inference engine.
For the blob-tcp transport, use the following access string. Each LMCache worker sends BLOB.INFO __lmcache_blob_tcp_probe__ when it connects. Without the probe key in the access string, LMCache doesn't start.
on ~key-prefix@* ~__lmcache_blob_tcp_probe__ +@largeobj +EXISTS +DEL +EXPIRE +INFO +PING +client|setinfo +client|setname +cluster|slots +cluster|info
For the tcp transport, use the following access string. The tcp transport sets the time to live (TTL) in the same SET command, so it doesn't need @largeobj or +EXPIRE.
on ~key-prefix@* +GET +SET +EXISTS +DEL +INFO +PING +client|setinfo +client|setname +cluster|slots +cluster|info
Data protection
For more information about encryption in ElastiCache, see Data security in Amazon ElastiCache.
Encryption in transit
A distributed KV caching cluster requires encryption in transit, with TransitEncryptionMode set to required. You can't turn off encryption in transit or change this mode. Transport Layer Security (TLS) protects all commands and replies, the data that BLOB.TCP_SET and BLOB.TCP_GET send, and the SET and GET data of the LMCache tcp transport.
With BLOB.RDMA_SET and BLOB.RDMA_GET, the object data moves over EFA, and TLS doesn't protect it. The Amazon Nitro System hardware automatically encrypts traffic between cache.i8ge.48xlarge nodes and supported client instance types in the same VPC with 256-bit authenticated encryption with associated data (AEAD). To check whether your client instance type is supported, see Encryption in transit in the Amazon EC2 User Guide. For more information about how remote direct memory access (RDMA) data and client memory regions are handled, see Security
Encryption at rest
A hardware module on the instance always encrypts data on the Non-Volatile Memory Express (NVMe) instance storage of the node with an XTS-AES-256 cipher, and destroys the keys when the node is replaced or terminated. ElastiCache also removes all data from NVMe storage when a node starts or shuts down.
Encryption at rest is always on, and you can't turn it off. Data on NVMe storage is also encrypted at rest with a key from Amazon Key Management Service (Amazon KMS). By default, ElastiCache uses an Amazon owned key. To use a customer managed key, specify it with --kms-key-id when you create the cluster. For more information, see Using customer managed keys from Amazon KMS.
Security best practices for distributed KV caching
In addition to the security practices for ElastiCache (see Security in Amazon ElastiCache), use the following practices for a distributed KV caching cluster:
Remove the
@largeobjcategory (-@largeobj) from users that don't need the large object commands.Use a dedicated EFA security group that contains only the cluster and its client hosts.
Use client instance types that support Nitro encryption in transit for RDMA traffic.
Check the RDMA error counters in
INFO largeobj. For more information, see Node-level detail with INFO largeobj.
Compliance validation
For all security topics for ElastiCache, see Security in Amazon ElastiCache, and for compliance information, see Compliance validation for Amazon ElastiCache.