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

service account issuer needs to be the same on all servers #759

Open
hi117 opened this issue Feb 8, 2024 · 0 comments
Open

service account issuer needs to be the same on all servers #759

hi117 opened this issue Feb 8, 2024 · 0 comments

Comments

@hi117
Copy link

hi117 commented Feb 8, 2024

As per hasCorrectIssuer in jwt.go:

// hasCorrectIssuer returns true if tokenData is a valid JWT in compact
// serialization format and the "iss" claim matches the iss field of this token
// authenticator, and otherwise returns false.

Setting the issuer to the ip address means that having more than one apiserver will cause unpredictable auth failures. If requests happen to get directed to the apiserver that issued their token then it will auth the request. But if the request hits any other apiserver, then it won't auth the request.

I fixed this by setting it to the same string for all apiservers in my cluster. There can be additional rules but for the use case presented here, just setting it to any string works as long as its the same on all apiservers. See https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ and --service-account-issuer for more info.

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

1 participant