#9333 Add read permissions for tables in datanommer database to datanommer_ro user
Closed: Fixed 3 years ago by pingou. Opened 3 years ago by asaleh.

Describe what you would like us to do:


As a follow up to https://pagure.io/fedora-infrastructure/issue/9245 I would like to add permissions to access the tables on in the datanommer database.

It looks the user can connect to the database, but can neither see the 'messages' table, not run \dt command to list tables available.

I learned this today when I wanted to use the access to create updated version of the data stored on https://asaleh.fedorapeople.org/test_query_db.dump.xz, that form basis for the dashboards on https://grafana-gating-dashboards.apps.ocp.ci.centos.org/


Metadata Update from @pingou:
- Issue assigned to pingou
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: low-gain, low-trouble, ops

3 years ago

Nope, still the same

datanommer=> \dt
Did not find any relations.
datanommer=> select * from messages limit 1;
ERROR:  relation "messages" does not exist
LINE 1: select * from messages limit 1;

Metadata Update from @asaleh:
- Issue untagged with: low-gain, low-trouble, ops
- Issue priority set to: Needs Review (was: Waiting on Assignee)

3 years ago

I am logging in with

psql -h db-datanommer01.iad2.fedoraproject.org -U datanommer_ro datanommer

Alright, the three magic commands (once connected to the right database):

grant usage on all sequences in schema public to datanommer_ro;
grant select on all tables in schema public to datanommer_ro;
grant usage on schema public to datanommer_ro;

I was apparently missing the last one... :)

Metadata Update from @pingou:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: low-gain, low-trouble, ops

3 years ago

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata
Boards 1
ops Status: Done