Skip to content

Raise maximum token length for package-registry login #10369

Description

@mdres

Description

A length limit of 512 characters is enforced by the swift package-registry login command:

That is inconvinient for us. At our company we use the popular enterprise package manager Artifactory from Jfrog to host the Swift registry. Its access tokens are longer than that (around 800 chars):

Expected behavior

I am proposing to raise the max length to 1024 chars or something like that. The current limit of 512 seems a bit too restrictive as JWT tokens out in the wild will typically be longer than that.

Actual behavior

swift package-registry login "https://***/artifactory"                  
Enter access token: ey***.****.***
Error: password or access token must be 512 characters or less

Steps to reproduce

No response

Swift Package Manager version/commit hash

6.2.3

Swift & OS version (output of swift --version && uname -a)

swift-driver version: 1.127.14.1 Apple Swift version 6.2.3 (swiftlang-6.2.3.3.21 clang-1700.6.3.2)
Target: arm64-apple-macosx26.0
Darwin *** 25.6.0 Darwin Kernel Version 25.6.0: Sat Jul 11 15:26:29 PDT 2026; root:xnu-12377.161.13~4/RELEASE_ARM64_T8132 arm64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions