Bug 771922

Summary: settings.yml readable by anybody
Product: [Retired] CloudForms Cloud Engine Reporter: Jan Provaznik <jprovazn>
Component: aeolus-configureAssignee: Mo Morsi <mmorsi>
Status: CLOSED ERRATA QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: akarol, deltacloud-maint, jguiditt, morazi, slinaber, ssachdev
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-15 20:45:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Provaznik 2012-01-05 11:57:38 UTC
Description of problem:
config/settings.yml is readable by all - this file contains also oauth secret tokens for communication with warehouse and imagefactory -> it should be readdable only by owner/group.

-rw-r--r--. 1 root root 674 Jan  4 17:01 /usr/share/aeolus-conductor/config/settings.yml

Comment 1 wes hayutin 2012-01-10 17:11:30 UTC
adding to ce-sprint-next

Comment 2 wes hayutin 2012-01-10 17:14:51 UTC
adding to ce-sprint-next

Comment 3 wes hayutin 2012-01-12 16:36:32 UTC
adding to ce-sprint

Comment 4 wes hayutin 2012-01-12 16:42:33 UTC
removing ce-sprint-next tracker

Comment 5 wes hayutin 2012-01-12 16:44:27 UTC
taking off ce-sprint-next..

Comment 6 Scott Seago 2012-01-17 22:48:50 UTC
This seems to have been fixed already. If you have an old rpm install, you won't see the fix, though, since the prior config file won't be overwritten. If you remove that file and install a new RPM, you should get proper permissions:


-rw-r----- 1 root aeolus 631 Jan 17 17:34 /usr/share/aeolus-conductor/config/settings.yml

Comment 7 Aziza Karol 2012-01-19 06:10:10 UTC
This issue is reproducible.The permissions are not proper.

#ls  -lhtr /usr/share/aeolus-conductor/config/settings.yml
-rw-r--r--. 1 root root 674 Jan 18 23:06 /usr/share/aeolus-conductor/config/settings.yml


# rpm -qa | grep aeolus
aeolus-conductor-0.8.0-8.el6.noarch
rubygem-aeolus-cli-0.3.0-4.el6.noarch
aeolus-configure-2.5.0-5.el6.noarch
aeolus-conductor-daemons-0.8.0-8.el6.noarch
rubygem-aeolus-image-0.3.0-3.el6.noarch
aeolus-all-0.8.0-8.el6.noarch
aeolus-conductor-doc-0.8.0-8.el6.noarch

Comment 8 Scott Seago 2012-01-25 15:45:44 UTC
OK, now I see the problem. aeolus-configure overwrites this file, and it's probably getting the permissions wrong:

in recipes/aeolus/manifests/conductor.pp:
     file{"/usr/share/aeolus-conductor/config/settings.yml":
       content => template("aeolus/conductor-settings.yml"),
       require => Package['aeolus-conductor']}

so the puppet manifest here needs to set the file perms to 640 and ownership to root:aeolus

Comment 9 Jason Guiditta 2012-01-27 16:09:44 UTC
OK, I have acked and pushed Mo's patch for this.  Note that we decided it didnt make sense to change _existing_ file permissions, so if the admin (or previous configure) changed this to the wrong thing, it will stay that way.  To properly test, either use a fresh install, or delete the file in question and reinstall/rerun configure.

commit 3e5dc4b7998556a8a3fbbba84e5ae7f63d12ba80
Author: Mo Morsi <mmorsi>
Date:   Wed Jan 25 16:39:43 2012 -0500

    BZ# 771922: set owner, group, mode on conductor settings file

Comment 10 Steve Linabery 2012-01-31 22:21:51 UTC
3e5dc4b in aeolus-configure-2.5.0-11

Comment 11 Aziza Karol 2012-02-01 04:57:34 UTC
Permissions set correctly.

# ls  -lhtr /usr/share/aeolus-conductor/config/settings.yml
-rw-r-----. 1 root aeolus 674 Jan 31 23:25 /usr/share/aeolus-conductor/config/settings.yml


conductor.pp:

file{"/usr/share/aeolus-conductor/config/settings.yml":
      content => template("aeolus/conductor-settings.yml"),
      require => Package['aeolus-conductor'],
      mode    => 640, owner => 'root', group => 'aeolus'}


verified on:
rpm -qa | grep aeolus
aeolus-conductor-0.8.0-17.el6.noarch
rubygem-aeolus-cli-0.3.0-7.el6.noarch
aeolus-configure-2.5.0-11.el6.noarch
aeolus-conductor-daemons-0.8.0-17.el6.noarch
aeolus-all-0.8.0-17.el6.noarch
aeolus-conductor-doc-0.8.0-17.el6.noarch
rubygem-aeolus-image-0.3.0-7.el6.noarch

Comment 12 errata-xmlrpc 2012-05-15 20:45:29 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.

http://rhn.redhat.com/errata/RHEA-2012-0586.html