Files
Andreas Coroiu 17fd7dce07 [PM-42410] feat: Gate vault decryption on SDK client readiness (#24015)
Add SdkService.cryptoReady$ and key KeyService.cipherDecryptionKeys$ on
it. USER_KEY in state only says that a key exists. The SDK writes it
partway through unlock, before setOrgKeys has run, so a consumer keyed
on state starts decrypting against a client that fails every
organization cipher.

While the client is not ready, non-null keys are held back and null is
passed through, so a lock still reaches consumers right away. This
gates every lock and unlock cycle, and firstValueFrom(orgKeys$) still
resolves to null while locked.

DefaultSdkService.cryptoReady$ is always true for now: per-user clients
are rebuilt from the same state consumers read, so there is no window.
The long-lived client wires the transitions into the push methods.
2026-11-06 16:54:56 +01:00
..

Key management

This lib represents the public API of the Key management team at Bitwarden. Modules are imported using @bitwarden/key-management.