-
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
fix: Weave GitOps username is hard-coded #2086
Conversation
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.
Changes to the chart will (just like documentation) be deployed straight to our end users. I believe this change would break all existing users, hence my change request.
Additionally, when you change the chart, you need to change the chart version, or the deploy becomes weird and we create 2 different "editions" of the same chart version.
I know that part, first I wanted some review if the approach is acceptable.
When the Helm Chart is applied, the RoleBinding will be changed. I don't see why would it break. If they log in with an |
Tested workflow:
|
No - merging this PR won't deploy core in any customer cluster. It will deploy the role binding. We can only do the chart change as part of a release. |
That makes sense. So this can be merged only before we cut a new release? Unfortunately I can't split it up code and chart changes. At least I don't see how can I do that. |
dejavu I think this is something we do not want. It was a deliberate choice to have the k8s object User to always be called wego admin. I had a PR very similar to this a while ago (cannot find it anywhere) and was told that we do not want this. Basically the argument was that if we let it be configurable to this level, people can create any number of static users and we don't want to become an identity provider. |
Closing this PR based on the discussion above. |
the fact that we keep having these discussions, because it looks so weird to use and to implement, is... illuminating 😁 |
This is the closest thing to a "summary issue" i can find. It has all the links to various discussions around this. I may write it up fully so we have an easy link in future for when this inevitably comes up again #1787 |
Add 2 users right now, and add a ticket to remove the old one after the next release, I suppose.
Given this has been reported about one time for every person who's tried to use this, could we just fix it instead? "We don't want this" isn't accurate - we clearly all do. |
you'd have to take it up with @davidstauffer |
To be fair it's kind of documented: Maybe we just have to highlight the fact that the username + password pair is only for authentication, the logged in user will be |
Technically with this approach they still can have only one user, because we read the user/pass from a single and hard-coded Secret, so no way they can create more than one user without changing the mechanism used to fetch auth credentials from Secret. |
Alright, I think we should reopen this since it is a topic that keeps coming up.
|
Why the HelmChart test fails... updated the chart version :/ |
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.
🎉
Not sure about the failed check - I added it, and it's clearly not doing what it should, so I need to debug it. I'm happy for you to ignore it and merge regardless.
Fixed the chart check in #2094 |
username, and keep the original `wego-admin` there to maintain backward compatibility. `DevMode` with Tilt still uses `wego-admin` as a hard-coded user, potentially we can even remove the `DevUser` maybe. `DevMode` is used only to set `DevUser` on `HMACTokenSignerVerifier` and the user is used only return with a static claim on `Verify()`. Additional changes: * Split up the admin-user.yaml into logical parts like * Credentials as they will be created only once. * Role and ClustreRole as they will be created only once * Two files for RoleBinding and ClusterRoleBinding (as described above)
5f753e5
to
6b9fb36
Compare
Should we add something in docs (in another pr) that if ppl want to add more users, it is at their own risk and we are doing (will always do) the bare minimum when it comes to being an identity provider, and that they should def use oidc? |
How can they add more users? The code behind the scene will be still the same and it will check only the Right now I think the only way people can use multiple users is OIDC. they can create Roles and RoleBindings, but login user will be only one without OIDC. |
Create addition RoleBinding and ClusterRoleBinding based on the
username, and keep the original
wego-admin
there to maintain backwardcompatibility.
DevMode
with Tilt still useswego-admin
as a hard-coded user,potentially we can even remove the
DevUser
maybe.DevMode
is used only to setDevUser
onHMACTokenSignerVerifier
andthe user is used only return with a static claim on
Verify()
.Additional changes:
Fixes #2001