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

Segmentation violation with self signed certificate #76

Closed
mgolik opened this issue Dec 17, 2021 · 2 comments
Closed

Segmentation violation with self signed certificate #76

mgolik opened this issue Dec 17, 2021 · 2 comments

Comments

@mgolik
Copy link

mgolik commented Dec 17, 2021

Provider version: 2021.10.3
Terraform version: v1.0.11
System: Linux Mint 20.02
Kernel: 5.4.0-91-generic x86_64

Error message:

2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: PANIC: runtime error: invalid memory address or nil pointer dereference
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: [signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x10c57b7]
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: goroutine 93 [running]:
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: goauthentik.io/terraform-provider-authentik/internal/provider.httpToDiag(0x0, 0x14b0800, 0xc00027ca80, 0xc000544368, 0xc000036d20, 0x24)
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	goauthentik.io/terraform-provider-authentik/internal/provider/utils.go:94 +0x37
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: goauthentik.io/terraform-provider-authentik/internal/provider.resourceLDAPPropertyMappingRead(0x14c08c8, 0xc0001e5380, 0xc0000d3300, 0x11400e0, 0xc0000a0128, 0xc0001fc6d0, 0xc0003c3908, 0x40e0f8)
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	goauthentik.io/terraform-provider-authentik/internal/provider/resource_property_mapping_ldap.go:67 +0x231
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0002bae00, 0x14c0858, 0xc0001b3c40, 0xc0000d3300, 0x11400e0, 0xc0000a0128, 0x0, 0x0, 0x0)
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	github.com/hashicorp/terraform-plugin-sdk/v2@v2.8.0/helper/schema/resource.go:347 +0x17f
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0002bae00, 0x14c0858, 0xc0001b3c40, 0xc0001e71e0, 0x11400e0, 0xc0000a0128, 0xc0000a1370, 0x0, 0x0, 0x0)
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	github.com/hashicorp/terraform-plugin-sdk/v2@v2.8.0/helper/schema/resource.go:624 +0x1cb
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0000c82e8, 0x14c0858, 0xc0001b3c40, 0xc0001b3c80, 0xc0001b3c40, 0x40b965, 0x12a4da0)
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	github.com/hashicorp/terraform-plugin-sdk/v2@v2.8.0/helper/schema/grpc_provider.go:576 +0x47d
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc0005948c0, 0x14c0900, 0xc0001b3c40, 0xc0001e4ea0, 0xc0005948c0, 0xc0001f7410, 0xc0001cfba0)
2021-11-29T12:32:52.644+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	github.com/hashicorp/terraform-plugin-go@v0.4.0/tfprotov5/tf5server/server.go:298 +0x105
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x12f12c0, 0xc0005948c0, 0x14c0900, 0xc0001f7410, 0xc0001e4e40, 0x0, 0x14c0900, 0xc0001f7410, 0xc0001a2380, 0xe0)
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	github.com/hashicorp/terraform-plugin-go@v0.4.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: google.golang.org/grpc.(*Server).processUnaryRPC(0xc00023cc40, 0x14c8af8, 0xc000083e00, 0xc000143e00, 0xc000457290, 0x1bf4630, 0x0, 0x0, 0x0)
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: google.golang.org/grpc.(*Server).handleStream(0xc00023cc40, 0x14c8af8, 0xc000083e00, 0xc000143e00, 0x0)
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000038410, 0xc00023cc40, 0x14c8af8, 0xc000083e00, 0xc000143e00)
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	google.golang.org/grpc@v1.32.0/server.go:859 +0xab
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: created by google.golang.org/grpc.(*Server).serveStreams.func1
2021-11-29T12:32:52.645+0100 [DEBUG] provider.terraform-provider-authentik_v2021.10.3: 	google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd
2021-11-29T12:32:52.646+0100 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2021-11-29T12:32:52.646+0100 [ERROR] plugin.(*GRPCProvider).ReadResource: error="rpc error: code = Unavailable desc = transport is closing"
@BeryJu BeryJu closed this as completed in 9ca56a6 Dec 17, 2021
@BeryJu
Copy link
Member

BeryJu commented Dec 17, 2021

So I couldnt actually reproduce the error (neither on macOS nor on linux, both against a self-signed authentik with insecure = true set), but this commit should fix the panic at least.

@mgolik
Copy link
Author

mgolik commented Dec 17, 2021

That was quick!
Sorry I forgot to mention that it was without insecure = true - I just expected error and not a crash.
When I realized it was because of self signed cert I found the flag and it worked right away.

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

No branches or pull requests

2 participants