If you think it is a bug report or you have a technical issue, please answer the following questions. For general questions, you can delete these questions.
Elasticsearch version:
7.12.1
Server OS version:
7.4.1708
Kibana version (if relevant):
7.12.1
Browser version (if relevant):
Chrome
Browser OS version (if relevant):
Describe the issue:
We have an SSO for our company and using that I’m passing
user_header: "x-user"
roles_header: "x-group"
e.g
user_header: "tong"
roles_header: "admin"
That’s all changes I have done in configuration and applied using sgadmin.sh, the user tong does not exist in the internal elastic database.
My question is if I’m using proxy authentication does the username I’m passing in user_header: “x-user” needs to exist in the internal database of the elasticsearch? if yes how can I bypass that?
I’m trying to bypass LDAP with our own SSO.
Steps to reproduce:
1.
2.
3.
Expected behavior:
Provide configuration:
elasticsearch/config/elasticsearch.yml
xpack.security.enabled: false
######## Start Search Guard Demo Configuration ########
WARNING: revise all the lines below before you go into production
searchguard.ssl.transport.pemcert_filepath: esnode.pem
searchguard.ssl.transport.pemkey_filepath: esnode-key.pem
searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.http.enabled: true
searchguard.ssl.http.pemcert_filepath: esnode.pem
searchguard.ssl.http.pemkey_filepath: esnode-key.pem
searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem
searchguard.allow_unsafe_democertificates: true
searchguard.allow_default_init_sgindex: true
searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test, C=de
searchguard.restapi.roles_enabled: [“SGS_ALL_ACCESS”]
######## End Search Guard Demo Configuration ########
elasticsearch/plugins/search-guard-7/sgconfig/sg_config.yml
sg_config:
dynamic:
http:
anonymous_auth_enabled: false
xff:
enabled: true
internalProxies: '103.104.122.8' # Kibana IP
remoteIpHeader: 'x-forwarded-for'
authc:
proxy_auth_domain:
description: "Authenticate via proxy"
http_enabled: true
transport_enabled: true
order: 0
http_authenticator:
type: "proxy"
challenge: false
config:
user_header: "x-proxy-user"
roles_header: "x-proxy-roles"
authentication_backend:
type: noop
kibana/config/kibana.yml (if relevant)
searchguard.auth.type: "proxy"
searchguard.proxycache.user_header: x-proxy-user
searchguard.proxycache.roles_header: x-proxy-roles
searchguard.proxycache.proxy_header_ip: "103.104.122.8"
elasticsearch.requestHeadersWhitelist: [ "Authorization", "sgtenant", "x-forwarded-for", "x-user", "x-group" ]
Provide logs:
Elasticsearch
Kibana (if relevant)
Screenshots (if relevant):
Errors in browser console (if relevant):
{“statusCode”:401,“error”:“Unauthorized”,“message”:“Response Error”}
Additional data: