-
Notifications
You must be signed in to change notification settings - Fork 58
feat(vault-jwt): allow specifying the vault jwt token directly #436
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a vault expert at all. But as far as I understand the the workspace scoped secrets need to be pre created in vault. How would one do that.
In other words, I agree with use case to provide workspace only secrets access but is concerned if it makes the config difficult on the vault side. How would one provision these secrets? For what type of secrets this is most useful for.
Thanks.
Hi @moo-im-a-cow can you run |
@matifali is there a way to override an error in the "ci/pretty" job?
the |
Thanks. I think we need to handle this in our validation script. |
@mafredri, what is the best way to pass this prettier validation check? AFAIR, we did this as the plugin we are using is not able to format |
I have changed the syntax and code block in the readme for the Vault Policy example. I will do one last test of this module using these new blocks to make sure it works properly before Accepting |
I'm going to pull this locally to test it before approving this but everything is looking good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple minor nits, otherwise LGTM 👍🏻
vault-jwt/README.md
Outdated
sub = "${data.coder_workspace.me.id}" | ||
aud = "https://vault.example.com" | ||
iat = provider::time::rfc3339_parse(plantimestamp()).unix | ||
# exp = timeadd(timestamp(), 3600) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should either be removed or have an associated comment (uncomment to ...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean just the exp field? or the sub, aud, iat, exp fields?
(github shows you replying to 4 lines so just making sure i have the correct context)
I also realised the exp line is invalid, i'll have to update it anyway so that it gives a unix timestamp instead of text timestamp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming you only meant the exp field, i've fixed it up and added a comment describing it and the pro/con of uncommenting it (making the token expire)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump the version.
Co-authored-by: M Atif Ali <[email protected]>
Co-authored-by: M Atif Ali <[email protected]>
Co-authored-by: M Atif Ali <[email protected]>
Co-authored-by: Mathias Fredriksson <[email protected]>
Co-authored-by: Mathias Fredriksson <[email protected]>
Co-authored-by: Mathias Fredriksson <[email protected]>
Co-authored-by: Mathias Fredriksson <[email protected]>
Should be available in version |
this PR allows you to pass the desired jwt token to the vault-jwt module as a variable, for cases when you want to use a different jwt token to the one used to authenticate to vault
if not specified, it defaults to
data.coder_workspace_owner.me.oidc_access_token
.