When asking questions, please provide the following information:
-
Search Guard and Elasticsearch version
-
Installed and used enterprise modules, if any
-
JVM version and operating system version
-
Search Guard configuration files
-
Elasticsearch log messages on debug level
-
Other installed Elasticsearch or Kibana plugins, if any
Hi,
I have search-guard installed and this works using the basic_internal_auth_domain in sg_config.yml.
I want to add an SSO proxy for authentication purposes and followed the steps in
However, I cannot get this to work successful. My configuration is detailed below:
Note that
- When I try and authenticate using an existing user using basic_internal_auth_domain it is still successful.
E.g. curl http://user:user_pw@localhost:9200
{
“name” : “jCKtPWs”,
“cluster_name” : “docker-cluster”,
“cluster_uuid” : “nnhagc3hSiSaQYyz8p9Hgg”,
“version” : {
“number” : “6.1.1”,
“build_hash” : “bd92e7f”,
“build_date” : “2017-12-17T20:23:25.338Z”,
“build_snapshot” : false,
“lucene_version” : “7.1.0”,
“minimum_wire_compatibility_version” : “5.6.0”,
“minimum_index_compatibility_version” : “5.0.0”
},
“tagline” : “You Know, for Search”
}
- When I try and authenticate a new user using proxy_auth_domain it fails
E.g. curl http://newuser:newuser_pw@localhost:9200
Unauthorized
- When I look in the logs I just get this
…
[WARN ][c.f.s.a.BackendRegistry ] Authentication finally failed for /newuser
…
- I can communicate directly with the proxy successfully for the newuser.
E.g.
curl -XPOST -v “http://newuser:newuser_pw@127.0.0.1”
this returns…
-
About to connect() to 127.0.0.1 port 80 (#0)
-
Trying 127.0.0.1…
-
Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
-
Server auth using Basic with user ‘*********’
POST / HTTP/1.1
Authorization: Basic d2ZfYWRtaW46YWRtaW5fbmc=
User-Agent: curl/7.29.0
Host: 127.0.0.1
Accept: /
- HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: BaseHTTP/0.3 Python/2.7.5
< Date: Mon, 30 Apr 2018 14:42:47 GMT
< x-proxy-user: *********
<
- Closing connection 0
- The proxy returns only x-proxy-user and not x-proxy-roles however I have set-up the roles for the new user in sg_roles_mapping.yml so I hope this is not a problem.
I hope someone has some idea what the problems might be? It would be useful to have an examples of a working version sg_config.yml that uses proxy_auth_domain.
Configuration Details
Configuration details are as follows
-
Search Guard and Elasticsearch version
Search Guard 6 ( I can see this file search-guard-6-6.1.1-20.1.jar in /plugins/search-guard-6 )
ElasticSearch version 6.1.1 -
Installed and used enterprise modules, if any
I am using Elasticsearch, Logstash, Kibana and Searchguard but nothing else -
JVM version and operating system version
java -version
openjdk version “1.8.0_151”
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
CentOS Linux 7 (Core)
- Search Guard configuration files
see sg_config.yml
- Elasticsearch log messages on debug level
I added the following to config/log4j2.properties
logger.searchguard.name = com.floragunn
logger.searchguard.level = debug
- Other installed Elasticsearch or Kibana plugins, if any
no others
Thanks
Garin
sg_config.yml (747 Bytes)