appbaseio / mirage

:art: GUI for simplifying Elasticsearch Query DSL
http://opensource.appbase.io/mirage
Other
2.21k stars 125 forks source link

Authentication sign-in not working on chrome extension #43

Closed reedv closed 7 years ago

reedv commented 7 years ago

I was initially having trouble with the authentication for my local ES installation (with x-pack security) where every time I tried to sign in with the login window would continually reset. Looking at the chrome console, I saw that the username was being set to "localhost" with password "9200" the local ES port. Pictured below:

mirage_no-auth

Looking at this issue, I changed the config file to include:

http.cors.allow-origin: "/.*/" http.cors.enabled: true http.cors.allow-headers : "X-Requested-With, X-Auth-Token, Content-Type, Content-Length, Authorization" http.cors.allow-methods: "OPTIONS, HEAD, GET, POST, PUT, DELETE" http.cors.allow-credentials: true

and restarted elasticsearch and I am now this error, where the username and password is blank username="", password="":

screenshot from 2017-08-22 15-27-58

Are there any other things that I can try to fix this?

siddharthlatest commented 7 years ago

@reedv Does your index already exist?

reedv commented 7 years ago

yes

siddharthlatest commented 7 years ago

@reedv Can you try prefixing your cluster URL with http:// scheme? It should look like this:

reedv commented 7 years ago

@siddharthlatest Using http:// scheme?localhost:9200 in the mirage cluster url field still gives a similar error:

screenshot from 2017-08-22 15-52-48

siddharthlatest commented 7 years ago

@reedv Your cluster URL should be http://localhost:9200.

reedv commented 7 years ago

@siddharthlatest Sorry, I didn't get what you meant then by prefixing scheme? in the cluster name. Using the url you recommended, I get: screenshot from 2017-08-22 15-58-38 Using me credentials, the window just continually resets to blank fields.

siddharthlatest commented 7 years ago

@reedv Just seeing that you mentioned you are using X-Pack security. I haven't used it, but in this case, the cluster field should be filled like:

http://username:password@localhost:9200.

Let me know if this works.

reedv commented 7 years ago

A problem that I am seeing is that my password has the form "password@passwordContinued", so mirage is sending command GET http://passwordContinued@localhost:9200/bank/_mapping/.

I will try changing the password and see what happens then.

reedv commented 7 years ago

@siddharthlatest changedd password to password123passwordContinued and am seeing this now: screenshot from 2017-08-22 16-12-49 which seems to be working. Thanks for the advice and thanks for the quick response.

Trying to use the dejavu data view from mirage, I see this error in the console: screenshot from 2017-08-22 16-12-19 Including it in this thread in case it is also related.

siddharthlatest commented 7 years ago

@reedv That's great to hear.

On the dejavu issue, I think it is requesting a http:// URL over an https:// connection. See your URL bar and enable loading unsafe scripts.

If you still see an issue with dejavu, the recommended place to file it would be https://github.com/appbaseio/dejavu/issues.

reedv commented 7 years ago

@siddharthlatest That worked, Thanks. And yeah, I was going to post the issue to the dejavu issues, but figured it might be related since the behavior change was due to the mirage issue fix. Anyway, you were super fast and super helpful, thanks again.