Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does and why
When Console cannot read an IAM user from Kubernetes, sign-in currently reports incorrect credentials before checking the password.
Authenticator.Loginturns every user-read error intoErrAuth, and the web client treats every unsuccessful token response as a password error.Only a missing user now becomes a credential failure; other lookup errors retain their cause and use the existing
500 server_errorresponse. The cause stays in server logs and the login audit records a service failure. Unknown users and wrong passwords still receive the same generic401 invalid_grantresponse.The login page reserves the incorrect-credentials message for that response. Service errors, network failures and unusable token responses show recovery guidance in English and Chinese without storing a token or exposing the response body. No endpoint, configuration key or credential format is added.
Which issue(s) this PR fixes
Fixes #122
How it was tested
go test ./...: 175 tests/subtests passed; 6 existing Helm-dependent cases skipped because chart dependencies were not fetched. No chart changes.go test -race ./internal/iam ./internal/server,go vet ./..., andgofmtpassed.web/:npm run typecheck(both variants),npm test(624 tests), andnpm run buildpassed.Checks
go test ./...andgofmt -l .is empty (Helm skips noted above)npm run typecheck && npm test && npm run buildinweb/docs/console-design.mdNotes for reviewers
Start with the distinction between a missing user and a failed user lookup. The existing
server_errorwire response remains generic; Kubernetes authentication/RBAC errors must not be presented as a user's bad password. Identity changes require the additional reviewer described in the contribution guide.Release note