# 2FA/MFA support of AWX/Ansible

**URL:** <https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [November 5, 2020, 10:53pm UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161 "2020-11-05T22:53:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Raj\_Gupta](https://forum.ansible.com/u/Raj_Gupta)\
**Post date:** [November 5, 2020, 10:53pm UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/1 "2020-11-05T22:53:20Z")

</div>

Hi,

Does AWX/Ansible supports 2FA/MFA, or is there any alternate solution?

Thanks,  
Raj

---

<div class="post-metadata">

**Author:** ![klaasdemter](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@klaasdemter](https://forum.ansible.com/u/klaasdemter)\
**Post date:** [November 6, 2020, 7:03am UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/2 "2020-11-06T07:03:45Z")

</div>

On the ansible side or on the webui side of things?

I can only answer for WebUI: You can use a 3rd party authorization like Azure AD/SAML/…, depending on what you chose it can support MFA.

Greetings

Klaas

---

<div class="post-metadata">

**Author:** ![Raj\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Raj\_Gupta](https://forum.ansible.com/u/Raj_Gupta)\
**Post date:** [November 6, 2020, 7:59pm UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/3 "2020-11-06T19:59:48Z")

</div>

Hi Klaas,  
Thanks for your reply.

I am looking for both sides.  
Thanks for pointing out the WEBUI side. As you mentioned options for WebUI, it looks similar to SSO based auth.  
Does it include OTP based authentication as well?

Thanks,  
Raj Gupta

---

<div class="post-metadata">

**Author:** ![Raj\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Raj\_Gupta](https://forum.ansible.com/u/Raj_Gupta)\
**Post date:** [November 11, 2020, 2:06am UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/4 "2020-11-11T02:06:00Z")

</div>

Hi,

Can anyone please help me on this.  
I have to apply (Password + OTP) auth to AWX.

1. How AWX can prompt for OTP when executing job.
2. How to Make AWX UI (password + OTP) based accessible.

Thanks,  
Raj

---

<div class="post-metadata">

**Author:** ![John\_Foley](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@John\_Foley](https://forum.ansible.com/u/John_Foley)\
**Post date:** [November 11, 2020, 2:29am UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/5 "2020-11-11T02:29:10Z")

</div>

1. Prompting for OTP aint gonna happen when hitting execute. You are already MFAing to login, why do it again?
2. Use an SSO option like SAML to add OTP. Your IDP will need to support OTP. This was mentioned already I think.

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [November 11, 2020, 12:15pm UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/6 "2020-11-11T12:15:04Z")

</div>

Hi Raj

As John says use something like SAML with OTP capabilities for 2.

for 1. you might be able to do something with the likes of [https://learn.hashicorp.com/tutorials/vault/ssh-otp](https://learn.hashicorp.com/tutorials/vault/ssh-otp) but you’ll have to hand craft this and I don’t even know if it would work. Would also mean setting something up on every target node and will only work for Linux based systems (so a lot of networking devices etc are out of scope and Windows). Not sure it’ll work with API calls to AWX either unless you manage to workflow 1. and that won’t work with 2. anyway.

AWX doesn’t provide any of this out of the box so you’ll have to devise the solutions.

---

<div class="post-metadata">

**Author:** ![Raj\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Raj\_Gupta](https://forum.ansible.com/u/Raj_Gupta)\
**Post date:** [November 11, 2020, 9:00pm UTC](https://forum.ansible.com/t/2fa-mfa-support-of-awx-ansible/34161/7 "2020-11-11T21:00:08Z")

</div>

Thanks John and Phil for the suggestions. I’ll try it.

Regards,  
Raj
