If you think it is a bug report or you have a technical issue, please answer the following questions.
Elasticsearch version:
8.19.19
Kibana version (if relevant):
8.19.19
Describe the issue:
I’m currently trying to configure OIDC in Kibana. Kibana is behind a Apache reverse proxy. I have problems with the settings and the documentation.
The configuration file is
---
_sg_meta:
type: "frontend_authc"
config_version: 2
default:
debug: true
auth_domains:
- type: basic
label: "Login"
- type: oidc
oidc:
client_id: "kibanadev"
client_secret: "XXXX"
get_user_info: true
use_dynamic_frontend_url: true
idp:
openid_configuration_url: "https://XXXXX/oidc/.well-known/openid-configuration"
user_mapping:
roles:
from_comma_separated_string: "oidc_id_token.roles"
First point the _sg_meta is not provided in the documentation Kibana OIDC Quick Start | Security for Elasticsearch | Search Guard. I’m not sure if it’s mandatory or not.
The documentation talks about use_pkce, but when I add it in the file, I got
$ sudo java -Xmx1G -jar sgctl update-config --sgctl-config-dir=.../sgconf --debug /tmp/dev/sg_frontend_authc.yml
Selected cluster: development
------------------------------------------------
HTTP/1.1 200 OK
Content-Type: application/json
{"user":"User O=XXXX<tls_cert>","user_name":"XXXX","user_requested_tenant":null,"remote_address":null,"backend_roles":[],"attribute_names":[],"sg_roles":[],"sg_ten...
------------------------------------------------
Successfully connected to cluster development (esdev02.XXXX) as user XXXX
Uploading config files: sg_frontend_authc.yml
------------------------------------------------
HTTP/1.1 400 Bad Request
Content-Type: application/json
{"status":400,"error":{"message":"'frontend_authc.default.auth_domains.1.oidc.use_pkce': Unsupported attribute","details":{"frontend_authc.default.auth_domains.1.oidc.use_pkce":[{"error":"Unsupported attribute","value":"true"}]}}}
------------------------------------------------
Invalid config files:
/tmp/dev/sg_frontend_authc.yml:
default.auth_domains.1.oidc.use_pkce:
Unsupported attribute
use_pkce is described the Elastic plugin source code. But it’s seems to be missing in the Kibana plugin.
I also a problem in the callback URL. As it’s behind a reverse proxy, it’s resolved as http://localhost:5602/auth/openid/login that will obviously fails. The document says to configure use_dynamic_frontend_url to control the usage of frontend_base_url. I tried to then set default.auth_domains.1.oidc.idp.frontend_base_url to “https://XXXX/auth/openid/login” and efault.auth_domains.1.oidc.use_dynamic_frontend_url to false, but now the callback URL is the quite strange https://XXXX:5601/auth/openid/login instead of localhost. I don’t know how I can handle that.