grafana / grafana/alerting

OAuth2: add JWT Profile fields from prometheus/common v0.67.3+

Open
#575 0 comments 0 reactions 1 assignee Claimed by @yuri-tceretian View on GitHub
Dominant language
Go
Stars
89
Forks
74
Avg merge
2d 7h
Merged PRs (30d)
8

Description

\`commoncfg.OAuth2\` gained JWT Profile support (RFC 7523) in prometheus/common v0.67.3. Both the v0mimir and v1 OAuth2 structs are missing these fields.

**New fields in \`commoncfg.OAuth2\`:**
- \`client_certificate_key_id\` (string)
- \`client_certificate_key\` (**Secret**)
- \`grant_type\` (string)
- \`signature_algorithm\` (string)
- \`iss\` (string)
- \`audience\` (string)
- \`claims\` (map)

**v0mimir** (`http/v0mimir/`):
1. Add fields to `OAuth2` struct in `http_client.go`
2. Update `toCommonOAuth2` / `fromCommonOAuth2` in `compat.go`
3. Update `V0HttpConfigOption` schema — mark `client_certificate_key` as `Secure: true`

**v1** (`http/`):
1. Add fields to `OAuth2Config` in `oauth2.go`
2. Update `NewOAuth2TokenSource` to pass JWT Profile fields to the token source
3. Update schema — mark `client_certificate_key` as `Secure: true`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.