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

Limit how a user becomes an admin #2153

Closed
humphd opened this issue Apr 15, 2021 · 4 comments
Closed

Limit how a user becomes an admin #2153

humphd opened this issue Apr 15, 2021 · 4 comments
Labels
area: microservices type: enhancement New feature or request type: security Security concerns

Comments

@humphd
Copy link
Contributor

humphd commented Apr 15, 2021

We have the concept of an admin role in the User and Auth services, in the front-end, etc. In Firebase it's a boolean, isAdmin: true|false. We need to tighten how a user becomes an admin.

You shouldn't be able to POST that data to the Users service (we should ignore it). The current system is too loose.

@humphd
Copy link
Contributor Author

humphd commented Apr 23, 2021

POST /:id   - a user who owns id, or admin, or service (exclude isAdmin)
PUT /:id   - a user who owns id, or admin, or service (exclude isAdmin)
PUT /:id/admin - only an admin can do this?

@humphd
Copy link
Contributor Author

humphd commented Oct 9, 2021

Based on the changes I just made in #2344, we can probably do this by insisting that only an admin (super user via env, or existing admin) can update an existing user to an Admin in the db. The work in #2153 is heading in this direction, we just need to finish it.

@humphd
Copy link
Contributor Author

humphd commented Jan 5, 2022

@chrispinkney and @manekenpix started this work in #2239, and we can likely build on the initial PR there to get this done, once the users backend is in place.

@humphd
Copy link
Contributor Author

humphd commented Feb 23, 2022

In #3030 I'm suggesting that we use GitHub OAuth with org/team membership to define our admins. Closing this in favour of that.

@humphd humphd closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: microservices type: enhancement New feature or request type: security Security concerns
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants