StaticKeySource

org.llm4s.agent.encryption.StaticKeySource
See theStaticKeySource companion object
@Experimental
final class StaticKeySource extends EncryptionKeySource

Keys held in memory (#2449): one for every thread, or one per tenant, with retired keys kept for reading.

for key <- EncryptionKey.fromBase64(KeyId("2026-11"), fromSecretStore)
yield StaticKeySource(key)                  // one key for every thread
 .withTenantKey(TenantId("acme"), acmeKey) // acme's own
 .withRetiredKey(lastYearsKey)             // still read, never written with

Every key needs an id of its own: adding a second key under an id already held throws IllegalArgumentException (the same key again is accepted). toString lists key ids only.

Attributes

Companion
object
Source
EncryptionKeySource.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete 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
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
EncryptionKeySource.scala

This source, also reading what key wrote; nothing new is written with it unless it is also a current key.

This source, also reading what key wrote; nothing new is written with it unless it is also a current key.

Attributes

Source
EncryptionKeySource.scala

This source, encrypting tenantId's payloads with key instead of the default.

This source, encrypting tenantId's payloads with key instead of the default.

Attributes

Source
EncryptionKeySource.scala