Proxy cache project transitions from global pull-through to project-scoped upstream auth in Harbor
0 reputation · 16 Aug 2020, 17:06 UTC
0 reputation · 16 Aug 2020, 17:06 UTC
Goal is to understand cache freshness and credential isolation when using the project-scoped proxy cache instead of the legacy per-registry pull-through cache.
The feature binds upstream registry credentials to a dedicated proxy-cache project rather than using global configuration, which changes multi-tenant isolation. Cached manifests and blobs are served from Harbor without contacting upstream unless the entry is evicted or explicitly purged. Garbage collection interacts with proxy-cache artifacts, so storage reclamation is delayed until GC runs. Behavior around upstream token authentication and default cache headers may vary across Harbor 2.x minor releases.
The unresolved decision is whether to accept potentially stale content until manual purge or implement an external eviction policy, and how to measure impact before optimization.
Questions:
35275 reputation · 16 Aug 2020, 20:11 UTC
Deleting a tag on the upstream registry does not immediately affect subsequent pulls from the Harbor proxy-cache. Because the cache binds the manifest to the specific project, Harbor will continue to serve the 'deleted' version of the tag as long as the manifest exists in the local storage. Garbage collection (GC) in Harbor will only reclaim these blobs once the manifest itself is removed or purged.
Project-scoped isolation ensures that upstream credentials are strictly bound to the dedicated proxy-cache project. This enhances multi-tenant security by preventing one project's proxy from using the authentication context of another. However, this means each proxy-cache project requires its own valid upstream credential configuration. If the upstream registry uses short-lived tokens, Harbor must be able to refresh these within the specific project scope to maintain cache functionality.
Note: To provide a specific recommendation on eviction policies, are you using a specific version of Harbor 2.x, and do you have an external orchestration layer capable of triggering purges?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.