Skip to content

Create lesser admin role #2135

Closed
Closed

Description

@ammario

Problem statement

Our admin user has full shell access to every workspace, letting them steal secrets and manipulate workspaces at will. We have clear instructions from our customers that this is a Big Bad. Our major deployments will disable the existing admin users and will want a lesser admin role.

Definition of done

There is a lesser role than the current admin role, without the ability to enter the workspace's terminals. The current admin role is renamed to something more specific.

Suggestions

I propose we rename "admin" to "root" or "deployer". I prefer "root" since everyone knows you're not supposed to use "root", except transiently. Everyone also knows "root" is dangerous.

There is some precedent for this pattern in GitHub Enterprise, which has a special deployer access panel that is not associated with any user.

cc @Emyrk

Originally posted by @ammario in #2108 (comment)

Activity

  1. added
    siteArea: frontend dashboard
    apiArea: HTTP API
    on Jun 7, 2022
  2. Emyrk commented on Jun 7, 2022

    @Emyrk
    Member

    @ammario do you also think we should add an admin role that is different than root?

    We can limit the admin role.

  3. spikecurtis commented on Jun 7, 2022

    @spikecurtis
    Collaborator

    I think it's useful to draw a distinction between roles and users here. "root" is a user, and in our system today, "admin" is a role.

  4. spikecurtis commented on Jun 7, 2022

    @spikecurtis
    Collaborator

    Some organizations might prefer to deploy with a single "root" user that has the "admin" role, and everyone else, even people who operate the coder deployment day to day have a less powerful role, but I don't think it's universal. We don't currently have the concept of "sudo" in our API, CLI, or Web UI, so it's adding a lot more friction if the operators need to log out and log back in as root to do stuff.

  5. ammario commented on Jun 7, 2022

    @ammario
    MemberAuthor

    @ammario do you also think we should add an admin role that is different than root?

    We can limit the admin role.

    Yes. It's unnecessary for MVP but if it's an easy add might as well.

    I think it's useful to draw a distinction between roles and users here. "root" is a user, and in our system today, "admin" is a role.

    I'm proposing root as a role and not a user. I understand it's a user in Linux. It's easier on the user if we reuse our concept of role instead of creating a new concept of sacred users. If we want to restrict these powers to one user, we could make a special rule around the role that when it's assigned the other assignee is deauthorized.

    Some organizations might prefer to deploy with a single "root" user that has the "admin" role, and everyone else, even people who operate the coder deployment day to day have a less powerful role, but I don't think it's universal. We don't currently have the concept of "sudo" in our API, CLI, or Web UI, so it's adding a lot more friction if the operators need to log out and log back in as root to do stuff.

    The people who operate the deployment day-to-day will probably use a lesser role based on our current customer behavior. There is friction of logging out and in. The GitHub Enterprise management console has the same problem. A "sudo" could help but I can't think of a product that does that, probably because people don't need god powers that frequently.

  6. spikecurtis commented on Jun 7, 2022

    @spikecurtis
    Collaborator

    If root is a role and not a user, then I don't think I understand how we're proposing this gets used. Can you provide a worked example of what users would exist and what role(s) they would have?

    For example

    User Roles Description
    danni member Danni is a developer who creates workspaces and nothing else
    oscar ??? Oscar is on the dev tools team and manages the coder deployment
    ??? root ???
  7. ammario commented on Jun 7, 2022

    @ammario
    MemberAuthor

    If root is a role and not a user, then I don't think I understand how we're proposing this gets used. Can you provide a worked example of what users would exist and what role(s) they would have?

    What I have in mind is the first user is given this root role instead of admin. The MVP is just a rename of the "admin" role, a change to a string constant. As a follow-up, we could create a lesser admin role. Perhaps admin can update, stop and delete workspaces but not shell into them. We should discuss the ideal admin role elsewhere though.

  8. spikecurtis commented on Jun 7, 2022

    @spikecurtis
    Collaborator

    What I have in mind is the first user is given this root role instead of admin.

    I feel like this conflicts with:

    I prefer "root" since everyone knows you're not supposed to use "root", except transiently. Everyone also knows "root" is dangerous.

  9. ammario commented on Jun 7, 2022

    @ammario
    MemberAuthor

    By first user I mean the one generated by coderd on startup. It is standard for a product's first user to be given god powers. I can't think of a product that doesn't do that.

  10. spikecurtis commented on Jun 7, 2022

    @spikecurtis
    Collaborator

    Is it standard for that first user login to not be an actual person?

    Like, if I, Spike, am setting up a coder deployment, do I name that first user "Spike" and have it be my actual username going forward? If so, then giving it a role called root feels wrong for exactly the reason that it feels dangerous.

    If I'm not expected to name it "Spike", and it has god powers that I shouldn't use, then why don't we just name it "root" automatically?

  11. spikecurtis commented on Jun 7, 2022

    @spikecurtis
    Collaborator

    Cloud services like GitHub tend to go with a role called "Owner" for the person who sets things up. I've never seen anything indicating that Owner is dangerous in docs or the site.

    OTOH, AWS has a "management account" with godlike powers and actively dissuades people from using it in everyday life: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_best-practices_mgmt-acct.html

  12. ammario commented on Jun 7, 2022

    @ammario
    MemberAuthor

    @spikecurtis GitHub's self-installed Enterprise has a Management Console with god-like powers. You can even SSH into the instance. God is far more dangerous in Coder than in applications like GitHub. In Coder, you can steal everyone's secrets and impersonate them.

    As for the name of the first user, if we go down the root role route then making sure it's named root or similar makes sense.

    owner can mean the same thing, but it seems less dangerous and is typically a role you would wear on your main user.

  13. ketang commented on Jun 8, 2022

    @ketang
    Contributor

    Maybe we should take a step back and consider if we should give any user, no matter how thoroughly authorized, the ability to view everyone's secrets.

    I like the idea of keeping the regular old admin user but only giving them super powers if they do the equivalent of sudo. It would be either time or operation limited and come with a scary banner or CLI colors or what have you.

    A "sudo" could help but I can't think of a product that does that, probably because people don't need god powers that frequently.

    This doesn't make sense to me. It seems like the logic would go the other way. If you need god powers infrequently, the added step would be little issue. If you need them frequently, then you'd dislike the extra step every time.

    They don't use the exact same terminology, but Rippling has a mode switch between regular user and admin mode.

    This seems like something that should get customer input. We're relying too much on our own opinions here.

  14. 8 remaining items

  15. tjcran commented on Jun 13, 2022

    @tjcran

    I like that suggestion @Emyrk. we make stronger warnings now, but leave god-mode admin labelled as admin. and then in the future when we have more better representative roles for things, admin is really only there for the initial setup and nobody else has full admin and it's not recommended to be used, ever.

  16. ammario commented on Jun 30, 2022

    @ammario
    MemberAuthor

    @mark-theshark just cited a customer concern with our god-mode admin. Whether or not we rename the roles, we should add the lesser role soon since it's easy.

    I have no idea what to call this lesser role other than admin. We could use "superadmin" or "owner" for the root role.

  17. changed the title [-]Rename "admin" role to "root"[/-] [+]Create lesser admin role[/+] on Jun 30, 2022
  18. added
    enterpriseEnterprise-license / premium functionality
    on Jun 30, 2022
  19. removed
    enterpriseEnterprise-license / premium functionality
    on Jul 21, 2022
  20. ammario commented on Jul 21, 2022

    @ammario
    MemberAuthor

    I believe this is too basic to be considered enterprise. Most deployments with >10 users will want this.

  21. self-assigned this
    on Aug 12, 2022
  22. Emyrk commented on Aug 12, 2022

    @Emyrk
    Member

    There doesn't seem to be consensus on the admin role. However, I think we can make steps towards a solution by creating roles for the things we create admin users for.

    For example, it might be a good idea to have a "template-manager" role added that can create and edit all templates site wide. So we don't need to promote users to "admin" to get that functionality.

    Opinions? @spikecurtis @ammario @ketang
    #3490

  23. tjcran commented on Aug 12, 2022

    @tjcran

    There doesn't seem to be consensus on the admin role.

    God mode: full access to everything under the sun
    Admin: can't shell into other users stuff, but can crud users, templates, workspaces, and has control over all deployment settings
    Template admin: site-wide template management ability.

    @Emyrk does that seem reasonable?

  24. ammario commented on Aug 12, 2022

    @ammario
    MemberAuthor

    I spoke with @Emyrk and @f0ssel about this, and we decided on this matrix:

    image

    PR by @Emyrk incoming...

  25. Emyrk commented on Aug 16, 2022

    @Emyrk
    Member

    Last question. We have User admin, Template Admin, and the god Owner. The 1 thing lacking, is that only an Owner can promote other users to various roles.

    What role should be able to give the User/Template admin role so that we don't need any Owners? Should we just allow User Admins to give the roles? Which means they are also effectively Template Admins?

    @bpmct @tjcran

  26. ammario commented on Aug 16, 2022

    @ammario
    MemberAuthor

    @Emyrk — Let's stick with the owner managing roles for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apiArea: HTTP APIsiteArea: frontend dashboard

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions