Skip to content

fix(openmeter): encrypt the Stripe app's secrets at rest - #264

Draft
aktech wants to merge 2 commits into
mainfrom
fix/openmeter-encrypt-secrets
Draft

aktech wants to merge 2 commits into
mainfrom
fix/openmeter-encrypt-secrets

Conversation

@aktech

@aktech aktech commented Nov 20, 2026

Copy link
Copy Markdown
Member

Stock OpenMeter stores the Stripe app's API key and webhook secret in Postgres in plaintext. The chart now runs an OpenMeter build from https://github.com/nebari-dev/openmeter/tree/encrypted-secrets that encrypts them (AES-256-GCM) with a key from a Kubernetes Secret.

  • The key Secret is created once by the existing ensure-secret Job (random 32 bytes), or supplied via openmeter.secretEncryption.existingSecret. Only the API and the price-sync job get it.
  • Back the key up with the database: without it the Stripe app has to be set up again.
  • A Stripe app installed before this keeps working, but its secrets stay plaintext until the app is installed again.

Fixes #263

Stock OpenMeter stores the Stripe app's API key and webhook secret in
Postgres in plaintext. The chart now runs an OpenMeter build that encrypts
them (AES-256-GCM) with a key kept in a Kubernetes Secret: one a Job
creates once with a random value, or openmeter.secretEncryption.existingSecret.
The API and the price-sync job get the key; the sink worker doesn't need it.

Fixes #263
@github-actions

Copy link
Copy Markdown

📄 Docs preview for fix/openmeter-encrypt-secrets:
https://fix-openmeter-encrypt-secret.llm-serving-pack.pages.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenMeter stores the Stripe API key in Postgres in plaintext

1 participant