-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[es] Fix ipv6 addresses used with angular connector #29891
Conversation
Pinging @elastic/kibana-operations |
💔 Build Failed |
Hello! The next client will no longer use
|
retest |
💚 Build Succeeded |
So I'm ignorant about how most of our legacy code works, but why does any frontend code access Elasticsearch directly? Or in other words, how is it that anything parsed by Angular code ends up in our elasticsearch-js client? |
nice, story time: Kibana 4.0.0 was initially a client side application that you provided your own server for. A server was thrown in before release, and instead of rewriting every endpoint, a proxy to elasticsearch through the Kibana server was made. We've migrated away from this over time but it still exists in courier. elasticsearch-js has separate browser and server installs but they share some code. |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reading that issue again, I think that's unlikely actually... |
From the timeline it looks as this patch has made it into kibana-7.0.0-beta1-x86_64.rpm but I have experienced the issue on beta1 just now. Can you test this? |
Didn't make it, it was close - the cutoff was on Feb 13. It'll be in rc1. |
@jbudz was there a reason this didn't make it into the 6.x branch at all? It's been an issue for a while, and this discuss issue seems to indicate that the fix works in 6.3.2. |
When passing a host url to elasticsearch-js, it will use url.parse to pick fields ref.
url.parse().hostname does not include brackets in ipv6 addresses:
window does include brackets in ipv6 addresses:
For browser requests we want these wrapped. Instead of url.parsing, this passes in a host object. An upstream fix is probably ideal but not as straight forward, I believe hosts are environment agnostic. @delvedor any thoughts? I could look into a client fix, or wait until elasticsearch-js@next?
To reproduce:
and visit any page using the angular connector, e.g. discover.
Closes #23764
Closes #9157