Add Harbor fallback for catalog and search endpoints#617
Open
pguinet wants to merge 2 commits intoFinsys:mainfrom
Open
Add Harbor fallback for catalog and search endpoints#617pguinet wants to merge 2 commits intoFinsys:mainfrom
pguinet wants to merge 2 commits intoFinsys:mainfrom
Conversation
Harbor denies access to the V2 _catalog endpoint for robot accounts
(scope registry:catalog:* returns an empty JWT). This adds automatic
Harbor detection and falls back to the native Harbor project API
(/api/v2.0/projects/{name}/repositories) for both catalog listing
and image search.
- Detect Harbor via WWW-Authenticate header + /api/v2.0/ping (cached 5min)
- List repositories through Harbor project API with pagination
- Search repositories using Harbor's q=name=~ filter
- Transparent fallback: no configuration change required
Fixes Finsys#360
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jotka
reviewed
Feb 20, 2026
src/lib/server/docker.ts
Outdated
| return { baseUrl, orgPath: parsed.path, authHeader }; | ||
| } | ||
|
|
||
| // --- Harbor fallback pour le catalog et la recherche d'images --- |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
_catalogendpoint (scoperegistry:catalog:*returns an empty JWT), making catalog browsing and image search non-functional for Harbor registries/api/v2.0/projects/{name}/repositories) for both catalog listing and image searchWWW-Authenticateheader and/api/v2.0/ping, with a 5-minute cacheChanges
src/lib/server/docker.tsisHarborRegistry(): detect Harbor viaWWW-Authenticate+/api/v2.0/ping(result cached 5 min)harborListRepositories(): list repos through Harbor project API with pagination supportharborSearchRepositories(): search repos using Harbor'sq=name=~{term}filterHarborCatalogResulttype +getHarborBasicAuth()helpersrc/routes/api/registry/catalog/+server.ts_catalogcall, delegates tohandleHarborCatalog()src/routes/api/registry/search/+server.tssearchCatalog(), delegates toharborSearchRepositories()Test plan
fnsys/dockhand:harbor-fixFixes #360
🤖 Generated with Claude Code