Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: add registry.gitlab.com to trustedAuthDelegations (#2507)
Kyle Mendell8c81ad5d2c50
diff --git a/backend/pkg/utils/distribution/distribution.go b/backend/pkg/utils/distribution/distribution.goindex f732e46eb..d96d7a4da 100644--- a/backend/pkg/utils/distribution/distribution.go+++ b/backend/pkg/utils/distribution/distribution.go@@ -23,8 +23,9 @@ const dockerHubRateLimitRepository = "ratelimitpreview/test"// Some registries serve images under their own domain but delegate token auth to a// separate host (e.g. lscr.io delegates to ghcr.io).var trustedAuthDelegations = map[string]string{- "docker.io": "auth.docker.io",- "lscr.io": "ghcr.io",+ "docker.io": "auth.docker.io",+ "lscr.io": "ghcr.io",+ "registry.gitlab.com": "gitlab.com",}type Credentials struct {diff --git a/backend/pkg/utils/distribution/distribution_test.go b/backend/pkg/utils/distribution/distribution_test.goindex 939acb250..5d201c381 100644--- a/backend/pkg/utils/distribution/distribution_test.go+++ b/backend/pkg/utils/distribution/distribution_test.go@@ -333,6 +333,11 @@ func TestValidateAuthRealmInternal(t *testing.T) {registryHost: "lscr.io",realm: "https://ghcr.io/token",},+ {+ name: "registry.gitlab.com delegates auth to gitlab.com",+ registryHost: "registry.gitlab.com",+ realm: "https://gitlab.com/jwt/auth",+ },{name: "non https realm rejected",registryHost: "registry.example.com",