Skip to content

fix(registry): preserve username case for ECR compatibility#4647

Open
rafaumeu wants to merge 1 commit into
Dokploy:canaryfrom
rafaumeu:fix/ecr-username-case
Open

fix(registry): preserve username case for ECR compatibility#4647
rafaumeu wants to merge 1 commit into
Dokploy:canaryfrom
rafaumeu:fix/ecr-username-case

Conversation

@rafaumeu

Copy link
Copy Markdown

Problem

Closes #4632

The registry username schema applied a .toLowerCase() transform, which breaks AWS ECR authentication. ECR requires the username to be exactly AWS (uppercase). With the current code, AWS becomes aws and authentication fails.

Solution

Removed the .toLowerCase() transform from registryUsernameSchema. The schema now only trims whitespace and validates non-empty.

This is safe because:

  • AWS ECR requires AWS (uppercase) — now preserved
  • Docker Hub usernames are case-insensitive for login
  • Self-hosted registries typically accept case as-is

Testing

Added 6 unit tests in __test__/registry/registry-schema.test.ts:

  • Preserves uppercase (AWS ECR case)
  • Preserves mixed-case
  • Trims whitespace
  • Rejects empty username
  • Preserves case in apiTestRegistry too
  • Accepts lowercase (backward compat)

…4632)

Remove .toLowerCase() transform from registryUsernameSchema.
AWS ECR requires the username to be exactly 'AWS' (uppercase) for
authentication. Docker Hub usernames are case-insensitive for login,
so preserving case is safe for all providers.

Closes Dokploy#4632
@rafaumeu rafaumeu requested a review from Siumauricio as a code owner June 16, 2026 18:39
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS ECR authentication fails because registry usernames are forcibly lowercased

1 participant