Bug 1447086
| Summary: | [Ansible Embedded] - Privilege escalation for playbook does not work | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Satoe Imaishi <simaishi> | ||||||||
| Component: | Automate | Assignee: | Harpreet Kataria <hkataria> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Dmitry Misharov <dmisharo> | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | 5.8.0 | CC: | akarol, bilwei, cpelland, jfrey, jhardy, mkanoor, obarenbo, saali, simaishi, tfitzger | ||||||||
| Target Milestone: | GA | ||||||||||
| Target Release: | 5.8.0 | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | ansible_embed | ||||||||||
| Fixed In Version: | 5.8.0.13 | Doc Type: | If docs needed, set a value | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | 1445377 | Environment: | |||||||||
| Last Closed: | 2017-05-31 15:07:09 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | Ansible | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | 1445377 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Comment 2
CFME Bot
2017-05-01 17:03:15 UTC
New commit detected on ManageIQ/manageiq/fine: https://github.com/ManageIQ/manageiq/commit/d5db6cd5b2c907327db5343d9c7a3d96e7771a8e commit d5db6cd5b2c907327db5343d9c7a3d96e7771a8e Author: Greg McCullough <gmccullo> AuthorDate: Fri Apr 28 10:52:58 2017 -0400 Commit: Satoe Imaishi <simaishi> CommitDate: Mon May 1 13:00:38 2017 -0400 Merge pull request #14929 from bzwei/escalate_privilage Escalate privilege (cherry picked from commit 291254e928dd64a3e52caa9a07cb788ab62663c7) https://bugzilla.redhat.com/show_bug.cgi?id=1447086 app/models/service_template_ansible_playbook.rb | 5 +++-- spec/models/service_template_ansible_playbook_spec.rb | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) Verified in 5.8.0.13-rc2.20170502165848_0f98658. Privilege escalation works as expected. Created attachment 1276707 [details]
awx
Created attachment 1276708 [details]
error
I'm still getting the error in fact the machine credential has no effect, and all the job seem to be running as awx user. 5.8.0.13-rc2-20170502165848_0f98658 Saif, I guess the first screenshot was the case without privilege escalation, and the second screenshot was with the flag on. This BZ is to enhance our integration with Ansible that at job execution we instruct it to use su command run the job. The screenshot illustrated it is working as designed. The system received the flag and attempted to run su command. The actual execution failure may be caused by the setup. Please make sure the credential you choose for the playbook meets the requirement, for example you have chosen the correct su/sudo, and user/password. Bill, The user has sudo access without password. I notice the playbook fail only when the host is set to localhost. If i use the IP it work fine using the same user. Created attachment 1276911 [details]
ip
Is the IP of the CFME appliance? Yes thats appliance IP. We did some the same test and understand what's going on. When a playbook executes in localhost Tower always logs in as awx and does not allow privilege escalation. This makes sense for security reason. When you use IP tower does not know it is actually localhost therefore it treats the host as a regular machine. In conclusion privilege escalation works only in non-localhost. Bill, Thats make sense. 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://access.redhat.com/errata/RHSA-2017:1367 |