Replies: 2 comments 9 replies
-
I think philosophically, the mere act of binding an API into a workspace should be as cheap/simple for a service provider, as it is for the system itself. I wonder if providers can simply do some lazy initialization for any new workspaces where their API is bound, if they must have default objects, instead of this more complex flow. |
Beta Was this translation helpful? Give feedback.
-
There is another option for limiting the scope where the service's APIBinding can be created (on the service provider side). Consider that there is a controller called api-manager that automatically manages all APIBindings that are part of the service. The user (or CWT initializer) creates only the APIBinding of the api-manager. The controller then automatically creates additional APIBindings in the workspace (eg. Gitops, Build, etc... ). So, the idea is that the api-manager could check (in some CR) if the workspace is entitled to the service or not. Then, based on this information, it can decide if it will create the additional APIBindings or not. There is one requirement - the SA of the api-manager can be the only one who can bind the APIExports of the service in the user's workspace. |
Beta Was this translation helpful? Give feedback.
-
Currently a user must have
bind
permission (via RBAC) to create an APIBinding that references a specific APIExport. Thebind
permission is currently allowed via a ClusterRole that specifically mentions the APIExport by name (wildcards are not supported at this time - see #1939), such as:And here is an example ClusterRoleBinding that allows all authenticated users to bind to this APIExport:
We have an admission controller that enforces this
bind
verb requirement.We've recently had some discussions around taking additional information into account when authorizing APIBinding creation. One example scenario is where an API provider may want to allow or reject an APIBinding based on its containing workspace. For example, imagine this setup:
root:api-provider
root:users:alice
root:users:alice
)Some reasons why this might not be desirable, from the API provider's perspective:
root:users:bob
when bob creates his APIBinding, and they're happy knowing bob can't exceed the quota they setroot:users:bob
subtree, he can effectively get around the quota restrictionsDoes this resonate with folks? Is this something we should pursue?
Beta Was this translation helpful? Give feedback.
All reactions