Smarter Secret
Overview
Smarter Secret is a standard credentials vault, seamlessly integrated with every other Smarter resource that relies on sensitive information for authentication and connectivity. Secrets can be shared across teams and referenced by dependent resources without ever exposing the underlying value, and, like any other Smarter resource, a Secret is defined and managed through a standard SAM manifest.
Smarter Secret: a Django ORM-based secure store
for sensitive information such as SQL connection strings and API keys. Secrets
are consumed by other Smarter resources to supply the authentication credentials
those resources need to reach remote services.
apiVersion: smarter.sh/v1
kind: Secret
metadata:
annotations: []
description: an example secret manifest for the Smarter API Secret
name: example_secret
tags:
- example
- secret
version: 1.0.0
spec:
config:
expiration_date: 2026-06-05
value: <** your unencrypted credential value **>
Unlike the platform’s other built-in resources, which every account may read, a Secret is read
only by its owner: a user reads, describes and clones their own Secrets, a staff user also those
of the rest of their account, and a superuser every Secret. No other account reads the platform
account’s Secrets, such as its LLM provider api keys. Resources whose endpoint Smarter fixes, such
as the web search and image search plugins, may still use a platform Secret without revealing
its value. See SecretQuerySet.
Platform administrators can also read and change a Secret’s value from the command line, inside
the Smarter application container. manage.py get_secret decrypts and prints the value of a
Secret that a user may read, and manage.py update_secret encrypts and saves a new value for a
Secret that the user owns, prompting for the value if --value is not given:
python manage.py get_secret --name openai_api_key --username admin
python manage.py update_secret --name openai_api_key --username admin
The platform account’s api keys, those of the built-in LLM providers, Google, the search plugins
and the managed vector databases, are never environment variables. They are the platform’s
bootstrap secrets: one file per Secret, named after it, such as openai_api_key. On
Kubernetes, the Helm chart’s bootstrapSecrets values become the Kubernetes Secret
smarter-bootstrap-secrets, which only the init job mounts; locally, they are the files in
the repository’s gitignored bootstrap-secrets/ folder, which only the smarter-api
container mounts. manage.py initialize_bootstrap_secrets, which manage.py
initialize_platform runs before the commands that use these Secrets, turns each file into the
Smarter admin’s Secret of that name. It creates a missing Secret, updates one whose value has changed, skips an empty file or a
placeholder, and logs only the Secrets’ names.