-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add access control to Organizations #17
Conversation
Also rework abstraction for authorization to reduce code duplication
I may have gone overboard with the test. The actual code change is quite minimal |
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.
implementation lgtm
@@ -2,6 +2,8 @@ package organization | |||
|
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.
This file has gotten quite large. Maybe we can split it up based on the verb, if that makes sense?
e.g. organization_get_test.go
, organization_update_test.go
etc.
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.
Yes that file got a bit large. I'll try to split it up.
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.
LGTM
Summary
Adds access control for organizations. This works by checking with the k8s API server if the action is allowed on a
organizations.rbac.appuio.io
resource. Watch and list only return objects that the user is also allowed to get.See https://kb.vshn.ch/appuio-cloud/references/architecture/control-api-org.html#_access_control
OrganizationMembers and RoleBindings will be handled in separate PRs
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog.