Declarative auth provider fails to login
Issue
In case of declarative configuration for auth providers, it may happen that the auth provider returns a "Code not valid" error when attempting to login. This happens when the auth provider has previously had an issue during creation (e.g. a non-unique name was used) and when successfully created, any login attempts yield the error.
Additionally, logs of Central may include the following when the login attempt is done:
2023/08/21 08:54:02 http2: panic serving 10.130.22.8:59088: runtime error: invalid memory address or nil pointer dereference
goroutine 18140534 [running]:
golang.org/x/net/http2.(*serverConn).runHandler.func1()
golang.org/x/net@v0.10.0/http2/server.go:2307 +0x145
panic({0x6eb48a0, 0xb1b0e00})
runtime/panic.go:884 +0x213
github.com/stackrox/rox/pkg/auth/authproviders.(*registryImpl).issueTokenForResponse(0xc003918900, {0x83ac070, 0xc01703b560}, {0x83e3e18, 0xc019d78460}, 0xc01641efc0)
...
Note that the returned error and code may be different depending on the authentication provider type used in the declarative config.
The samples assume the type "oidc".
Environment
- *KS cluster.
- Declarative configuration used.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.