diff --git a/dockerproxy/auth.go b/dockerproxy/auth.go index 04aede0..074a595 100644 --- a/dockerproxy/auth.go +++ b/dockerproxy/auth.go @@ -72,6 +72,11 @@ func authorizeRequest(ctx context.Context, appName, authToken string) bool { return true } + if allowThirdPartyOrgSlug == app.Organization.Slug { + log.Warnf("Allowed %s from third party organization %s", appName, app.Organization.Slug) + return true + } + builderAppName, ok := os.LookupEnv("FLY_APP_NAME") if !ok { log.Warn("FLY_APP_NAME env var is not set!") diff --git a/dockerproxy/main.go b/dockerproxy/main.go index 200389d..6c49f74 100644 --- a/dockerproxy/main.go +++ b/dockerproxy/main.go @@ -38,11 +38,12 @@ var ( pruneThresholdFreeBytes = 15 * 1000 * 1000 * 1000 // dev and testing - noDockerd = os.Getenv("NO_DOCKERD") == "1" - noAuth = os.Getenv("NO_AUTH") == "1" - noAppName = os.Getenv("NO_APP_NAME") == "1" - noHttps = os.Getenv("NO_HTTPS") == "1" - noFilter = true + noDockerd = os.Getenv("NO_DOCKERD") == "1" + noAuth = os.Getenv("NO_AUTH") == "1" + noAppName = os.Getenv("NO_APP_NAME") == "1" + noHttps = os.Getenv("NO_HTTPS") == "1" + allowThirdPartyOrgSlug = os.Getenv("ALLOW_THIRD_PARTY_ORG_SLUG") + noFilter = true // build variables gitSha string