-
Notifications
You must be signed in to change notification settings - Fork 47
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
RBAC: access denied - cannot access notebook created in my namespace #120
Comments
Additional context:
I think fixing that should fix the issue |
@bgalvao are the notebooks the only places you are seeing "RBAC: Access Denied" errors? For example, is this user able to browse the dashboard in that namespace, and view pipelines? |
Hey @thesuperzapper, yes that is the only place.
(I disabled KF pipelines for this instance of deployKF as my team does not use them.) Update:
Is there any pod which logs I should take a look at? |
@thesuperzapper ns-owner-access-istio AuthorizationPolicyapiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
annotations:
role: admin
user: admin@example.com
name: ns-owner-access-istio
namespace: bernardo-galvao
spec:
rules:
- when:
- key: request.headers[kubeflow-userid]
values:
- - admin@example.com
+ - bernardo.galvao@pumpkinai.com
- when:
- key: source.namespace
values:
- bernardo-galvao
- to:
- operation:
paths:
- /healthz
- /metrics
- /wait-for-drain
- from:
- source:
principals:
- cluster.local/ns/kubeflow/sa/notebook-controller-service-account
to:
- operation:
methods:
- GET
paths:
- '*/api/kernels' Profile
apiVersion: kubeflow.org/v1
kind: Profile
metadata:
finalizers:
- profile-finalizer
name: bernardo-galvao
spec:
owner:
kind: User
- name: admin@example.com
+ name: bernardo.galvao@pumpkinai.com That being said, I have not looked into the internals of deployKF, but there seems to be an override Authorization policy that is perhaps supposed to be updated with an authorize action for my user ( ns-owner-access-istio--override
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
name: ns-owner-access-istio--override
namespace: bernardo-galvao
spec:
action: DENY
rules:
- from:
- source:
notPrincipals:
- cluster.local/ns/deploykf-istio-gateway/sa/deploykf-gateway
when:
- key: request.headers[kubeflow-userid]
values:
- admin@example.com Also, when I tried to add my own email as the ownerEmail of profile, like this deploykf_profiles_generator:
users:
- id: bernardo-galvao
email: "bernardo.galvao@pumpkinai.com"
profiles:
- name: bernardo-galvao
ownerEmail: bernardo.galvao@pumpkinai.com
members:
- user: bernardo-galvao
access:
role: edit
notebookAccess: true that is not something that is allowed:
meaning that it uses the default admin@example.com. Sorry for the long comment, I wanted to be as detailed as possible. The project deployKF is awesome and I want to see it grow! Update: I finally found the issue kubeflow/dashboard#33 👍🏼 |
@bgalvao I know it's a bit confusing you should NOT set yourself as "owner" of any profiles. You should not even change it from I will probably actually remove the ability to set an owner, because it just causes to many problems:
|
@bgalvao either way, you should never be messing with the AuthorizationPolicies. Can you confirm if you were previously trying to set the profile owners with a deploKF value? Also, you should revert those changes by re-generating your manifests, and syncing (with prune enabled). |
Yeah, but some validator did not allow to use an email that was already set for a user, so I reverted it. The fix for the behavior I wanted anyway is in the workaround mentioned in kubeflow/dashboard#33, so it is good that way for us. Thanks :) (imo this can be closed) |
@bgalvao I strongly believe your issue will have been related to not pruning correctly. I have updated (#123) the sync script to require pruning (previously if you did not respond to the prompt, it would skip pruning, which could break authentication is strange ways). Update to the latest version of the sync script found in |
Checks
deployKF Version
0.1.4
Kubernetes Version
Description
I was trying to access a notebook I created, but surprisingly I was denied access to the notebook in my own namespace / profile.
Relevant Logs
Don't know where to look for relevant logs (some kyverno pod?), but I'm happy to be instructed and update this field with the relevant logs.
deployKF Values (Optional)
The text was updated successfully, but these errors were encountered: