Test hashicorp credentials from AAP UI

Hi,

My AAP is up and running, i am trying to integrate hashicorp vault into it. Connection established between two server via https. I can able to retrieve secrets using curl via cli. But at the same time, if i try to test the secrets via AAP UI. I am always getting Bad request, how to debug this scenario. Where to check to proceed further. Redhat docs couldn’t provide enough info regardi g this.

Anyone have any idea please share with me

Thanks for your support

Hi Selvi, have you checked your proxy/firewall is allowing this through ? Have you checked the logs on the controllers to see if they give any more information ? I have had trouble with the debug levels in aap 2.5 and have had to manually update the debug levels in the gateway settings to get to the bottom of some of the issues I had.

I can now verify the credentials. but unable to retrieve using a playbook that runs through AAP. I have supplied the vault server details and generated new credentials of the ‘HashiCorp Vault Secret Lookup’ type. After that, I made a new credential with the type “Machine” and chose the old vault credentials in the password field. These machine credentials are then passed into my job templates. When I run the playbook, I receive the error message below.

fatal: [localhost]: FAILED! => {
103
 "msg": "An unhandled exception occurred while running the lookup plugin 'community.hashi_vault.hashi_vault'. Error was a <class 'ansible_collections.community.hashi_vault.plugins.module_utils._hashi_vault_common.HashiVaultValueError'>, original message: Required option url was not set.. Required option url was not set."
104
}

You can add it under Execution Environments → Environment Variables :

VAULT_ADDR=https://vault.example.com:8200

Selvi,

I am running into the same issues with just getting the Bad request. What did you do to help troubleshoot it? I am also able to test manually, but not sure if I am just using the wrong values or if there is something else going on. I can definitely communicate with the Vault endpoint from my cluster without issue. The logs are unhelpful so far. If there is additional logging you enabled to help figure out what was going on could you please share? If not could you show how you configured the settings for the test to work properly? I am getting conflicting information on various pieces of the docs.

Hi,

You have to configure CA cert as a pem format.