-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Authenticate Using Username and Password in Ansible 10 + core 2.17 #316
Comments
Error example:
|
I was able to get username and password auth to work by reverting back to the latest and greatest of ansible 9 and ansible-core 2.16. See below for versioning: pip freezeansible==9.6.1 ansible --versionansible [core 2.16.7] |
Hi @andrewlass , Thank you for raising this issue. I have been able to reproduce it and noticed that it has also been reproduced in our other Fortinet Ansible collection. I have notified the development team for further investigation. In the meantime, please consider using an older version of Ansible Core as a temporary solution. Thanks, |
@andrewlass I'm facing the same issue even though I'm running an old version of Ansible. |
@fanttazio we're running 7.2.8 everywhere. Did you downgrade both Ansible and ansible-core? Maybe post a pip freeze so we can compare environments. |
@andrewlass hmm, I don't know what I'm missing. My Ansible and Python versions are ancient:
and I get this err for : but if I use access token, it just works fine. |
Ah, this particular error you're getting is unrelated to the topic of this issue. Perhaps you can open a new issue and post a scrubbed version of your inventory and playbook? |
Hi @andrewlass We just released Ansible FOS 2.3.7. This issue should be fixed, so you could upgrade to it and give it a try at your convenience.
Thanks, |
Woohoo! Thanks @MaxxLiu22 , I appreciate the follow up. We can all use some good news now and again. I'll get this tested and report back. |
Hello,
It seems that in the newest releases of Ansible (10.x) and ansible-core (2.17.x), token authentication is being enforced. We are using username and password for our authentication. Is this enforcement behavior expected? Still working on figuring out which specific version of ansible-core introduced this. It appears to be 2.17.0 based on this Google groups page -- https://groups.google.com/g/ansible-project/c/y7esQZvQUCc?pli=1
See attached file for auth example since formatting is gross inline. Notice that I'm storing the username into built-in "ansible_user" and password into built-in "ansible_password".
auth-example.yaml.txt
See below for versioning output:
Pip freeze
ansible==10.0.1
ansible-core==2.17.0
argcomplete==3.3.0
cffi==1.16.0
cryptography==42.0.8
Jinja2==3.1.4
MarkupSafe==2.1.5
packaging==24.0
pycparser==2.22
PyYAML==6.0.1
resolvelib==1.0.1
ansible --version
ansible [core 2.17.0]
config file = None
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/.local/lib/python3.10/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /root/.local/bin/ansible
python version = 3.10.13 (main, Jun 7 2024, 17:37:25) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/root/.pyenv/versions/3.10.13/bin/python3)
jinja version = 3.1.4
libyaml = True
The text was updated successfully, but these errors were encountered: