Improve robustness of admin role checks #32
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
High Priority
invalid
question
reproduction needed
schema-fix-required
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ClassClock/API#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently whether the user is an admin is determined by the string name of their role. This is reasonably secure since these are created in Auth0 by the super admin, so it would be very hard for an attacker to somehow mess with that, however, this should Ideally not be done this way because it is certifiably jank ™️.
a better way may be to have the super admin provide the
Role IDvalues from auth0 as an environment variable to be used for comparisons. i.e. there could be env vars such asCLASSCLOCK_SUPERADMIN_ROLE_IDandCLASSCLOCK_SCHOOL_ADMIN_ROLE_ID. This would allow for future UI's to be created for the superadmin to be able to assign admins to schools on their instance and may be required for an open source release