Support Docker Registry Usernames over 1024 characters

Problem/Justification
Adding a private docker registry with a username over 1024 characters results in the following error:
[EINVAL] app_registry_create.username: String should have at most 1024 characters

Impact
Commercial private registries that use a JWT as the username cannot be used with TrueNAS Scale

User Story
The length of a JWT is about 1100 characters. Just a little too long. Adjust the limit to accommodate and all will be good. Thanks!

Did you check to see what the Docker Registry Username limit is? Searching brings up mixed values and info.

If you look at the actual code for docker login and the open source registry, there is no limit imposed on username. It is passed through as is to the Auth backend. You will hit the limit on HTTP header length first which is around 8K depending on the server.

I can workaround the issue by doing a sudo docker login from the TrueNAS shell. This allows me to pull private images from the GUI.