Insufficient permissions for policy files are not handled

Bug #1836390 reported by Vadym Markov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.policy
Fix Released
Medium
Herve Beraud

Bug Description

Issue affects Horizon. Tested on Queens Devstack, but seems to affect any release and deployment.

Steps to reproduce:
1. chmod 000 ~/horizon/openstack_dashboard/conf/cinder_policy.json
2. Set DEBUG = False in ~/horizon/openstack_dashboard/local/local_settings.py
3. Restart Apache service
4. Log in to Horizon

Expected behavior:
Left panel is present, probably except some dashboards related to volumes

Actual behavior:
Left panel is absent, screenshot attached

in this case, policy loading fails at https://github.com/openstack/horizon/blob/master/openstack_auth/policy.py#L67 It logs traceback as warning

Revision history for this message
Vadym Markov (vmarkov) wrote :
Changed in oslo.policy:
assignee: nobody → Vadym Markov (vmarkov)
status: New → In Progress
Changed in oslo.policy:
assignee: Vadym Markov (vmarkov) → Herve Beraud (herveberaud)
Ben Nemec (bnemec)
Changed in oslo.policy:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.policy (master)

Reviewed: https://review.opendev.org/c/openstack/oslo.policy/+/670571
Committed: https://opendev.org/openstack/oslo.policy/commit/9919f1317c037163d0f31232991cca261881b66b
Submitter: "Zuul (22348)"
Branch: master

commit 9919f1317c037163d0f31232991cca261881b66b
Author: BubaVV <email address hidden>
Date: Thu Jul 11 17:57:47 2019 +0300

    Correctly handle IO errors at policy file load

    For now, policy file unaccessible due to access permission leads to
    silent failure without any notifictaion. Side effects of it are also
    affected by policy caching and might be quite confusing, like periodic
    disappearing of Horizon panels. Proposed patch added handling of such
    errors.

    Closes-bug: #1836390
    Change-Id: I0d67b6e7c2dcaa63d6bb807f013e5e7334efc715

Changed in oslo.policy:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.policy 3.8.0

This issue was fixed in the openstack/oslo.policy 3.8.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.