Skip to content

remote/azuread: use Secret type for OAuth client_secret#18586

Merged
roidelapluie merged 1 commit into
prometheus:mainfrom
roidelapluie:roidelapluie/azadsecret
Apr 27, 2026
Merged

remote/azuread: use Secret type for OAuth client_secret#18586
roidelapluie merged 1 commit into
prometheus:mainfrom
roidelapluie:roidelapluie/azadsecret

Conversation

@roidelapluie

Copy link
Copy Markdown
Member

The ClientSecret field in OAuthConfig was typed as plain string, causing it to be exposed in plaintext via the /-/config HTTP endpoint. Change it to config_util.Secret so Prometheus redacts it as <secret>.

Fixes GHSA-wg65-39gg-5wfj.

Which issue(s) does the PR fix:

Release notes for end users (ALL commits must be considered).

Reviewers should verify clarity and quality.

[SECURITY] AzureAD remote write: Fix OAuth client_secret being exposed in plaintext via /-/config endpoint.

The ClientSecret field in OAuthConfig was typed as plain string,
causing it to be exposed in plaintext via the /-/config HTTP endpoint.
Change it to config_util.Secret so Prometheus redacts it as <secret>.

Signed-off-by: Julien Pivotto <[email protected]>

@krajorama krajorama left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, trivial fix

@roidelapluie
roidelapluie merged commit 0a1c562 into prometheus:main Apr 27, 2026
35 checks passed
vporoshok added a commit to deckhouse/prompp that referenced this pull request May 16, 2026
…26-42151) (#337)

Backport of upstream prometheus/prometheus#18586 (GHSA-wg65-39gg-5wfj).
ClientSecret in OAuthConfig was typed as a plain string, so the value
leaked verbatim through the /-/config HTTP endpoint. Switch the field
to config.Secret so prometheus/common's MarshalYAML/MarshalJSON
implementations redact it to <secret> on serialization; the value is
explicitly converted back to string only at the azidentity boundary.

Signed-off-by: Bastrykov Evgeniy <[email protected]>
Co-authored-by: Cursor <[email protected]>
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.

2 participants