[Prometheus backend] add oauth2 to support Google Managed Prometheus GMP
Open
- Dominant language
- Python
- Stars
- 564
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
Currently the Prometheus backend supports only [basic authentication](https://github.com/google/slo-generator/blob/master/docs/providers/prometheus.md)
GMP Google Managed Prometheus API [uses OAuth2 authentication](https://cloud.google.com/stackdriver/docs/managed-prometheus/query#api-prometheus)
Proposed implementation:
- If the Prometheus API is served from Cloud Monitoring meaning url is like `https://monitoring.googleapis.com/v1/projects/PROJECT_ID/location/global/prometheus`
- Then Authenticated with a oauth2 token from the service account used to run slo-generator
Contributor guide
Assessment
This issue has not been assessed yet.