Component ยท Shared or other
monitoring-token-provider
What it is
monitoring-token-provider is a small in-cluster service that hands out an access token for a dedicated monitoring and test organization. Synthetic monitors and the integration suites call it for a token. It exists so that unattended runs do not each have to do a browser sign-in.
Like a hotel concierge who keeps one guest's key card topped up, so a tour guide can borrow a working card at any hour.
Why it exists
A test run can last longer than one token. The service keeps the refresh chain alive, so a 90-minute run does not fail with 401 halfway through, and no refresh token ever leaves it.
How it works
- At pod start an init container runs a browser sign-in (GitHub and a one-time code) and writes the tokens to a shared volume.
- The server reads that file once, then refreshes the token 10 minutes before it expires, so the token it holds stays valid.
- A caller sends GET /token with the header X-Auth-Token. The reply body is the token as plain text, with at least 30 seconds of life left. Otherwise the service answers 503.
- It is reached only inside the cluster, through the internal gateway. Different sources (agent-platform, integration-platform and others) are separate sign-ins, and an unnamed request gets the first, agent-platform.
Identity and access
Callers prove themselves with a shared secret in X-Auth-Token. The service refuses to start without one, because a cluster address alone would give any pod a live user token. Test pods also need the label openchoreo.dev/system-component so the network policy lets them in.
Key facts
- Port
- 8090
- Endpoint
- GET /token with X-Auth-Token
- Token life left on reply
- At least 30 seconds
- Refresh
- 10 minutes before the token expires
- Scope
- One monitoring org only
- Callers
- Synthetic monitors and the Agent Manager integration suites
- Namespace
- cloud-cp project monitoring
Used by (1)
- provides sign-in to amp-e2e-tests (SaaS e2e and security suites) obtains fresh user tokens for a monitoring orgHTTP in-cluster