Borrow registry credentials for image pulls - #410
Conversation
-->
✱ stlc build✅ go code · compare
✅ typescript code · compare
Diagnostics: 💡 0 new / 5 total note
Build metadata
This comment is auto-generated by stlc and is kept up to date as you push. |
|
fixed both review findings in
validated with:
I also attempted the broader image/API suites; their Docker Hub integration cases are currently blocked by the unauthenticated pull-rate limit, while the focused local-registry and unit coverage passes. |
sjmiller609
left a comment
There was a problem hiding this comment.
these two findings seem worthwhile to me, but if the second one gets too complicated, maybe skip it.
lib/images/manager.go:181-200 — in-flight dedup ignores credential differences, so fresh credentials may silently inherit the original request’s authentication. fingerprint and reject mismatches, as push does.
lib/images/manager.go:495-503 — restart recovery also fails builds in converting, although registry access has finished. these should recover from the local OCI cache without credentials.
|
addressed the remaining approval note in added a cached-conversion restart regression test; focused recovery tests pass under |
summary
Allows Hypeman to pull private registry images using temporary, per-request credentials without persisting them.
POST /imagestests
go test ./lib/images -run 'Test(BorrowedCredentialsAuthenticateResolveAndPull|CreateImageRequestCredentialsAreNotPersisted|RecoverInterruptedCredentialedPullFailsForFreshRetry|RecoverInterruptedBuildsCapturedFixture)' -count=1\n-go test ./cmd/api/api -run 'TestCreateImage_(MapsBorrowedCredentials|EmptyCredentialsUseServerKeychain|ErrorStatusMapping)|TestCreatePush_(NoCredentialsStaysNil|EmptyCredentialsFallsBackToDefault)' -count=1\n-make oapi-generateand verified the generated file is clean\n\n## notes\n\n- a broadergo test ./cmd/api/api -count=1was attempted but unrelated integration tests could not download a kernel release because GitHub returned 503