You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🔄 refactor(registries): route to credentialed instance + fail loud on rejected creds
- Stop seeding anonymous '<provider>.public' default when the user has
configured at least one credentialed instance (any of token, password,
auth, clientemail, privatekey, accesskeyid, secretaccesskey) — the
credentialed instance handles all traffic for that provider.
- Replace non-deterministic Object.values().find() image-to-registry
routing with explicit priority: credentialed beats anonymous, alpha
tie-break within tier. Log routing decisions at debug.
- Remove silent anonymous fallback in authenticateBearerFromAuthUrlWithPublicFallback
when credentials are rejected with 401/403. Now throws an actionable
error so the UI's existing 'Check failed' badge surfaces the auth
problem instead of cascading into anonymous-tier 429s.
Root cause of issue #342: a default '.public' instance plus the
credentialed instance both registered for the same provider, with
JS-engine insertion order picking the winner. When the anonymous
instance won, all traffic hit the anonymous-tier rate limit despite
the user having a valid PAT, and credential rejection failures were
swallowed silently so the user had no way to diagnose.
Fixes: GH-342
Copy file name to clipboardExpand all lines: app/registries/BaseRegistry.test.ts
+13-51Lines changed: 13 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -433,16 +433,10 @@ test('authenticateBearerFromAuthUrl should throw when token is missing', async (
433
433
).rejects.toThrow('token endpoint response does not contain token');
434
434
});
435
435
436
-
test('authenticateBearerFromAuthUrlWithPublicFallback should retry without credentials and honor providerLabel',async()=>{
436
+
test('authenticateBearerFromAuthUrlWithPublicFallback should throw actionable error (not silently retry) when credentials are rejected with 401',async()=>{
`${providerLabel} credentials were rejected for registry ${this.getId()} (status ${rejectedStatus}); retrying token request without credentials for public image checks`,
467
-
);
468
-
469
-
returnthis.authenticateBearerFromAuthUrl(
470
-
requestOptions,
471
-
authUrl,
472
-
undefined,
473
-
options.tokenExtractor,
474
-
options.tokenFailureMessage,
484
+
thrownewError(
485
+
`Authentication failed for registry ${this.getId()} (HTTP ${rejectedStatus}): ${providerLabel} credentials were rejected. Check the configured token/login/password and their scopes.`,
0 commit comments