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

Bug on hashivault_approle_role_secret module #474

Open
andrii88-ku opened this issue May 9, 2024 · 1 comment
Open

Bug on hashivault_approle_role_secret module #474

andrii88-ku opened this issue May 9, 2024 · 1 comment

Comments

@andrii88-ku
Copy link

andrii88-ku commented May 9, 2024

Please help :)
I found some bug on hashivault_approle_role_secret module
When used approle auth method to login into vault, parameter secret_id used for both: login to vault and generate secret_id
As result i have generated secret_id and secret_id which i used for login with the same value.

- name: Generate secret_id (run only one time)
  hashivault_approle_role_secret:
    name:  "{{ item.0.namespace }}-{{ item.1 }}-approle"
    authtype: "approle"
    url: "{{ envs.vault_url }}"
    role_id: "{{ envs.vault_role_id }}"
    secret_id: "{{ envs.vault_role_secret_id }}"  
#    secret: '{{ lookup("password", "/dev/null length=32 chars=ascii_letters,digits") }}'
    verify: false
    state: present
  register: 'secretid'
  loop: "{{ approles  | subelements('service')  }}"
  loop_control:
    label: "Secret_id are already generated for role: {{ item.0.namespace }}-{{ item.1 }}-approle"
  ignore_errors: yes
  failed_when: false

And when i used secret_id with secret parameter, secret was ignored.

@TerryHowe
Copy link
Owner

I'm not sure I completely understand the problem. Are you saying the approle password was the admin password?

I don't see a way to set approle password https://developer.hashicorp.com/vault/api-docs/auth/approle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants