Bug 1328177 - SELinux is preventing horizon from accessing a shared secret
Summary: SELinux is preventing horizon from accessing a shared secret
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-selinux
Version: 9.0 (Mitaka)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: async
: 8.0 (Liberty)
Assignee: Ryan Hallisey
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-18 15:25 UTC by Ryan Hallisey
Modified: 2016-11-14 19:44 UTC (History)
5 users (show)

Fixed In Version: openstack-selinux-0.7.3-2.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-14 19:44:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2708 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 8 Bug Fix and Enhancement Advisory 2016-11-15 00:43:33 UTC

Description Ryan Hallisey 2016-04-18 15:25:52 UTC
The openstack dashboard's secret key is not accessible.

1) install rhel7.2
 
2) install openstack-selinux
 
3) install httpd mod_wsgi mod_ssl openstack-dashboard memcached python-memcached
 
4) modify secret_key variable on /etc/openstack-dashboard/local_settings with this:
 
...
from horizon.utils import secret_key
SECRET_KEY = secret_key.generate_or_read_from_file('/var/lib/openstack-dashboard/secret_key')
...
 
5) systemctl start httpd.service
 
After starting httpd, under /var/lib/openstack-dashboard apache successfully created two files owned by root:
 
[root@mi-lab-horizon01 ~]# ll /var/lib/openstack-dashboard/
totale 4
-rw-------. 1 root root 64 15 apr 11.07 secret_key
-rw-r--r--. 1 root root  0 15 apr 11.07 _var_lib_openstack-dashboard_secret_key.lock
[root@mi-lab-horizon01 ~]#
 
but apache user can't read those files and also SELinux prevent append  on file under var/lib to httpd process.

Comment 4 Lon Hohberger 2016-11-07 20:38:37 UTC
* Mon Apr 18 2016 Ryan Hallisey <rhallise> 0.7.3-2
- Horizon needs the ability to access its shared secret
- Resolves: rhbz#1328177

Adds to postinstall:

fcontext -N -a -t httpd_var_lib_t /var/lib/openstack-dashboard

Which results in:

[root@rhel7 ~]# ls -ldZ /var/lib/openstack-dashboard
drwxr-x---. apache apache system_u:object_r:httpd_var_lib_t:s0 /var/lib/openstack-dashboard

Comment 6 errata-xmlrpc 2016-11-14 19:44:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2708.html


Note You need to log in before you can comment on or make changes to this bug.