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

hashi_vault - [env] Update VAULT_TOKEN handling #16

Closed
briantist opened this issue Dec 6, 2020 · 0 comments · Fixed by #25
Closed

hashi_vault - [env] Update VAULT_TOKEN handling #16

briantist opened this issue Dec 6, 2020 · 0 comments · Fixed by #25
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@briantist
Copy link
Collaborator

SUMMARY

See #10

VAULT_TOKEN is a Vault CLI env var.

The proposal then is to add an Ansible-specific env var and lower the precedence of the existing one:

  • Add ANSIBLE_HASHI_VAULT_TOKEN in env: in spec
  • Process VAULT_TOKEN as a fallback if the option is not set directly or via spec-defined env
  • 🎗this parameter already has another fallback action, which is to try to infer its value via the token_file and token_path parameters. This will remain, and it will still have lower precedence than the VAULT_TOKEN env var. This preserves the existing relative relationship.

ℹThis is not a breaking change

  • existing ways of specifying the value keep their relative precedence, and the new env var didn't exist previously
ISSUE TYPE
  • Feature Idea
COMPONENT NAME
ADDITIONAL INFORMATION
@briantist briantist added the enhancement New feature or request label Dec 6, 2020
briantist added a commit to briantist/community.hashi_vault that referenced this issue Dec 12, 2020
- Add `ANSIBLE_HASHI_VAULT_TOKEN` env var in argspec
- Move `VAULT_TOKEN` env var to `LOW_PRECEDENCE_ENV_VAR_OPTIONS`
@briantist briantist moved this from To do to In progress in Environment Variable Standardization Dec 12, 2020
@briantist briantist added this to the v0.2.0 milestone Dec 13, 2020
@briantist briantist self-assigned this Dec 13, 2020
briantist added a commit that referenced this issue Dec 14, 2020
* Update argspec for 'namespace' parameter #14

- Add `ANSIBLE_HASHI_VAULT_NAMESPACE` env var to argspec
- Move `VAULT_NAMESPACE` env var to `LOW_PRECEDENCE_ENV_VAR_OPTIONS`
- Add new INI option for `namespace`

* Update token parameter handling #16

- Add `ANSIBLE_HASHI_VAULT_TOKEN` env var in argspec
- Move `VAULT_TOKEN` env var to `LOW_PRECEDENCE_ENV_VAR_OPTIONS`

* Add changelog fragment for #25

* Add issue URL to changelog fragment
@briantist briantist moved this from In progress to Done in Environment Variable Standardization Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

1 participant