Skip to content

Enforce read-only PostgreSQL permissions for kubeproxyuser_ro - #40534

Merged
damccorm merged 2 commits into
apache:masterfrom
damccorm:metrics-enforce-psql-readonly
Oct 13, 2026
Merged

damccorm merged 2 commits into
apache:masterfrom
damccorm:metrics-enforce-psql-readonly

Conversation

@damccorm

Copy link
Copy Markdown
Contributor

Enforces strict read-only permissions for the kubeproxyuser_ro PostgreSQL role used by the Beam Metrics Grafana datasource:

  • Revokes CREATE on schema public from PUBLIC and kubeproxyuser_ro, and grants only USAGE on schema public.
  • Revokes all write/DDL table privileges (INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER) on tables in schema public from PUBLIC and kubeproxyuser_ro, granting only SELECT to kubeproxyuser_ro.
  • Sets default_transaction_read_only = on on kubeproxyuser_ro in postgres/init.sql and during metrics database initialization.

@github-actions github-actions Bot added the infra label Oct 12, 2026
@damccorm
damccorm force-pushed the metrics-enforce-psql-readonly branch from ee048b0 to a4aff92 Compare October 12, 2026 18:36
@damccorm
damccorm force-pushed the metrics-enforce-psql-readonly branch from a4aff92 to 7d0e573 Compare October 12, 2026 18:46
@damccorm
damccorm marked this pull request as ready for review October 12, 2026 19:14
@damccorm

Copy link
Copy Markdown
Contributor Author

R: @Amar3tto

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @jrmccluskey added as fallback since no labels match configuration

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@github-actions

Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

Comment thread .test-infra/metrics/sync/github/sync.py Outdated
@damccorm
damccorm requested a review from Amar3tto October 13, 2026 14:47
@damccorm
damccorm merged commit d0d1ac8 into apache:master Oct 13, 2026
7 checks passed
@damccorm
damccorm deleted the metrics-enforce-psql-readonly branch October 13, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants