Bug 2026358
| Summary: | ovirt_engine_history_grafana user is not granted permissions to query new tables | ||
|---|---|---|---|
| Product: | [oVirt] ovirt-engine-dwh | Reporter: | Aviv Litman <alitman> |
| Component: | Setup | Assignee: | Eli Mesika <emesika> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavel Novotny <pnovotny> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.4.5 | CC: | bugs, didi, michal.skrivanek, mperina, sradco |
| Target Milestone: | ovirt-4.5.0 | Flags: | mperina:
ovirt-4.5+
sbonazzo: devel_ack+ gdeolive: testing_ack+ |
| Target Release: | 4.5.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ovirt-engine-dwh-4.5.0 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-23 06:21:25 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2026362 | ||
|
Description
Aviv Litman
2021-11-24 13:00:20 UTC
engine repo: packaging/setup/ovirt_engine_setup/engine_common/postgres.py executes with the postgres user the following statement : (*) ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO ovirt_engine_history_grafana; When you are setting ALTER DEFAULT PRIVILEGES for a user it is in the context of a certain role and ONLY if this role creates new objects then the granted user will get the privileges However the (*) statement above is executed by user postgres and therefor translated and stored as ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA public GRANT SELECT ON TABLES TO ovirt_engine_history_grafana; On the upgrade to 4.5 , the user that executes the upgrade is ovirt_engine_history and this role have no instructions to grant ovirt_engine_history_grafana on new objects. That means that we have to add the following statement before 4.5 new objects are created ALTER DEFAULT PRIVILEGES FOR ROLE ovirt_engine_history IN SCHEMA public GRANT SELECT ON TABLES TO ovirt_engine_history_grafana; Verified in ovirt-engine-4.5.0.6-0.7.el8ev.noarch ovirt-engine-dwh-4.5.2-1.el8ev.noarch After upgrading from 4.4 to 4.5, Grafana is showing proper data using the v4_5_ views, no permission problems detected. |