feat: add path-scoped Access app for Grafana alerts API - #20
Open
xnoto wants to merge 1 commit into
Open
Conversation
GitHub Actions posts synthetic Dependabot PR alerts to Grafana's embedded Alertmanager API. The path-scoped app requires the existing GitHub Actions service token (same token_id as the warp app); the rest of grafana.makeitwork.cloud is unaffected and stays behind Dex OIDC. Extends the .gitleaks.toml allowlist for service token IDs (public identifiers, not credentials) to the new file, matching cf-warp.tf.
OpenTofu Plan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cf-access-grafana.tfadds a path-scoped Cloudflare Access application (grafana.makeitwork.cloud/api/alertmanager/grafana) requiring the existing GitHub Actions service token (the sametoken_idreferenced by the warp app incf-warp.tf— no new token to manage).This is the machine-auth layer for the Dependabot PR alerting pipeline: GitHub Actions POSTs synthetic alerts to Grafana's embedded Alertmanager API; the rest of
grafana.makeitwork.cloudis unaffected and stays behind Dex OIDC only. Grafana still enforces its own auth (service account token) on the API — defense in depth.Also
.gitleaks.toml: extends the existingcf-warp.tfallowlist (service token IDs are public identifiers, not credentials) to the new file. Same regex, same justification.README.mdregenerated by terraform-docs (new resource row).Merge order
Third (independent of the others; any order works, but alerting POSTs 401/403 until this and the Grafana token are in place).
Validation
make test— all hooks pass (validate, tflint, checkov, fmt, docs, gitleaks).tofu plan/applylocally — live backend; credentialed plan runs in CI on this PR.