Skip to content

Local Security & Keychain

Credential Storage

Maktabi Agent implements enterprise-grade OS credential management:

  • Windows: Windows Credential Manager (keytar via DPAPI encryption).
  • macOS: Apple Keychain Services.
  • Linux: Secret Service API / libsecret.

Your desktop session token (mk_dsk_...) is never stored in plain text configuration files, local storage, or environment files.

Token Hashing Contract

When a token is generated:

  1. The plaintext token is generated using 32 cryptographically secure random bytes.
  2. The server computes the SHA-256 digest: hash = sha256(token).
  3. Only the SHA-256 digest is stored in the database table maktabi.desktop_tokens.
  4. Even in the event of a database compromise, plaintext tokens cannot be reconstructed.

Offline Grace Period

Maktabi includes a 14-day offline grace period. If your internet connection drops while traveling or working in court:

  • You retain access to your local workspace, existing drafts, and offline templates.
  • When reconnected, the client resynchronizes credit consumption with the cloud ledger.