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

Adding user authentication failed context value #56

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

MbolotSuse
Copy link
Contributor

No description provided.

Copy link
Contributor

@KevinJoiner KevinJoiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -153,6 +156,7 @@ func ToMiddleware(auth Authenticator) Middleware {
"system:cattle:error",
},
}
ctx = request.WithValue(ctx, CattleAuthFailed, "true")
} else if !ok {
info = &user.DefaultInfo{
Copy link
Contributor

@cbron cbron Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So all this PR does is add a single key/val to the context if the authentication failed. But then below if authentication worked but user is unauthenticated we don't care, because they are using a rancher token ? Nvm, read as unathorized.

Copy link
Contributor

@rmweir rmweir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cbron cbron merged commit 647cba2 into rancher:master Aug 5, 2022
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

Successfully merging this pull request may close these issues.

4 participants