Am 18.04.2017 um 12:28 schrieb Florian Norbert Bepunkt <floriannorbertbischoff@gmail.com>:
Thank you. I'm having trouble getting this setup. I use this docker image with es and searcguard: GitHub - khezen/docker-elasticsearch: Elasticsearch Docker image including search-guard
When accessing the cluster via postman with the specified auth header (Authorization: Bearer + my generated token), I only get an Unauthorized response. Basically the docker image should work, I can configure a normal user auth and this works.
In my sg_config.yml I configured JWT according to you docs:
searchguard:
dynamic:
authc:
jwt_auth_domain:
enabled: true
order: 0
http_authenticator:
type: jwt
challenge: false
config:
signing_key: "xxxxx...having my base encoded secret here"
jwt_header: "Authorization"
jwt_url_parameter: null
subject_key: 'user'
roles_key: 'role'
authentication_backend:
I type: noop
Any ideas?
Am Montag, 17. April 2017 21:11:50 UTC+2 schrieb Jochen Kressin:
This is just a guess, but ... the JWT token is passed to Search Guard in an HTTP header field, the default being Authorization.
The header fields starts with "Bearer", then a whitespace, and the the actual JWT token, e.g:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImhyX2VtcGxveWVlIiwicm9sZXMiOiJociIsImlkIjpudWxsLCJpYXQiOjE0ODY4NTI1NDF9.1A6ircYWr4nCB1hEDMq-sLheG0ON_8ccRxNd1KlE03U
When instantiating the ES Client object, you can pass several configuration settings for the host, one of them is a field called headers:
headers
Object — An object describing the headers to send for every request to this node.
see here:
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/host-reference.html
So, maybe you can try to use this header field to set the Authorization header with the JWT token.
On Monday, April 17, 2017 at 6:31:09 PM UTC+2, Florian Norbert Bepunkt wrote:
ok, I basically figured out the auth0 part and setup configuration based on searchguard wiki. This might be a super dumb question now, but using the official elasticsearch.js client … how to I send the jwt token? Can someone please explain how this works?
Thank you.
Am Montag, 17. April 2017 15:31:05 UTC+2 schrieb Florian Norbert Bepunkt:
We use auth0 as authentication provider for an project and are now evaluating SearchGuard. When a user logs in into our app, we store a jwt. Is it possible to use the same token to authenticate with our elasticsearch cluster via searchguard? If so how would i go about this?
Basically our cluster should grant read/write access to authenticated users.
--
You received this message because you are subscribed to the Google Groups "Search Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to search-guard+unsubscribe@googlegroups.com.
To post to this group, send email to search-guard@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/43a6debe-83ef-4f99-be4f-e26ddfcce7c2%40googlegroups.com\.
For more options, visit https://groups.google.com/d/optout\.