Skip to content

OpenMeter stores the Stripe API key in Postgres in plaintext #263

Open

Description

@aktech

The bundled OpenMeter stores the Stripe app's API key and webhook secret in Postgres in plaintext, so anyone with database or backup access can read a live Stripe key.

OpenMeter's only secret adapter uses the secret value as its ID, with no encryption or secret store:

https://github.com/openmeterio/openmeter/blob/f32c3d66411c234e2160113e110d7c72b5012afe/openmeter/secret/adapter/secret.go#L9-L35

That ID is written to the app_stripe table (.Sensitive() only hides it from logs, it is not encrypted):

https://github.com/openmeterio/openmeter/blob/f32c3d66411c234e2160113e110d7c72b5012afe/openmeter/ent/schema/app_stripe.go#L32-L35

The chart pins that OpenMeter version:

image: ghcr.io/openmeterio/openmeter:v1.0.0-beta.234@sha256:43a2a0b804fb4a241000983f3703ac531114f46b670a20b582b5c892193585d4

Still the case on OpenMeter's latest release (v1.0.0-beta.237) and main.

Options: an encrypting or secret-store-backed adapter upstream in OpenMeter, or a patched OpenMeter image until then.

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

Metadata

Metadata

Assignees

Labels

Dec_8_ReleaseNeeded for the Dec 8 release

Type

No type

Fields

Priority

None yet

Start date

None yet

Target date

None yet

Size

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions