ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.07k stars 3.42k forks source link

Fresh install of AWX 8.0.0 - cannot authenticate with password defined in inventory #5094

Open jamesfreeman959 opened 5 years ago

jamesfreeman959 commented 5 years ago
ISSUE TYPE
SUMMARY

Unable to authenticate with a fresh install of AWX 8.0.0 using password defined in inventory file - special characters in filename.

ENVIRONMENT
STEPS TO REPRODUCE
  1. Build a fresh install of Ubuntu 18.04.3 Server.
  2. Install Docker CE, Ansible 2.8.6, python-docker, docker-compose (binary + Python module from pip).
  3. Clone awx and awx-logos repos side by side.
  4. Complete awx/installer/inventory - set admin password to something with special characters. I can't share our actual password, but it began with a "\" and ended with a ";" - there were other non-alphanumeric in there too. The same password was used on AWX 6.1.0 successfully.
  5. Build containers from scratch to enable SSL cert additions.
  6. It is impossible to log into the newly created instance with the admin user and password specified in the installation inventory.
EXPECTED RESULTS

AWX installs and it is possible to log in using the admin user and associated password from the installation inventory.

ACTUAL RESULTS

AWX returns an authentication failure. No errors report in any of the container logs.

ADDITIONAL INFORMATION

Could do with a documented method to reset the admin password in this instance. All the documentation I can find on the Internet requires tools like awx-manage, or uses tower-cli (which implicitly assumes that authentication is already set up and working). tower-cli tested and cannot authenticate either.

tdavison784 commented 4 years ago

Had the same issue here with V9.0.1.0 of AWX. I reset the password to not contain special chars and was able to login with the default admin account after that.

mwhite-ibm commented 4 years ago

This issue is also present in the Tower installer for Tower 3.6.3 (OpenShift).

The culprit appears to be this line (for initial install) and this line (for updates beyond initial install). In our case, a $ in the password caused the shell to think that a variable was present, and logging in with the evaluated string allowed me to successfully authenticate.

Overall, you can use special characters, just not ones that will be interpreted.

My understanding is it's the shell invoked by the shell Ansible module shell (/bin/sh according to this) as opposed to bash.