-
Notifications
You must be signed in to change notification settings - Fork 160
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
Static Users #1755
Static Users #1755
Conversation
FYI @yiannistri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really awesome! I just have one question
if loginRequest.Username != string(hashedSecret.Data["username"]) { | ||
s.Log.Info("Wrong username") | ||
rw.WriteHeader(http.StatusUnauthorized) | ||
if err := s.kubernetesClient.List(r.Context(), users, opts...); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to list all users, or can we just get a specific one based on the username?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't query based on any data value. So to accomplish that we would need to force users to use some kind of convention for names, but that would still be tricky because they can choose to use an email address as the username and that's not a valid name for a k8s resource.
Listing isn't ideal but at least we only list the secrets with that particular Label. And in practice, there should be a small number of those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aah i see, makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully grasp the context here, but no issues with the code.
This may be being rolled back, see: https://weaveworks.slack.com/archives/C03244W0C8H/p1647967858091769 |
Closes: #1598 #1722
What changed?
The concept of Static User has been introduced. This feature allows operators to create an undefined number of Users by creating K8s Secrets with a well-defined structure and label so that Weave Gitops can query and match credentials.
Why?
How did you test it?
Release notes
*Documentation Changes