web: Support jwt/bearer token auth

Open
#573 2 comments 7 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
28/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go

Research direction

The issue targets the common web package used by exporters, with node_exporter as an example. Start by locating that package and reviewing its existing basic-auth path alongside Prometheus bearer-token usage. Done means the common package supports validating short-lived JWT/OIDC tokens through a JWKS in addition to basic authentication.

Written by the indexing model from the issue text.

Description

Adding jwt token auth in addition to basic auth would be a great benefit for in-cluster service authentication.

The kubernetes service account tokens are OIDC compliant and short-living which increases the security compared to static auth basic credentials. the common library could use a JWKS (JSON Web Key Set) to validate the signature of tokens.

Since the common web package is used in a lot of exporters, node_exporter could be secured by jwt auth. Prometheus already support bearer token auth at scrape jobs.

Dominant language
Go
Stars
297
Forks
380
Avg merge
3d 18h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from prometheus/common

All issues in prometheus/common

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.