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

Setting auth_login_cert causes a panic with v3.17.0+ #1916

Closed
nvx opened this issue Jun 22, 2023 · 0 comments · Fixed by #1926
Closed

Setting auth_login_cert causes a panic with v3.17.0+ #1916

nvx opened this issue Jun 22, 2023 · 0 comments · Fixed by #1926
Assignees
Labels
Milestone

Comments

@nvx
Copy link

nvx commented Jun 22, 2023

Crash after updating provider to v3.17.0, v3.16.0 doesn't exhibit the crash, but cert login doesn't work in that version.

Terraform Version

Terraform v1.5.1

Provider Config

provider "vault" {
  alias = "dc"
  address = var.vault_addr
  auth_login_cert {
    cert_file = "/local/vault-auth.pem"
    key_file = "/secrets/vault-auth-key.pem"
  }
}

Panic Output

Error: Plugin did not respond

  with provider["registry.terraform.io/hashicorp/vault"].dc,
  on main.tf line 13, in provider "vault":
  13: provider "vault" {

The plugin encountered an error, and failed to respond to the
plugin.(*GRPCProvider).ConfigureProvider call. The plugin logs may contain
more details.

Stack trace from the terraform-provider-vault_v3.17.0_x5 plugin:

panic: interface conversion: http.RoundTripper is *helper.transport, not *http.Transport

goroutine 24 [running]:
github.com/hashicorp/vault/api.(*Config).configureTLS(0xc0001acff0, 0xc000d35270)
	github.com/hashicorp/vault/api@v1.8.1/client.go:276 +0x509
github.com/hashicorp/vault/api.(*Config).ConfigureTLS(0xc0001acff0, 0xc000d2df50?)
	github.com/hashicorp/vault/api@v1.8.1/client.go:334 +0x7a
github.com/hashicorp/terraform-provider-vault/internal/provider.(*AuthLoginCert).Login(0xc000d52090, 0xc000d1e1e0)
	github.com/hashicorp/terraform-provider-vault/internal/provider/auth_cert.go:143 +0x2cc
github.com/hashicorp/terraform-provider-vault/internal/provider.NewProviderMeta(0xc000d28500)
	github.com/hashicorp/terraform-provider-vault/internal/provider/meta.go:252 +0xa99
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Provider).Configure(0xc0002862a0, {0x184ebf0, 0xc000d2cc90}, 0xd?)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.16.0/helper/schema/provider.go:287 +0x18f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ConfigureProvider(0xc0009452a8, {0x184eb48?, 0xc000af8600?}, 0xc0008404f8)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.16.0/helper/schema/grpc_provider.go:557 +0x345
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).Configure(0xc0001fac80, {0x184ebf0?, 0xc000d16150?}, 0xc000af8340)
	github.com/hashicorp/terraform-plugin-go@v0.9.0/tfprotov5/tf5server/server.go:555 +0x2ef
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_Configure_Handler({0x13e53e0?, 0xc0001fac80}, {0x184ebf0, 0xc000d16150}, 0xc000d24000, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.9.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:331 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001bed20, {0x1853ae0, 0xc00097e000}, 0xc000b185a0, 0xc00094e450, 0x2146418, 0x0)
	google.golang.org/grpc@v1.50.0/server.go:1318 +0xb2b
google.golang.org/grpc.(*Server).handleStream(0xc0001bed20, {0x1853ae0, 0xc00097e000}, 0xc000b185a0, 0x0)
	google.golang.org/grpc@v1.50.0/server.go:1659 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/grpc@v1.50.0/server.go:955 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/grpc@v1.50.0/server.go:953 +0x28a

Error: The terraform-provider-vault_v3.17.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
@benashz benashz added the bug label Jun 22, 2023
@benashz benashz self-assigned this Jun 22, 2023
@benashz benashz changed the title Crash with v3.17.0 Setting auth_login_cert causes a panic with v3.17.0+ Jun 22, 2023
@benashz benashz added this to the 3.18.0 milestone Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants