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

use apiGroup without version in webapp auth howto #1453

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

jamieklassen
Copy link
Contributor

This is purely a docs change. While I was attempting to follow these instructions, I kept seeing errors like

{"level":"info","timestamp":"2023-03-16T19:42:34.050803Z","caller":"k8s.io/utils@v0.0.0-20230115233650-391b47cb4029/trace/trace.go:219$trace.(*Trace).logTrace","message":"Trace[580760707]: \"create\" kind:TokenCredentialRequest (16-Mar-2023 19:42:34.050) (total time: 0ms):\nTrace[580760707]: ---\"failure\" failureType:token authentication,msg:no such authenticator 0ms (19:42:34.050)\nTrace[580760707]: [51.899µs] [51.899µs] END\n"}

I googled around for this error and encountered the similar (but not the same, due to their use of the CLI) #1211. Anyway, upon digging through the code I figured out that the error was being raised here:

return nil, ErrNoSuchAuthenticator

Which suggested to me that the authncache was not being populated correctly. After a bit more digging I found that it was the jwtcachefiller who was responsible for this, and it was using cache keys like this:

cacheKey := authncache.Key{
APIGroup: auth1alpha1.GroupName,
Kind: "JWTAuthenticator",
Name: ctx.Key.Name,
}

Looking a little closer at the APIGroup value there, I found

const GroupName = "authentication.concierge.pinniped.dev"

There's no /v1alpha1 at the end there! Stripping this from my TokenCredentialRequest allowed me to move forward.

Release note:

NONE

@cfryanr
Copy link
Member

cfryanr commented Apr 3, 2023

Thanks @jamieklassen!

@cfryanr cfryanr merged commit 6ae3c0a into vmware-tanzu:main Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants