-
Notifications
You must be signed in to change notification settings - Fork 542
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
Duplicated vault namespace - vault_auth_backend v3.16.0 #1903
Comments
Yes, same problem here. We have the following configuration: provider "vault" {
address = var.vault_addr
auth_login {
path = "auth/approle/login"
namespace = "admin"
parameters = {
role_id = var.role_id
secret_id = var.secret_id
}
}
} Request should have header |
Investigated a bit ...
So up to terraform-provider-vault/internal/provider/meta.go Lines 295 to 311 in 31207b8
The namespace seems to be correct (i.e not So this my not work as expected ?
|
Same issue here. Following-up, decided to stay in 3.15.0 for now. |
While upgrading from 3.15.2 to 3.16.0... I suffer from a similar issue but not exactly in the same way. Our app_role is located at the root level and we define the namespace in the provider configurations only (not in the terraform resources) And It looks like with the new version of the provider, it adds the namespace in the login request; probably due to the concatenation issue described by the others above. Removing the namespace from the configuration seems to resolve the
With the following provider configurations:
But by removing the namespace from the provider configurations and adding it to the terraform resources instead, the plan won't work as it will try to check in the root and not in the newly defined namespace in the resource which was previously in the provider configuration.
Something is definitely wrong with the namespace starting from 3.16.0 and most likely due to #1841 We can't upgrade, we have to stay on version 3.15.2 for now... |
Casual bump to @benashz (who might pull in others) - This has blocked me updating for a while now, and I start to get concerned when we near a year with no plausible update paths for critical infra like this. |
Thanks for raising this @Callek. We'll also open a support ticket on this one soon if the comments stay quiet as this is a true blocker. |
Has anyone found any new information on this...? I bumped into this when rewriting our Vault modules (again) and this is somewhat very annoying. I'll probably raise this to Hashicorp's support next week (as we're are customers)... It's especially nasty when they fixed the lazy-loading of provider configs in version 3.23.0 but we cannot bump this provider version into production as it'd create the namespaces on root-level :/ |
Replying to myself here: we've discovered the issue, probably. Version 3.22.0 brough this option into the provider: https://github.com/hashicorp/terraform-provider-vault/blob/main/CHANGELOG.md#3220-nov-1-2023 - and - Hashicorp decided to make this to default to true. I believe this has broken many setups trying to use newer versions. We had to set this to false everywhere and then we were able to bump the provider to all the way to latest version 4 (4.4.0 if I remember correctly atm). Maybe things got broken in https://github.com/hashicorp/terraform-provider-vault/blob/main/CHANGELOG.md#3210-oct-9-2023 when another bug was fixed (see "Fix failure when auth_login is specified and vault token is picked up from the runtime/execution environment"). Soo, you fix a bug and break things elsewhere... |
Hi there,
We started facing an issue using the vault terraform provider 3.16.0, where the vault namespace seems to be duplicated at the vault API call, maybe it's related to concatenating the vault namespace used by the login token and the namespace specified at the vault resource.
Terraform Version
v1.5.0
Affected Resource(s)
Please list the resources as a list, for example:
This may be affecting other resources.
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
What should have happened?
The GET https://vault-endpoint/v1/sys/auth call should succeed with the proper namespace:
acc1/aws/namespace-01
.Actual Behavior
What actually happened?
The GET https://vault-endpoint/v1/sys/auth call fails showing a duplicated namespace:
acc1/aws/namespace-01/acc1/aws/namespace-01
.Steps to Reproduce
We're executing this using a GitHub actions workflow, but it seems like:
terraform plan
Important Factoids
Running in GitHub Workflow
References
The text was updated successfully, but these errors were encountered: