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

[Enhancement]: Support using a JWT file for auth_login_jwt #2353

Open
stevehipwell opened this issue Nov 6, 2024 · 4 comments
Open

[Enhancement]: Support using a JWT file for auth_login_jwt #2353

stevehipwell opened this issue Nov 6, 2024 · 4 comments

Comments

@stevehipwell
Copy link

Description

I'd like to be able to specify a JWT file rather than the JWT content when I'm configuring Vault.

Affected Resource(s) and/or Data Source(s)

n/a

Potential Terraform Configuration

provider "vault" {
  auth_login_jwt" {
    jwt_file = "./jwt"
    mount = "github-actions"
    role  = "my-role"
  }
}

References

No response

Would you like to implement a fix?

None

@fairclothjm
Copy link
Contributor

@stevehipwell Hello, there is the env TERRAFORM_VAULT_AUTH_JWT as well as the TF file function. Will either of those work for your use-case?

@stevehipwell
Copy link
Author

@fairclothjm that env variable is the content again though isn't it? Other providers generally support a file path, that way the token can be refreshed before it expires.

@fairclothjm
Copy link
Contributor

Thanks for context! In that case, I think this is a legit feature request. Although, I think the file function could be used here?

@stevehipwell
Copy link
Author

@fairclothjm we current use the file function, but that means that the token content needs to be correct when file is called rather than when the token is actually used.

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

No branches or pull requests

2 participants