Skip to content

Secrets

SAMSKARA Secrets is an encrypted, organization-scoped key-value store for credentials — API keys, database passwords, broker credentials, and anything else you don’t want sitting in plain text inside notebook code or a connection profile.

A secret belongs to an organization. By default it’s available to every notebook in that org, but you can instead restrict a secret to a specific set of projects when creating it — useful when a credential should only be reachable from the project that actually needs it.

Secrets are created and managed from Settings → Secrets. Creating, updating, deleting, or viewing a secret’s decrypted value all require organization-admin access. Any org member can see the list of secret names and descriptions, but not their values — reading a value is a separate, admin-only action.

Secret names are normalized to uppercase (spaces become underscores) — database_url becomes DATABASE_URL.

Secrets are injected into the runtime at session/execution start and exposed through sm.secrets:

api_key = sm.secrets["MY_API_KEY"]
db_password = sm.secrets.get("DB_PASSWORD", "default") # .get() avoids KeyError if optional

The same values are also available via os.environ. If you add or change a secret while a notebook session is already running, restart the session (or trigger a new scheduled run) to pick up the new value — secrets aren’t live-reloaded mid-session.

Referencing a secret from a connection or profile

Section titled “Referencing a secret from a connection or profile”

Database, storage, and AnyStream profile configuration accepts sm:SECRET_NAME in place of a literal value for any credential field — SAMSKARA resolves it to the real secret at connection time. This is the same pattern used in Connect a Database and AnyStream.

Creating, updating, deleting, and viewing a secret’s value are all recorded in the organization’s audit log, along with a full change history per secret (what changed, who changed it, and when) — visible to admins.

Reference a secret by name rather than embedding a credential directly in notebook code, connection config, or anything you might commit to Git or share in a dashboard.

  • Free-tier organizations are limited to 10 secrets; Professional and Enterprise have no fixed cap.
  • There’s no secret rotation or expiry built in today — updating a secret’s value is a manual action.