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

feat(vault-token): make supplying a vault token optional #466

Closed
wants to merge 2 commits into from

Conversation

moo-im-a-cow
Copy link
Contributor

makes the vault token variable optional,
meaning that template creators can use the vault token module just to install vault cli, without it configuring a token environment variable.
the template creator can then log into vault with their own script,
or they can ask the user to manually run vault login command

potential future change: refactor the vault-jwt and the vault-github modules in this repo to call this module for installing vault, and their scripts only need to call the relevant login command, they dont need to download and install vault. makes maintaining easier if you have just one install script.

@cdr-bot cdr-bot bot added the community Pull Requests and issues created by the community. label May 9, 2025
@moo-im-a-cow
Copy link
Contributor Author

my particular usecase:
I switched from having a jwt generated in the coder template,
instead i now have a k8s operator that generates a new vault token (hashicorp/vault-secrets-operator#1062), and saves it to a k8s secret.
that token is short lived and is rotated regularly, the k8s secret always has a valid freshly generated vault token

the vault token secret is mounted as a file to the workspace container,
and is symlinked over the ~/.vault-token file
therefore, no authentication to vault ever occurs inside the container,

providing the token via envvar would result in the token expiring and not being updated with the secret,
and i didnt want to create my own new vault coder module

@moo-im-a-cow moo-im-a-cow changed the title feat(vault-token): make supplying a vault token optional feat( vault-token/main.tf): make supplying a vault token optional May 9, 2025
@moo-im-a-cow moo-im-a-cow changed the title feat( vault-token/main.tf): make supplying a vault token optional feat(vault-token/main.tf): make supplying a vault token optional May 9, 2025
@moo-im-a-cow moo-im-a-cow changed the title feat(vault-token/main.tf): make supplying a vault token optional feat(vault-token): make supplying a vault token optional May 9, 2025
@matifali
Copy link
Member

matifali commented May 9, 2025

We are moving to https://github.com/coder/regitsry. Please move your PR there. Thanks
More context in #469

@matifali matifali closed this May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Pull Requests and issues created by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants