I configured ldap authentication in searchguard config (sg_config.yml) by setting authc(authetication), authz(authorizaton ) to ldap .
I noticed a major deteriration in performance and sometimes elasticsearch breaks .
What I’m trying to configure is to have authentication from ldap and authorization from internal which is possible as I understood in the documentation
My question : as kibana is used by more than 150 persons , is it possible to set up a configuration where authc is ldap and authrization is readonly for every new and old user without specifying any name in the internal database ?
this is a snapshot of sg_config.yml ( btw Im using sg5)
type: ldap # NOT FREE FOR COMMERCIAL USE
config:
# enable ldaps
enable_ssl: false
# enable start tls, enable_ssl should be false
enable_start_tls: false
# send client certificate
enable_ssl_client_auth: false
# verify ldap hostname
verify_hostnames: false
hosts:
- xxxxx
bind_dn: 'xxx'
password: 'xxx'
userbase: 'xxx'
# Filter to search for users (currently in the whole subtree beneath userbase)
# {0} is substituted with the username
usersearch: '(sAMAccountName={0})'
# Use this attribute from the user as username (if not set then DN is used)
username_attribute: sAMAccountName
authz:
roles_from_myldap:
enabled: true
authorization_backend:
type: intern ???
What use case are you trying to implement exactly? If I understood your question correctly, you want to assign backend roles from the internal DB to all users, new and old, and independent from their LDAP groups, right?
If this is the case, can’t you simply define a role mapping that applies to all users (you can use wildcards in role mapping entries) and thus assigns one or more Search Guard roles to all users?
As I read in the SG5 documentation :
In most cases, you want to configure both authentication and authorization, however, it is also possible to use authentication only and map the users retrieved from LDAP directly to Search Guard roles. This can be done in the sg_roles_mappig.yml configuration.
Works like a charm . Dashboards loading is a lot faster .
It would have been great if there’s like a diagram to explain graphically the flow between all config files.