-
Notifications
You must be signed in to change notification settings - Fork 32
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
Kubernetes SubjectAccessReview authz doesn't support using user's groups from Kubernetes TokenReview authn #506
Comments
I understand the request and in general I support this change. Just to clarify though, the groups returned in the TokenReview response not being automatically used by Authorino in the SubjectAccessReview is not a bug. It is by design. Authorino's authentication and authorization methods are not tight to each other. One can cambine whatever authentication method desired (e.g. TokenReview, API key, JWT, OAuth2, etc) to whatever authorization method desired (SubjectAccessReview, pattern matching, OPA, etc), including no method at all. Therefore it is up to AuthConfig owner to write it in a way that reuses data from one phase into the other, if that's what's needed to implement the use case. What's being asked here is to make the |
…uadrant#506 Signed-off-by: Dhiraj Bokde <[email protected]>
fix: add authorizationGroups property to K8s SAR authorization, fixes #506
Describe the bug
Kubernetes TokenReview Authn retrieves user group information. This group information is ignored when making Kubernetes SubjectAccessReview (SAR) call for authz. However, the API doc for SAR suggests that the groups passed in that call should be the list of user's groups. Otherwise it acts as an OR condition. I.e. access is authorized if the user has rolebindings that grant permissions, OR a static list of groups in AuthConfig has rolebindings, irrespective of whether the user is a member of the static list of groups or not.
Help us Reproduce it
Given the following in the namespace
odh-model-registries
:modelregistry-sample
modelregistry-sample-users
registry-user-modelregistry-sample
with a GET permission for the servicemodelregistry-sample
The following behavior is observed:
modelregistry-sample-users
from AuthConfig abovemodelregistry-sample-users
GroupExpected behavior
AuthConfig should add support for user defined expressions to get group information from a prior AuthN step in the pipeline. Which, will allow end users to create AuthConfig like:
Environment (please complete the following information):
Additional context
The test service and AuthConfig can be be replicated using the opendatahub modelregistry component at https://github.com/opendatahub-io/model-registry-operator. Or, any test service and group along with an AuthConfig similar to above can replicated this issue.
The text was updated successfully, but these errors were encountered: