-
Notifications
You must be signed in to change notification settings - Fork 1
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
Ability to pass basic auth credentials ... #2
Comments
Hello @Analect The elastic-client component should work with normal authorization. We've actually been using authorization in the production version of our digapp-ht project as part of the host string, like I'm assuming that you're trying to use the elastic-client in your own project? If you're still having trouble, could you please post some example code so I could reproduce the issue locally? Thanks, Thomas |
@ThomasSchellenbergNextCentury Just as an exercise in trying to see if this works against version 5.x of ES, I modified some parts of the existing digapp-ht to point to my local ES index .. since this is really the only working app I've been able to find that uses these various digelements. I create a new 'note' type ... and broadly emulate how a 'webpage' is handled in the digapp. I also change the facets to mimic my own fields and reduce the number of facets to simplify things. Here is the modified index.html ... https://gist.github.com/Analect/2f8bfaadf3bcb5e5478e6fd4d5cfa109. I comment out many of the facets I haven't modified. Here is what I get when I run the app ... the fact that I am getting a However, the various Is there some way for me to log to the console what the actual query syntax is being passed to ES? |
@ThomasSchellenbergNextCentury I would love to be able to future-proof these faceting capabilities offered by the digelements for version 5.x and beyond. Would you have some thoughts around how either a ejs.boolQuery or ejs.boolFilter, (such as used here might be leveraged to make things compatible again? While elastic.js has been a great resource to have, from here, it seems there's little commitment to maintaining it, with the docs site now gone. According to that thread, some have switched to a fork or to another library altogether. What are your thoughts on this? Thanks. |
I agree with your assessment of the situation. Seeing As you mentioned, the elasticjs library does not support elasticsearch v5 and is not being actively maintained. I'm sure in the future we will need to add v5 support to the DIG Elements which will likely involve switching libraries. However, this is very low on our list of current priorities and we will not be working on it in the near-term. DIG Elements is an open-source project, though, and we'd always be happy to merge any useful improvements that you may be willing to contribute. If you're looking to solve this issue in the near-term, I'd suggest forking the elasticjs project and adding new objects to support features needed in v5 like Sorry we couldn't be of more help. PS: In response to "Is there some way for me to log to the console what the actual query syntax is being passed to ES?" |
@ThomasSchellenbergNextCentury |
@ThomasSchellenbergNextCentury ... I think you may be more actively involved in developing these elastic-* elements. I was wondering if I could trouble you.
I've been trying to get some of these elements working against a v5.x elasticsearch installation and one that happens to have basic authentication.
I tried feeding a host like you do here, but include a user:password like this:
'{"host": "http://user:[email protected]:9200"}'
I also tried with something like this:
'{"host": {"protocol": "http", "host": "host.domain.com", "auth": "user:password", "port":9200}}'
However, somehow elastic-client is and/or elastic-client-search are stripping back out the auth credentials ... since I see a POST request in developer tools that is missing the "user:password@" part ...
Any idea on what might be going wrong here ... are these elements set-up to handle basic authentication?
Thanks.
The text was updated successfully, but these errors were encountered: