Skip to content

Hashicorp Vault: KvV2.create_or_update_secret() got an unexpected keyword argument 'secret_path' #37619

Closed

Description

@Blizzke

Apache Airflow Provider(s)

hashicorp

Versions of Apache Airflow Providers

apache-airflow-providers-hashicorp==3.6.3

Apache Airflow version

2.8.1

Operating System

arch

Deployment

Virtualenv installation

Deployment details

_VaultClient.create_or_update_secret() calls the underlying KV engine with a secret_path keyword parameter that should've been path:

File ".../.venv/lib/python3.11/site-packages/airflow/providers/hashicorp/_internal_client/vault_client.py", line 474, in create_or_update_secret
    response = self.client.secrets.kv.v2.create_or_update_secret(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: KvV2.create_or_update_secret() got an unexpected keyword argument 'secret_path'

What happened

When using this functionality it fails given the above error message.

What you think should happen instead

If the create_or_update_secret functionality is provided, it should work as intended.

How to reproduce

Call create_or_update_secret, via the VaultHook for example.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Feb 22, 2024
  2. changed the title [-]Hashicorp Value: [/-] [+]Hashicorp Vault: VAULT_CAPATH & VAULT_CACERT broken by pre-creating session to pass along [/+] on Feb 22, 2024
  3. changed the title [-]Hashicorp Vault: VAULT_CAPATH & VAULT_CACERT broken by pre-creating session to pass along [/-] [+]Hashicorp Vault: KvV2.create_or_update_secret() got an unexpected keyword argument 'secret_path'[/+] on Feb 22, 2024
  4. tungbq commented on Feb 22, 2024

    @tungbq
    Contributor

    Hi team, can I work on this issue?

  5. potiuk commented on Feb 22, 2024

    @potiuk
    Member

    feel free

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions