goharbor / goharbor/harbor-cli
[feature]: Harbor CLI OIDC auth (LFX Term-2, June-Augut 2026)
- Dominant language
- Go
- Stars
- 163
- Forks
- 211
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
## Problem
`harbor-cli` currently supports username/password login, but it does not support native OIDC login.
This becomes a problem when Harbor is configured to use OIDC as the primary authentication mode. In that setup, users can log in to Harbor through the browser, but `harbor-cli` cannot initiate and complete a comparable OIDC flow.
From a user point of view, the missing capability is:
```sh
harbor login --oidc
```
where the CLI can guide the user through an OIDC login flow and then store a usable credential for subsequent Harbor API calls.
This work is also being pursued as part of **LFX Mentorship Term 2 2026**, so I am actively implementing and iterating on this feature.
---
This issue adds work-in-progress OIDC login support for harbor-cli together with the Harbor Core changes needed to support that flow.
Current implementation in #1007 & [Habor - #24421](https://github.com/goharbor/harbor/pull/23421) allows harbor-cli to start an OIDC login through Harbor Core, return a browser login URL, poll Harbor Core for completion using OIDC state, 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-cli does not yet have a native OIDC login flow. The current implementation is still being actively worked on and is not final yet.
Contributor guide
Assessment
This issue has not been assessed yet.