Feat: implement OIDC flow#1007
Open
NishchayRajput wants to merge 3 commits into
Open
Conversation
Signed-off-by: Nishchay Rajput <nishchayr@iitbhilai.ac.in>
Signed-off-by: Nishchay Rajput <nishchayr@iitbhilai.ac.in>
Contributor
Author
|
@bupd Please have look at the idea. We may also required changes on harbore-core using existing oidc flow still required still needed few changes like polling state to get the id_token and other details. It's not completed yet but wanted you to have a look and design level decisions. PS: ignore lint for now :) |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1007 +/- ##
=========================================
- Coverage 10.99% 9.62% -1.37%
=========================================
Files 173 322 +149
Lines 8671 16280 +7609
=========================================
+ Hits 953 1567 +614
- Misses 7612 14542 +6930
- Partials 106 171 +65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Suggestion:
Please let me know if you have more suggestion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds work-in-progress OIDC login support for
harbor-clitogether with the Harbor Core changes needed to support that flow.Current implementation allows
harbor-clito start an OIDC login through Harbor Core, return a browser login URL, poll Harbor Core for completion using OIDCstate, store the returned credential locally, and use bearer authentication for later API requests.This change is needed because Harbor currently supports browser-based OIDC login, but
harbor-clidoes not yet have a native OIDC login flow. The current implementation is still being actively worked on and is not final yet.Type of Change
Please select the relevant type.
Changes
harbor login <server> --oidcGET /c/oidc/login?mode=cliGET /c/oidc/cli-token?state=...auth-typeid-tokenrefresh-tokenexpires-atstate-based polling contractFlow Diagram
Video
Screencast.from.21-06-26.04.07.57.PM.IST.webm