I’m using v1.3.0 of the Docker images.
I can successfully login to Kibana if I configure Kibana/ES for login with SAML/Okta without roles
# config.yml
authc:
basic_internal_auth_domain:
...
saml_auth_domain:
http_enabled: true
transport_enabled: false
order: 1
http_authenticator:
type: saml
challenge: true
config:
idp:
entity_id: <entity_id>
metadata_file: okta-metadata.xml
sp:
entity_id: kibana-saml
kibana_url: <kibana_url>
#roles_key: Roles
exchange_key: <exchange_key>
authentication_backend:
type: noop
# removed authz
But if I add roles_key: Roles
and change roles_mapping.yml
to
# roles_mapping.yml
...
kibana_user:
reserved: false
backend_roles:
- "kibanauser"
- "myrole2"
description: "Maps kibanauser to kibana_user"
users:
- "*"
...
and try to login I get redirected to the login page again without error message in the UI.
In the logs I can see that the roles are returned by Okta and parsed correctly by the security plugin.
[TRACE][c.a.o.s.a.BackendRegistry] [myhost] Try to extract auth creds from saml http authenticator
[DEBUG][c.a.o.s.a.BackendRegistry] [myhost] Rest user 'User [name=myusername, backend_roles=[myrole1, myrole2, .... ], requestedTenant=null]' is authenticated
It seems like the roles are not evaluated.
Kibana is configured with
# kibana.yml
---
server.name: kibana
server.host: "0"
opendistro_security.auth.type: "saml"
server.xsrf.whitelist: ["/_opendistro/_security/saml/acs", "/_opendistro/_security/saml/logout"]
For debugging I added
# log4j2.properties
logger.token.name = com.amazon.dlic.auth.http.saml.Token
logger.token.level = debug
logger.opendistro_security_br.name = com.amazon.opendistroforelasticsearch.security.auth.BackendRegistry
logger.opendistro_security_br.level = trace
opendistro_security.audit.config.log4j.logger_name = auditlogger
opendistro_security.audit.config.log4j.level = INFO
What am I doing wrong? How can I debug this any further?