@Anthony Thank you for the response. Below is the information that I have for your questions. I’ll be posting the information in the same order in which you asked the questions for readability.
Here, I just included both the authc and authz configuration in full to keep consistency.
ldap:
description: "FreeIPA"
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: basic
challenge: false
authentication_backend:
# LDAP authentication backend (authenticate users against a LDAP or Active Directory)
type: ldap
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:
- 'idm.test.domain:389'
bind_dn: 'uid=elkuser,cn=users,cn=accounts,dc=test,dc=domain'
password: 'mypassword'
userbase: 'cn=elkusers,cn=groups,cn=accounts,dc=test,dc=domain'
# Filter to search for users (currently in the whole subtree beneath userbase)
# {0} is substituted with the username
usersearch: '(uid={0})'
# Use this attribute from the user as username (if not set then DN is used)
username_attribute: uid
authz:
roles_from_myldap:
description: "Authorize via FreeIPA"
http_enabled: true
transport_enabled: true
authorization_backend:
# LDAP authorization backend (gather roles from a LDAP or Active Directory, you have to configure the above LDAP authentication backend settings too)
type: ldap
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:
- 'idm.test.domain:389'
bind_dn: 'uid=elkuser,cn=users,cn=accounts,dc=test,dc=domain'
password: 'mypassword'
rolebase: 'cn=elkusers,cn=groups,cn=accounts,dc=test,dc=domain'
# Filter to search for roles (currently in the whole subtree beneath rolebase)
# {0} is substituted with the DN of the user
# {1} is substituted with the username
# {2} is substituted with an attribute value from user's directory entry, of the authenticated user. Use userroleattribute to specify the name of the attribute
rolesearch: '(memberUid={1})'
# Specify the name of the attribute which value should be substituted with {2} above
userroleattribute: null
# Roles as an attribute of the user entry
userrolename: 'memberOf'
#userrolename: memberOf
# The attribute in a role entry containing the name of that role, Default is "name".
# Can also be "dn" to use the full DN as rolename.
rolename: 'cn'
# Resolve nested roles transitive (roles which are members of other roles and so on ...)
resolve_nested_roles: false
userbase: 'cn=elkusers,cn=groups,cn=accounts,dc=test,dc=domain'
# Filter to search for users (currently in the whole subtree beneath userbase)
# {0} is substituted with the username
usersearch: '(uid={0})'
# Skip users matching a user name, a wildcard or a regex pattern
skip_users:
# - 'cn=Michael Jackson,ou*people,o=TEST'
# - '/\S*/'
- admin
- kibanaserver
- kibanaro
- logstash
- readall
- snapshotrestore
roles_from_another_ldap:
description: "Authorize via another Active Directory"
http_enabled: false
transport_enabled: false
authorization_backend:
type: ldap
#config goes here ...
# auth_failure_listeners:
# ip_rate_limiting:
# type: ip
# allowed_tries: 10
# time_window_seconds: 3600
# block_expiry_seconds: 600
# max_blocked_clients: 100000
# max_tracked_clients: 100000
# internal_authentication_backend_limiting:
# type: username
# authentication_backend: intern
# allowed_tries: 10
# time_window_seconds: 3600
# block_expiry_seconds: 600
# max_blocked_clients: 100000
# max_tracked_clients: 100000
Here is the ldapsearch query and the output. If you have something else for me to run in mind, feel free to let me know and I can run another query and post the results.
ldapsearch -x -b 'cn=elkusers,cn=groups,cn=accounts,dc=test,dc=domain' -H 'ldap://idm.test.domain:389'
# extended LDIF
#
# LDAPv3
# base <cn=elkusers,cn=groups,cn=accounts,dc=test,dc=domain> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# elkusers, groups, accounts, test.domain
dn: cn=elkusers,cn=groups,cn=accounts,dc=test,dc=domain
cn: elkusers
objectClass: top
objectClass: groupofnames
objectClass: nestedgroup
objectClass: ipausergroup
objectClass: ipaobject
objectClass: posixgroup
ipaUniqueID: 8cf5e682-b4b8-11eb-889d-b63df467a214
gidNumber: 1351800015
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
This is the only log entry I get for an authentication attempt. Perhaps I need to increase logging to see more details as you recommended? This was from the terminal but in Kibana I have a log entry as well for the same attempt. Not sure if you wanted the json output or just the log entry from the log file on the host? I also included my command for the authentication attempt as well.
curl -XGET https://192.168.2.132:9200 -u testuser@test.domain --insecure
{ "type": "server", "timestamp": "2021-05-24T10:30:07,154-04:00", "level": "WARN", "component": "c.a.o.s.a.BackendRegistry", "cluster.name": "graylog", "node.name": "graylog.test.domain", "message": "Authentication finally failed for testuser@test.domain from 192.168.2.132:55504", "cluster.uuid": "pKhMVB4WQ5eG6WoEnSyVXg", "node.id": "9AG3CV3PTOqzRFhZ7hdIng" }
Thank you and if I need to adjust anything, please let me know.