-
Notifications
You must be signed in to change notification settings - Fork 12
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
[IA-5060] Inherit manager roles to notebook-cluster and persistent-disk #1535
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b24e5fd
Fix Leo access control
rtitle 6b0a73d
Remove list_persistent_disk
rtitle 010002f
Don't remove google-project actions just yet
rtitle 8af11cb
Make sure to add set_parent
rtitle a6f126d
Remove authDomainConstrainable from the top level
rtitle 51acf0d
Shared apps should be auth domain constrainable too
rtitle f73189f
empty
rtitle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,8 @@ resourceTypes = { | |
wds-instance = ["owner"] | ||
kubernetes-app = ["manager"] | ||
kubernetes-app-shared = ["owner", "user"] | ||
notebook-cluster = ["manager"] | ||
persistent-disk = ["manager"] | ||
} | ||
} | ||
application = { | ||
|
@@ -606,6 +608,12 @@ resourceTypes = { | |
reuseIds = false | ||
} | ||
google-project = { | ||
# TODO: remove the following actions when notebook-cluster and persistent-disk have migrated to have parent resources. | ||
# - list_notebook_cluster | ||
# - delete_notebook_cluster | ||
# - stop_start_notebook_cluster | ||
# - list_persistent_disk | ||
# - delete_persistent_disk | ||
actionPatterns = { | ||
read_policies = { | ||
description = "list all policies and policy details for this google-project" | ||
|
@@ -660,6 +668,8 @@ resourceTypes = { | |
includedRoles = ["notebook-user", "pet-creator"] | ||
descendantRoles = { | ||
kubernetes-app = ["manager"] | ||
notebook-cluster = ["manager"] | ||
persistent-disk = ["manager"] | ||
} | ||
} | ||
notebook-user = { | ||
|
@@ -790,6 +800,7 @@ resourceTypes = { | |
} | ||
connect = { | ||
description = "connect to the Jupyter notebook running on the notebook cluster" | ||
authDomainConstrainable = true | ||
} | ||
delete = { | ||
description = "delete the notebook cluster" | ||
|
@@ -803,22 +814,29 @@ resourceTypes = { | |
modify = { | ||
description = "modify attributes of the cluster" | ||
} | ||
set_parent = { | ||
description = "set parent of notebook cluster" | ||
} | ||
} | ||
ownerRoleName = "creator" | ||
roles = { | ||
creator = { | ||
roleActions = ["status", "connect", "delete", "read_policies", "stop_start", "modify"] | ||
roleActions = ["status", "connect", "delete", "read_policies", "stop_start", "modify", "set_parent"] | ||
} | ||
manager = { | ||
roleActions = ["status", "delete", "read_policies"] | ||
} | ||
} | ||
reuseIds = false | ||
} | ||
persistent-disk = { | ||
actionPatterns = { | ||
read = { | ||
description = "read metadata and contents of persistent disk" | ||
description = "read metadata of persistent disk" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
attach = { | ||
description = "attach persistent disk to a VM" | ||
authDomainConstrainable = true | ||
} | ||
modify = { | ||
description = "modify persistent disk" | ||
|
@@ -829,11 +847,17 @@ resourceTypes = { | |
read_policies = { | ||
description = "view all policies and policy details for the persistent disk" | ||
} | ||
set_parent = { | ||
description = "set parent of persistent disk" | ||
} | ||
} | ||
ownerRoleName = "creator" | ||
roles = { | ||
creator = { | ||
roleActions = ["read", "attach", "modify", "delete", "read_policies"] | ||
roleActions = ["read", "attach", "modify", "delete", "read_policies", "set_parent"] | ||
} | ||
manager = { | ||
roleActions = ["delete", "read", "read_policies"] | ||
} | ||
} | ||
reuseIds = false | ||
|
@@ -845,6 +869,7 @@ resourceTypes = { | |
} | ||
connect = { | ||
description = "connect to kubernetes application" | ||
authDomainConstrainable = true | ||
} | ||
update = { | ||
description = "update kubernetes application" | ||
|
@@ -883,6 +908,7 @@ resourceTypes = { | |
} | ||
connect = { | ||
description = "connect to kubernetes application" | ||
authDomainConstrainable = true | ||
} | ||
update = { | ||
description = "update kubernetes application" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I am a bit confused about how granular the authDomainConstrainable is here. I thought that every resources / actions would inherit that configuration from the workspace after Doug's PR
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.
My understanding was you still have to annotate which actions on the child are authDomainConstrainable (like
connect
). @dvoet can you confirm?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.
@rtitle is correct. The auth domain is inherited but which actions have the auth domain applied is controlled by the
authDomainConstrainable
setting.