EncryptionKeySource

org.llm4s.agent.encryption.EncryptionKeySource
@Experimental

Where EncryptingCheckpointer and EncryptingRunQueue get their keys (#2449): the application's, never the store's. Implement it over a KMS or a secret manager; StaticKeySource holds keys the application loaded itself.

Both methods are called on the store's hot paths - current once per commit or submission that writes a payload, key once per key id per read - so an implementation over a remote service caches what it fetched. Rotation is current answering a key with a new KeyId while key still answers the old ones: every ciphertext names the key that wrote it, new writes use the new key, and old rows stay readable until they are pruned.

Implementations must be safe to call from several threads, and must never put key material in an error.

Attributes

Source
EncryptionKeySource.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

The key new payloads of tenantId's threads are encrypted with; None is a thread with no tenant. A Left refuses the write: nothing is stored in plain instead.

The key new payloads of tenantId's threads are encrypted with; None is a thread with no tenant. A Left refuses the write: nothing is stored in plain instead.

Attributes

Source
EncryptionKeySource.scala
def key(keyId: KeyId): Result[EncryptionKey]

The key named keyId, to read what it wrote - current or retired, of whatever tenant; a Left (EncryptionError.UnknownKey) fails the read.

The key named keyId, to read what it wrote - current or retired, of whatever tenant; a Left (EncryptionError.UnknownKey) fails the read.

Attributes

Source
EncryptionKeySource.scala