-
Notifications
You must be signed in to change notification settings - Fork 320
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
f[WIP] eat(sdf): Protect Admin Routes behind a new Administer role #5007
base: main
Are you sure you want to change the base?
Conversation
We have an admin page controlled by a feature flag. We locked the API endpoints down to be those with systeminit.com emails, but we want to take advantage of spicedb to make this work correctly Even if a user gets to the WorkspaceAdmin page, we have locked down all of the API endpoints for them based on a new role in spicedb This role will be manually granted and can be done so using the following Zed cli command: ``` zed relationship create system:system admin administer:<user_pk> ``` This will be granted by TechOps on the SystemInitiative users that need access to it so that it can be tracked correctly
7d1e93a
to
e2746c8
Compare
} | ||
|
||
#[derive(Clone, Copy, strum::Display, Debug)] | ||
#[strum(serialize_all = "snake_case")] | ||
pub enum Relation { | ||
Approver, | ||
Owner, | ||
Admin, |
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.
You know - I actually wonder if owner
can also just work here. Only it'd be owner
of the system vs the workspace
@@ -206,6 +209,10 @@ impl PermissionBuilder { | |||
self.object(ObjectType::Workspace, id) | |||
} | |||
|
|||
pub fn system_object(self) -> Self { | |||
self.object(ObjectType::System, "system") |
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.
Do we ever want different permission sets for different systems? Maybe this should be "sdf"
ok after talking this over with @sprutton1 and @britmyerss we are going to do the following:
|
We have an admin page controlled by a feature flag. We locked the API endpoints down to be those with systeminit.com emails, but we want to take advantage of spicedb to make this work correctly
Even if a user gets to the WorkspaceAdmin page, we have locked down all of the API endpoints for them based on a new role in spicedb
This role will be manually granted and can be done so using the following Zed cli command:
This will be granted by TechOps on the SystemInitiative users that need access to it so that it can be tracked correctly