Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Empty vault password causes scan to fail with certain versions of ansible #444

Closed
kdelee opened this issue Nov 3, 2017 · 2 comments
Closed
Assignees
Milestone

Comments

@kdelee
Copy link

kdelee commented Nov 3, 2017

Specify type:

  • Bug

Bug severity (if applicable):

-medium


Description:

When installing the latest build on rhel 7, the version of ansible that gets installed cannot deal with empty vault password.


Bug Report

Version of rho:

[root@localhost ~]# rho --version
version: 0.0.29
	ansible: 2.4.0.0
	python: 2.7.5 (default, May  3 2017, 07:55:04) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
[root@localhost ~]# rpm -qa | grep rho
rho-0.0.29-1.el7.noarch

Expected behavior:

I should be able to use an empty vault password OR rho should not allow me to create auths/profiles with an empty vault password

Actual behavior:

Rho allows me to create auths/profiles with an empty vault password, but the scan fails because the version of ansible installed by yum does not support this.

Steps to reproduce:

Do the following on a RHEL 7 machine. Use a blank vault password.

[root@localhost~]# yum install -y https://kojipkgs.fedoraproject.org//packages/rho/0.0.29/1.el7/noarch/rho-0.0.29-1.el7.noarch.rpm
[root@localhost~]# rho auth add --name test --username root --sshkeyfile ~/.ssh/id_rsa
[root@localhost ~]# rho profile add --name test --hosts localhost --auth test
[root@localhost ~]# rho scan --profile test --reportfile out.csv

You should get the following output from the scan and contents of the ping log:

Please enter your rho vault password: 
Connection discovery will be perform with the following auth credentials: test
Note: Any ssh-agent connection setup for a target host will be used as a fallback if it exists.

Attempting connection discovery with auth "test".

All auths are invalid for this profile
  
[root@localhost ~]# cat ~/.local/share/rho/ping_log 

 [WARNING]: Error in vault password prompt (default): Invalid vault password
was provided

ERROR! Invalid vault password was provided

Environment information:

Provide detailed information on the scanning and target systems (if applicable); see example below.

Type Operating System OS Version Python Version Virtualization
Scanning System RHEL 7.4 2.7.5 ESXi
Target System same as scanning system
@kdelee
Copy link
Author

kdelee commented Nov 3, 2017

This issue also comes up on Fedora 26 latest rpm build

@kdelee
Copy link
Author

kdelee commented Nov 3, 2017

Does not happen with the fedora 25 latest rpm build, which pulled in ansible 2.3.1.0:

[root@fedora25vm ~]# rho --version
version: 0.0.29
	ansible: 2.3.1.0
	python: 2.7.13 (default, May 10 2017, 20:04:28) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]

@chambridge chambridge added this to Backlog in RHO 2.0 Nov 8, 2017
@chambridge chambridge self-assigned this Nov 8, 2017
@chambridge chambridge added this to the Sprint 10 milestone Nov 8, 2017
@chambridge chambridge moved this from Backlog to In Progress in RHO 2.0 Nov 8, 2017
@chambridge chambridge moved this from In Progress to Done in RHO 2.0 Nov 9, 2017
@chambridge chambridge removed this from Done in RHO 2.0 Nov 13, 2017
chambridge added a commit that referenced this issue Nov 29, 2017
* master:
  Add jboss.eap.init-files to JBOSS_FACTS. Closes #478. (#479)
  Add default dictionaries to handle lost host. Handle ansible rc if csv was successfully created. Closes #475. (#476)
  Fix addition of certs for wrong when condition. Closes #472. (#474)
  Present more status during discovery for larger environments. Closes #442. (#467)
  revert default logging change. Closes #460. (#461)
  Check for empty vault password. Closes #444. (#457)
  Highlight potential issues in the console output. Closes #443. (#458)
  Default verbosity to 1 for improved log data. Closes #441. (#456)
  Turn off colors in the ansible log. Closes #448. (#455)
  Fix task that can hang if systemctl paginates
  Update playbook to use free strategy. Closes #445. (#453)
  Merge 0.30 version into master branch (#451)

# Conflicts:
#	rho/ansible_utils.py
#	rho/facts.py
#	rho/inventory_scan.py
#	rho/postprocessing.py
#	rho/scancommand.py
#	roles/jboss_eap/tasks/main.yml
#	roles/write/tasks/main.yml
#	test/test_postprocessing.py
chambridge added a commit that referenced this issue Nov 29, 2017
* Merge branch 'master' into dev

* master:
  Add jboss.eap.init-files to JBOSS_FACTS. Closes #478. (#479)
  Add default dictionaries to handle lost host. Handle ansible rc if csv was successfully created. Closes #475. (#476)
  Fix addition of certs for wrong when condition. Closes #472. (#474)
  Present more status during discovery for larger environments. Closes #442. (#467)
  revert default logging change. Closes #460. (#461)
  Check for empty vault password. Closes #444. (#457)
  Highlight potential issues in the console output. Closes #443. (#458)
  Default verbosity to 1 for improved log data. Closes #441. (#456)
  Turn off colors in the ansible log. Closes #448. (#455)
  Fix task that can hang if systemctl paginates
  Update playbook to use free strategy. Closes #445. (#453)
  Merge 0.30 version into master branch (#451)

# Conflicts:
#	rho/ansible_utils.py
#	rho/facts.py
#	rho/inventory_scan.py
#	rho/postprocessing.py
#	rho/scancommand.py
#	roles/jboss_eap/tasks/main.yml
#	roles/write/tasks/main.yml
#	test/test_postprocessing.py
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants