bookclerk_library::secret_kind

Development These docs follow the development version and change with every merge.

Last updated View as Markdown

Well-known kind values for the encrypted_secrets table.

Runtime credentials live here. Bootstrap credentials (BOOKCLERK_AUTH_PASSWORD, BOOKCLERK_D1_API_TOKEN, BOOKCLERK_DATABASE_POSTGRES_URL) are env-only and never stored in this table. BOOKCLERK_OPERATOR_TOKEN may override the durable OPERATOR_TOKEN row without writing it.

Item Kind Summary
SOURCE_AUTH constant Store / source OAuth credentials (Audible, Libro.fm, Chirp, GA).
S3 constant S3 / object-storage credentials.
WIDEVINE constant Widevine L3 CDM device blob (kind = widevine).
OPERATOR_TOKEN constant Daemon HTTP operator API token (Bearer / GUI login).
OIDC_CLIENT constant OIDC/OAuth relying-party client secret (name = provider id).
TOTP constant User TOTP shared secret (name = primary or pending).
PLUGIN_INSTANCE constant Plugin-instance secret referenced by a plugin_instance config document.
LIBRARY_LINK constant On a branch node: the private node keys of one owner-library link (provider = parent library id, account_id = this node's id there).
LIBRARY_JOIN constant On a host joining a library: the PKCE verifier and node keys of one sign-in in progress (provider = parent library id, account_id = the pending join's state hash). Deleted when the join completes or expires.
CLERK_CARD constant On a clerk: the library card of one library (provider = the library's id, account_id = the same). Deleted when the card is signed out.
WINDOW_SESSION constant On a desktop branch: the portal session of the patron its window is signed in as (provider and account_id = this node's id, so branches sharing one database keep their own). Replaced at every launch and deleted when the window signs out.

Constants

SOURCE_AUTH

pub const SOURCE_AUTH: &str = "source_auth";

Store / source OAuth credentials (Audible, Libro.fm, Chirp, GA).

S3

pub const S3: &str = "s3";

S3 / object-storage credentials.

WIDEVINE

pub const WIDEVINE: &str = "widevine";

Widevine L3 CDM device blob (kind = widevine).

OPERATOR_TOKEN

pub const OPERATOR_TOKEN: &str = "operator_token";

Daemon HTTP operator API token (Bearer / GUI login).

OIDC_CLIENT

pub const OIDC_CLIENT: &str = "oidc_client";

OIDC/OAuth relying-party client secret (name = provider id).

TOTP

pub const TOTP: &str = "totp";

User TOTP shared secret (name = primary or pending).

PLUGIN_INSTANCE

pub const PLUGIN_INSTANCE: &str = "plugin_instance";

Plugin-instance secret referenced by a plugin_instance config document.

Ciphertext stays in this table. The configuration document stores the ref name only.

pub const LIBRARY_LINK: &str = "library_link";

On a branch node: the private node keys of one owner-library link (provider = parent library id, account_id = this node's id there).

LIBRARY_JOIN

pub const LIBRARY_JOIN: &str = "library_join";

On a host joining a library: the PKCE verifier and node keys of one sign-in in progress (provider = parent library id, account_id = the pending join's state hash). Deleted when the join completes or expires.

CLERK_CARD

pub const CLERK_CARD: &str = "clerk_card";

On a clerk: the library card of one library (provider = the library's id, account_id = the same). Deleted when the card is signed out.

WINDOW_SESSION

pub const WINDOW_SESSION: &str = "window_session";

On a desktop branch: the portal session of the patron its window is signed in as (provider and account_id = this node's id, so branches sharing one database keep their own). Replaced at every launch and deleted when the window signs out.

Generated from crates/bookclerk-library at main · View as Markdown