Skip to content
This repository was archived by the owner on Jun 27, 2025. It is now read-only.

Feature/include vault token in deployment - #258

Merged
jrasell merged 4 commits into
hashicorp:masterfrom
ebarriosjr:feature/Include-vault-token-in-deployment
Dec 14, 2018
Merged

jrasell merged 4 commits into
hashicorp:masterfrom
ebarriosjr:feature/Include-vault-token-in-deployment

Conversation

@ebarriosjr

Copy link
Copy Markdown

No description provided.

@jrasell

jrasell commented Nov 27, 2018

Copy link
Copy Markdown
Member

@ebarriosjr thanks a lot for this. Before I merge this in I am curious what is secure introduction method will be when supplying a token via the CLI?

@ebarriosjr

Copy link
Copy Markdown
Author

@jrasell I believe supplying the token via the cli is not secure. Depends mostly on how you use Levant. I would say that the recommended way will be to use the env variable but it is nice to have the possibility of sending the token via the cli for testing imho.

@redfive

redfive commented Nov 28, 2018

Copy link
Copy Markdown

This patch always uses the env var VAULT_TOKEN if it exists, as long as no command line switch is passed in? Just thinking if that would get troublesome in CI environments that might have a more permissive token set in the environment by default.

@ebarriosjr

Copy link
Copy Markdown
Author

Hi @redfive
you are right. If the token is set in the CI env for this job then it is going to use it. I could amend the merge request if needed to add a flag to enable or disable the loading from env. I usually set the token by job and not for the entire environment in our CI. Maybe @jrasell has an opinion about this?

@jrasell

jrasell commented Nov 29, 2018

Copy link
Copy Markdown
Member

@redfive raises a nice point where unintentional side effects could arise if the user doesn't understand the internals of the CLI flag. Taking this into consideration @ebarriosjr, how would you feel about having this flag only as an explicit CLI passed variable, and adding another which would read the env var (I would guess they would be exclusive and you can only provide one of the two)?

@ebarriosjr

Copy link
Copy Markdown
Author

@jrasell I worked on it as promised and now we have two flags:
-vault -> will load the vault_token from the env
-vault-token -> will load the vault_token from the cli
If both of them are used at the same time an error would occur.

@jrasell

jrasell commented Dec 14, 2018

Copy link
Copy Markdown
Member

thanks a lot @ebarriosjr

@jrasell
jrasell merged commit cc275cb into hashicorp:master Dec 14, 2018
@ebarriosjr
ebarriosjr deleted the feature/Include-vault-token-in-deployment branch January 28, 2019 18:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址