Allow the Identity Provider to be the primary auth method in Harbor.
When primary auth is enabled, The IDP other than the DB becomes the default way for users to login. The login screen where the user selects to login via the identity provider or via local DB will automatically redirect the user to this identity provider. Login via DB is possible when visiting the url '/account/sign-in' explicitly.
https://user-images.githubusercontent.com/1492007/203007280-01db3185-3202-4748-a59c-5807a961e3ca.mp4
Please indicate you've done the following:
- [x] Well Written Title and Summary of the PR
- [x] Label the PR as needed. release-note/new-feature
- [x] Accepted the DCO. Commits without the DCO will delay acceptance.
- [x] Made sure tests are passing and test coverage is added if needed.
- [x] Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.
Codecov Report
Merging #17627 (dabbc7f) into main (ff9dcd5) will increase coverage by
0.01%. The diff coverage is37.50%.
@@ Coverage Diff @@
## main #17627 +/- ##
==========================================
+ Coverage 66.57% 66.58% +0.01%
==========================================
Files 999 999
Lines 108091 108131 +40
Branches 2577 2579 +2
==========================================
+ Hits 71958 72003 +45
+ Misses 32174 32168 -6
- Partials 3959 3960 +1
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 66.58% <37.50%> (+0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...left-side-nav/config/auth/config-auth.component.ts | 29.09% <ø> (ø) |
|
| .../shared/router-guard/auth-user-activate.service.ts | 20.00% <0.00%> (-3.08%) |
:arrow_down: |
| src/portal/src/app/shared/services/interface.ts | 72.72% <ø> (ø) |
|
| src/server/v2.0/handler/systeminfo.go | 0.00% <0.00%> (ø) |
|
| src/controller/systeminfo/controller.go | 63.49% <100.00%> (+0.58%) |
:arrow_up: |
| ...portal/src/app/base/left-side-nav/config/config.ts | 100.00% <100.00%> (ø) |
|
| src/portal/src/app/services/app-config.ts | 100.00% <100.00%> (ø) |
|
| src/common/rbac/system/namespace.go | 35.29% <0.00%> (-11.77%) |
:arrow_down: |
| ...es/vulnerability/vulnerability-config.component.ts | 54.07% <0.00%> (-4.45%) |
:arrow_down: |
| ...ortal/src/app/shared/pipes/harbor-datetime.pipe.ts | 32.00% <0.00%> (-4.00%) |
:arrow_down: |
| ... and 5 more |
@tpoxa can you please help to give more details on this PR?
@wy65701436 well, oidc users always have to make an extra click time during sign-in; when this option is on, UI should redirect to the oidc provider directly. That was the plan.
That's great!!! @Vad1mo @tpoxa
LGTM
@stonezdj can you approve again
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.
@tpoxa Please cd src/portal, then run npm run lint_fix to fix any lint-errors, then you can pass the UI-UT check.
@Vad1mo I had a try on my own env. This looks fine to me
@yanji09 does this fix api calls for idp users as well?
@tpoxa @Vad1mo Is this feature available for API as well ?