TerryHowe / ansible-modules-hashivault

Ansible module for Hashicorp Vault.
https://pypi.python.org/pypi/ansible-modules-hashivault
MIT License
454 stars 158 forks source link

hashivault_identity_entity_alias didn't have custom_metada parameter #473

Open apenadiazApk opened 8 months ago

apenadiazApk commented 8 months ago

Hi

I'm using this very useful module, but right now configuring entity and entity-alias i noted entity works good, but entity-alias missing custom-metadata parameter to use.

msg: 'Unsupported parameters for (hashivault_identity_entity_alias) module: custom_metadata. Supported parameters include: alias_id, authtype, aws_header, ca_cert, ca_path, canonical_id, client_cert, client_key, entity_name, login_mount_point, mount_accessor, name, namespace, password, role_id, secret_id, state, token, url, username, verify.'

I'm using hashivault version 5.1.1 vault server: 1.15.4, the custom_metadata parameter was introduced since vault server 1.7.x

is possible update the module to implement the option ? otherwise have to play with hashivault_[read and write] to make a workaround.

this is the link for the doc about it: https://developer.hashicorp.com/vault/api-docs/secret/identity/entity-alias#create-an-entity-alias

TerryHowe commented 8 months ago

It could be added to https://github.com/TerryHowe/ansible-modules-hashivault/blob/main/ansible/modules/hashivault/hashivault_identity_entity_alias.py if hvac supports it.

The argspec would look something like: argspec['custom_metadata'] = dict(required=False, type='dict')

TerryHowe commented 8 months ago

The way I'm reading it, hvac doesn't support it, so you'd have to request it there first https://github.com/hvac/hvac/blob/main/hvac/api/secrets_engines/identity.py#L384

apenadiazApk commented 8 months ago

Hi @TerryHowe

the issue was opened, meanwhile i did the workarond using read/write.

thanks