-
Notifications
You must be signed in to change notification settings - Fork 137
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
How to solve the problem if es password contains @ #77
Comments
I think you can just url_encode it using https://www.urlencoder.org/ |
I set the url property like “http://${ELASTIC_NAME}:${ELASTIC_PASSWORD}@${ELASTIC_URL}/_bulk”,used System's environment variable to configure es's parameters Dynamically,my password contains '@' too, how to deal with this kind of problem,I would appreciate it if you could answer。 |
Hi, To fix that I made an URL encoding as yoesoff said, but there was still an issue because Elasticsearch rejects the authentication with 401 error. Reason is that in class com.internetitem.logback.elasticsearch.config.BasicAuthentication, login/password is read from URL and passed to basic auth header without decoding the password. So my solution was to implement a custom BasicAuthentication class to decode the password before encoding it in base64 and putting it in Authorization header. |
Thx to frdrolland. This is my code and it works for me.
There you go ~ |
How to solve the problem if es password contains
@
elastic:abc@123@127.0.0.1:9200
The text was updated successfully, but these errors were encountered: