-
Notifications
You must be signed in to change notification settings - Fork 885
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
authorize requests to ml-pipeline endpoint if contains any trusted principals #2753
authorize requests to ml-pipeline endpoint if contains any trusted principals #2753
Conversation
Looks like it's good to merge, but can you sign-off the commit? |
@rimolive I'm adding tests for gh-actions to run a test pipeline from kf notebook. I have things worked out already, just doing some small cosmetical changes. I'll have it ready in a few hours. Then I'll push to this PR and we should be good to merge. |
7797226
to
e5a45ef
Compare
…incipals Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
Signed-off-by: Krzysztof Romanowski <[email protected]>
1e5473a
to
10134df
Compare
Signed-off-by: Krzysztof Romanowski <[email protected]>
Hey, so the scope of changes and acceptance criteria seems to be complete but it seems we've hit some limitation of the underlying infra...
I'm not sure how to proceed from this moment. The test right now fails if the pipeline fails but the test itself can as well just focus on if the pipeline run was successfully created from KF Notebook with plain @rimolive , @juliusvonkohout , any advice? Do you consider we can drop the requirement to fail the gh action if kf pipeline failed? |
Signed-off-by: Krzysztof Romanowski <[email protected]>
@rimolive , @juliusvonkohout, I know the time is short so I changed the test for now to accept failure of pipeline run. The main goal of verifying if Pipeline Run can be started from KF Notebook without any additional configuration to the If you accept it in this form, feel free to merge. If not, let me know so I can revert the last commit. Also, I added @juliusvonkohout to my repository because in just a few hours I'm going for a little weekend retreat and I'm not going to be available. If time is critical, feel free to make changes on the branch/PR directly. |
Oh, but now the test has succeeded and the pipeline run didn't fail... Ok, if this fails only sometimes, I prefer to have the test failed if the pipeline failed. We can always retry.
|
This reverts commit 32323a4. Signed-off-by: Krzysztof Romanowski <[email protected]>
1bc3d72
to
205db93
Compare
Now it randomly failed again.
https://github.com/kubeflow/manifests/actions/runs/9612888226?pr=2753 Can somebody retry, please? |
Thank you very much. At least we have a test now, which is better than the previous state. |
@kimwnasptd any objections? |
notValues: ['*'] | ||
- from: | ||
- source: | ||
requestPrincipals: ["*"] # allow access by any trusted principal |
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 is the important thing to approve. The rest is rather straightforward.
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.
@kimwnasptd wants it in #2747 (comment) so it should be approved by him.
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.
Agree with the changes, although these should be reflected in the kubeflow/pipelines
project and not directly in the manifests repo
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, can you track that with them? Otherwise it will break in the next synchronization.
@rimolive i will review this PR until Monday July 1 first. |
@KRomanov we also need negative test to check that it does not work without the proper token, but just the faked userid header. /lgtm since we have to get RC.2 ready and Kimonas approved it in #2747 (comment). We have to do a full assessment next week. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juliusvonkohout The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Pull Request Template for Kubeflow manifests Issues
Summary
Allow access to ml-pipeline endpoint if the request contains any trusted principal.
Due to changes introduced in #2544, the
kubeflow-userid
header is always populated withuser
/machine
details. This is in conflict with theAuthorizationPolicy/ml-pipeline
which is configured to only allow access fromistio-ingressgateway
and also block if thekubeflow-userid
header is present. In the past it was made like so for security reason to block header injection, which might a form of attacking the KFP API.With the changes introduced in the beforementioned PR, Istio will now always verify if the request is authenticated through JWT and will always put the
email
orsub
claim in the header, mitigating the attack through header injection and enforcing user authentication.Because of that, the
AuthorizationPolicy/ml-pipeline
has to be updated to allow API Access from in-cluster KF Notebook from any user authorized with JWT.✏️ A brief description of the changes
AuthorizationPolicy/ml-pipeline
to allow access if the request contains any trusted principal.AuthorizationPolicy/ml-pipeline
across thekubeflow/manifests
repository so this has to be made in a few places.PodDefaults
allowing access toml-pipeline
.🐛 If this PR is related to an issue, please put the link of the issue here.
✅ Unit Test Checklist
✅ Contributor checklist
DCO
check)cla/google
check)