콘텐츠로 이동
한국어

ObjectStorageDurableStateStoreOptionsType

이 콘텐츠는 아직 번역되지 않았습니다.

ObjectStorageDurableStateStoreOptionsType = StoreSerializerOptionsBase & object

Defined in: src/persistence/durable-state-stores/ObjectStorageDurableStateStoreOptions.ts:13

readonly backend: ObjectStorageBackend

readonly optional compression?: CompressionConfig | CompressionResolver

readonly optional encryption?: EncryptionConfig | EncryptionResolver

readonly optional integrity?: IntegrityConfig | IntegrityResolver

Opt-in HMAC-SHA256 integrity protection over each body (#116). Closes a tamper-in-place gap on unencrypted bodies: without this, an attacker with write access to the backend bucket can flip the revision field in the JSON and bypass CAS. Default { mode: 'none' } is back-compat (no integrity tag); set { mode: 'hmac-sha256', integrityKey } to protect new writes and verify reads.

Legacy bodies without the integrity flag still decode cleanly — tag is opt-in. Migrate by reading-then-writing once integrity is enabled.

readonly optional maxDecompressedBytes?: number

Cap on the decompressed size of a stored body in bytes — the decompression-bomb guard on read (security audit #3). Default 512 MiB (DEFAULT_MAX_DECOMPRESSED_BYTES); Infinity opts out. Raise it to restore a legitimately large state blob, or lower it for a tighter bound.

readonly optional ownsBackend?: boolean

Whether close() should also close the injected backend. Default true — a standalone store owns the backend it was given. Set false when the backend is shared with another store (as registerObjectStoragePlugins does) so the owner closes it once.

readonly optional prefix?: string

readonly optional requireIntegrity?: boolean

When set with an integrity config, decode rejects bodies that DON’T carry an integrity tag. Use after a deployment has been fully migrated so an attacker can’t downgrade by re-writing a body without the tag.