Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry Service breaks at client side if Registry Server Password includes special char '@' #232

Open
3amroSalem opened this issue Jan 20, 2018 · 6 comments

Comments

@3amroSalem
Copy link

Overview of the issue

Setting ${jhipster.registry.password} with passwords that includes'@' results in java.lang.IllegalArgumentException: Host name may not be null at client side.

That's really might be a eureka configuration issue not, Jhipster issue, how ever exception message was misleading and time consuming trying to figure out the root cause for this.

Motivation for or Use Case

Allowing special char @ in Jhipster Registry Password

Reproduce the error

Set Jhipster Registry password with char '@' then try to configure client which will fail cause,
FQN will be including @ twice for example https://admin:123@[email protected]/eureka/

Related issues
Suggest a Fix

Open for suggestions, might be a restricting passwords not to include '@' ?
Or may be just close this and report to Eureka :D

JHipster Version(s)

v3.2.4

Browsers and Operating System
  • [*] Checking this box is mandatory (this is just to show you read everything)
@3amroSalem
Copy link
Author

A friend suggested to encode special characters like that before passing them as part of the URL, so @ would need to be passed as %40, etc, may be that can be automated from client.

@jdubois
Copy link
Member

jdubois commented Jan 23, 2018

Oh yes, the login:password must probably by urlencoded or something similar - that's definitely an issue!

@PierreBesson
Copy link
Contributor

As it is used for basic auth in admin:[email protected] yes the password needs to be url encoded. However I dont' think we could endode it transparently for the user. We should just add a comment to make it explicit that the registry password should be encoded.

@jdubois
Copy link
Member

jdubois commented Feb 6, 2018

I tried to find some documentation about this, but couldn't find any :-(
So that's "normal" for basic authentication, but I don't know how it's supposed to be encoded.

@PierreBesson
Copy link
Contributor

@jdubois The encoding needed is regular base64 encoding of "user:password", see the spec at : https://tools.ietf.org/html/rfc7617#section-2

@jdubois
Copy link
Member

jdubois commented Feb 6, 2018

Great thanks! Let's just document that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants