Skip to content
This repository has been archived by the owner on Feb 1, 2018. It is now read-only.

Gem with shield #12

Open
Akhilesh-Anb opened this issue Apr 6, 2017 · 11 comments
Open

Gem with shield #12

Akhilesh-Anb opened this issue Apr 6, 2017 · 11 comments

Comments

@Akhilesh-Anb
Copy link

Elasticsearch is secured with shield and GEM is repeatedly asking me the credentials and unable to connect

@siddharthlatest
Copy link
Member

@Akhilesh-Anb GEM would create a request with the Basic Auth header based on the username:password you pass along in the URL. I don't think the fact that you are using Shield should cause a problem. It could be something else, but then we would need to look at the console.log and the network tab.

Are you able to cURL into your Elasticsearch instance using the username:password that you are passing to GEM?

@Akhilesh-Anb
Copy link
Author

curl -u akhil:akhil@789 -XGET 3.4.86.234:9200

Its not giving me any response from commandline

@siddharthlatest
Copy link
Member

@Akhilesh-Anb That can likely mean some issue with your Shield configuration.

@Akhilesh-Anb
Copy link
Author

but when i do 3.4.86.234:9200 with those credentials it works for me... why not for GEM

@Akhilesh-Anb
Copy link
Author

While using it as a extension i got this proble.. even i installed it as a plugin, i'm still facing this

Can you suggest me what configuration i need to look at

@siddharthlatest
Copy link
Member

@Akhilesh-Anb

curl -u akhil:akhil@789 -XGET 3.4.86.234:9200

Its not giving me any response from commandline

If you are not getting a response from cURL, that likely points the issue to something on the Elasticsearch / Shield side of things.

but when i do 3.4.86.234:9200 with those credentials it works for me... why not for GEM

Are you saying that you can access it from a browser tab directly but not from GEM? That also doesn't tell why you can't access it via cURL.

@Akhilesh-Anb
Copy link
Author

Akhilesh-Anb commented Apr 6, 2017

Now i'm able to get output from CURL

[root@aocapld0056a ~]# curl -u akhil:akhil@999 -XGET 3.4.86.234:9200
{
"name" : "NODE_1",
"cluster_name" : "dev",
"version" : {
"number" : "2.3.5",
"build_hash" : "90f439ff60a3c0f497f911e64ccd01edbb4",
"build_timestamp" : "2016-07-27T10:36:52Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}

Even now its asking repeatedly while accessing GEM

@Akhilesh-Anb
Copy link
Author

http:https://akhil:akhil%[email protected]:9200 in the browser is responding.... But in GEM its asking me credentials repeatedly

@Akhilesh-Anb
Copy link
Author

Akhilesh-Anb commented Apr 6, 2017

Hi @siddharthlatest ... I have two clusters

The cluster which is having credential akhil:akhil is working with GEM

The cluster which is having credentials akhil:akhil@999 is not working with GEM ( @ is becoming problem)

Any solution for this?

@siddharthlatest
Copy link
Member

@Akhilesh-Anb You might be right, @ is typically a reserved character in the URL. Since we pass credentials in GEM as a part of the URL, it might be causing an issue. Can you try with using only URL safe characters - http:https://stackoverflow.com/a/695467/1221677?

@Akhilesh-Anb
Copy link
Author

I mentioned in URL as http:https://akhil:akhil"@"[email protected]:9200

Its not working, when i debug its taking the URL as GET http:https://%22dm1n:9200/spot-lite-new/_settings

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

No branches or pull requests

2 participants