Skip to content

Global flag to disable username edits #4618

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

Closed
bpmct opened this issue Oct 18, 2022 · 10 comments
Closed

Global flag to disable username edits #4618

bpmct opened this issue Oct 18, 2022 · 10 comments

Comments

@bpmct
Copy link
Member

bpmct commented Oct 18, 2022

We should make it possible to disable editing usernames in order to rely on usernames from SSO via a global flag (e.g. DISABLE_USERNAME_EDITS.

Prior art

  • Coder Classic has a configurable flag to disable username changes
    Screen Shot 2022-10-18 at 9 56 56 AM
  • GitLab and GitHub both allow username changes but preserve the past username to "redirect" links and resources
  • GitLab and Sourcegraph have a global configuration to disable username changes
@bpmct bpmct added enterprise Enterprise-license / premium functionality s0 Major regression, all-hands-on-deck to fix labels Oct 18, 2022
@ammario
Copy link
Member

ammario commented Oct 18, 2022

It would be nice to avoid yet another knob...

Username reuse is a larger security risk for Coder than these other products because many will name user-scoped infrastructure with usernames. This infrastructure could be secrets or personal volumes.

Perhaps we could prevent username reuse, except when the reuser originally held the username? With this approach we get redirects and secure default behavior.

@bpmct
Copy link
Member Author

bpmct commented Oct 18, 2022

Sure, we could do that instead.

@ammario
Copy link
Member

ammario commented Oct 18, 2022

I'll take a stab at this.

@ammario ammario self-assigned this Oct 18, 2022
@ammario
Copy link
Member

ammario commented Oct 20, 2022

As I was testing this behavior, I changed my username which then accidently deleted my dogfood development environment, including about an hour of unpushed work.

I'm convinced until we do a better job of preventing persistent resource deletion, we shouldn't allow changing usernames at all.

@BrunoQuaresma
Copy link
Collaborator

@ammario does it apply to admins as well?

@ammario
Copy link
Member

ammario commented Nov 6, 2022

@ammario does it apply to admins as well?

I go back on my statement that we should prevent username edits. I wrote this doc on Resource Persistence that should help people keep their data.

@ammario ammario removed their assignment Nov 14, 2022
@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Jan 14, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2023
@kylecarbs kylecarbs reopened this Jan 21, 2023
@github-actions github-actions bot removed the stale This issue is like stale bread. label Jan 22, 2023
@bpmct bpmct added bug and removed enterprise Enterprise-license / premium functionality labels Feb 9, 2023
@bpmct bpmct added s1 Bugs that break core workflows. Only humans may set this. and removed s0 Major regression, all-hands-on-deck to fix labels Mar 27, 2023
@matifali matifali added feature and removed s1 Bugs that break core workflows. Only humans may set this. bug labels Aug 27, 2023
@github-actions github-actions bot added the stale This issue is like stale bread. label Feb 24, 2024
@matifali
Copy link
Member

We should turn off username edits even for admins for SSO/OIDC/GitHub accounts.

@github-actions github-actions bot removed the stale This issue is like stale bread. label Feb 26, 2024
@sreya
Copy link
Collaborator

sreya commented Apr 4, 2024

I believe support we this already

@sreya sreya closed this as completed Apr 4, 2024
@matifali
Copy link
Member

matifali commented Apr 4, 2024

Admins can still edit their own usernames for OAuth accounts.

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

6 participants