Skip to content
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

Add userpass and LDAP support for HashiCorp vault credential_plugin #14654

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

djyasin
Copy link
Member

@djyasin djyasin commented Nov 13, 2023

SUMMARY

Modify vault credential_plugin to authenticate to vault using LDAP

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
AWX VERSION
awx: 23.6.1
ADDITIONAL INFORMATION

@djyasin djyasin marked this pull request as draft November 14, 2023 16:13
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch from 1beb4cc to a3c8d6c Compare December 8, 2023 15:37
@github-actions github-actions bot added component:awx_collection issues related to the collection for controlling AWX component:docs labels Dec 8, 2023
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch 2 times, most recently from 91f643a to be577be Compare December 8, 2023 16:08
@github-actions github-actions bot removed component:docs component:awx_collection issues related to the collection for controlling AWX labels Dec 8, 2023
@djyasin
Copy link
Member Author

djyasin commented Jan 3, 2024

Testing steps:

Once your environment with HashiVault and an LDAP user has been configured, this can be tested via UI or CLI.

  • In the AWX UI, navigate to "credentials."
  • From there, click "Add"
  • Enter a name for your credential, then choose "HashiCorp Vault Secret Lookup"
  • For "Server URL" enter http://tools_vault_1:1234
  • Enter awx_ldap_admin for "Username" and admin123 for "Password"
  • For "Path to Auth" enter ldap
  • Click "Save"
  • Add another credential
  • Enter a name for your credential
  • Under "Credential Type" choose Machine
  • Click the key icon by "Username"
  • Choose the "HashiVault Secret Lookup" credential name you created earlier
  • For "Path to Secret" enter my_engine/my_root/my_folder
  • For "Key Name" enter my_key

@djyasin djyasin marked this pull request as ready for review January 4, 2024 20:46
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch from 2f633b0 to b50a876 Compare January 4, 2024 21:08
@github-actions github-actions bot added component:awx_collection issues related to the collection for controlling AWX component:cli component:ui dependencies Pull requests that update a dependency file labels Jan 4, 2024
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch from b50a876 to 89aeb01 Compare January 4, 2024 21:10
@djyasin djyasin marked this pull request as draft January 4, 2024 21:12
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch from 89aeb01 to 0bb1269 Compare January 5, 2024 15:28
@github-actions github-actions bot removed component:ui component:cli dependencies Pull requests that update a dependency file labels Jan 5, 2024
@github-actions github-actions bot removed the component:awx_collection issues related to the collection for controlling AWX label Jan 5, 2024
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch 4 times, most recently from 1e9030c to 0d2ab87 Compare January 5, 2024 16:53
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch from 0d2ab87 to 7aa090e Compare January 8, 2024 15:46
@djyasin djyasin marked this pull request as ready for review January 8, 2024 15:47
@TheRealHaoLiu TheRealHaoLiu changed the title Modify vault credential_plugin to authenticate to vault using LDAP Add userpass and LDAP support for HashiCorp vault credential_plugin Jan 8, 2024
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch 2 times, most recently from 35a917c to a011198 Compare January 18, 2024 15:39
…l plugins documentation

Revise ldap_auth to userpass_auth and revised exception to better reflect functionality
@djyasin djyasin force-pushed the hashi_vault_ldap_auth branch from a011198 to 74d2503 Compare January 18, 2024 15:49
Copy link
Contributor

@jjwatt jjwatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Approval.
Tested against devel with instructions from AAP-17485

@djyasin djyasin merged commit 2e168d8 into ansible:devel Jan 25, 2024
21 checks passed
djyasin added a commit to djyasin/awx that referenced this pull request Sep 16, 2024
…nsible#14654)

* Add username and password to handle_auth and update exception message

Revise naming of ldap username and password

* Add url for LDAP and userpass to method_auth

* Add information regarding LDAP and username and password to credential plugins documentation

Revise ldap_auth to userpass_auth and revised exception to better reflect functionality

* Revise method_auth to ensure certs can be used with username and ensure namespace functionality is not hindered
djyasin added a commit to djyasin/awx that referenced this pull request Nov 11, 2024
…nsible#14654)

* Add username and password to handle_auth and update exception message

Revise naming of ldap username and password

* Add url for LDAP and userpass to method_auth

* Add information regarding LDAP and username and password to credential plugins documentation

Revise ldap_auth to userpass_auth and revised exception to better reflect functionality

* Revise method_auth to ensure certs can be used with username and ensure namespace functionality is not hindered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants