You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the error from ValidateScopeRestrictions when trying to create a scoped token for namespaces a, b, and c:
error: '[role:cryostat-operator-oauth-client:a not found in [user:info user:check-access user:list-scoped-projects user:list-projects], role:cryostat-operator-oauth-client:a does not use an approved namespace, role:cryostat-operator-oauth-client:b not found in [user:info user:check-access user:list-scoped-projects user:list-projects], role:cryostat-operator-oauth-client:b does not use an approved namespace]'errorCauses:
- error: '[role:cryostat-operator-oauth-client:a not found in [user:info user:check-access user:list-scoped-projects user:list-projects], role:cryostat-operator-oauth-client:a does not use an approved namespace]'errorCauses:
- error: role:cryostat-operator-oauth-client:a not found in [user:info user:check-access user:list-scoped-projects user:list-projects]
- error: role:cryostat-operator-oauth-client:a does not use an approved namespace
- error: '[role:cryostat-operator-oauth-client:b not found in [user:info user:check-access user:list-scoped-projects user:list-projects], role:cryostat-operator-oauth-client:b does not use an approved namespace]'errorCauses:
- error: role:cryostat-operator-oauth-client:b not found in [user:info user:check-access user:list-scoped-projects user:list-projects]
- error: role:cryostat-operator-oauth-client:b does not use an approved namespace
Looking at the OAuthClient, it has a scope restriction requiring the role scopes be in c. The docs indicate this is by design:
You can use a service account as a constrained form of OAuth client. Service accounts can request only a subset of scopes that allow access to some basic user information and role-based power inside of the service account’s own namespace
The OAuth proxy lets us use a custom OAuthClient, but I'm not sure how useful this would be since it limits the permission check to one in the openshift-delegate-urls option. I'm not sure if we could express something like checking for pod/exec in namespaces A and B.
In order to allow Cryostat to get a scoped token across additional namespaces, we can't use a Service Account as an OAuth client.
Originally posted by @ebaron in https://github.com/cryostatio/cryostat/issues/1188#issuecomment-1483219220
The text was updated successfully, but these errors were encountered: