Hi there!
I am trying to configure LDAP Authentication with Active Directory. But I am getting this error at ES:
[2018-12-26T17:43:35,160][INFO ][t.b.r.e.IndexLevelActionFilter] [QUAL-LOGSRV-01] Settings observer refreshing…
[2018-12-26T17:43:35,172][INFO ][t.b.r.a.ACL ] ADDING BLOCK: { name: ‘::LOGSTASH::’, policy: ALLOW, rules: [auth_key, actions, indices]}
[2018-12-26T17:43:35,172][INFO ][t.b.r.a.ACL ] ADDING BLOCK: { name: ‘::KIBANA-SRV::’, policy: ALLOW, rules: [auth_key]}
[2018-12-26T17:43:35,172][INFO ][t.b.r.a.ACL ] ADDING BLOCK: { name: ‘::RO::’, policy: ALLOW, rules: [auth_key, kibana_access, indices, kibana_hide_apps]}
[2018-12-26T17:43:35,172][INFO ][t.b.r.a.ACL ] ADDING BLOCK: { name: ‘::RW::’, policy: ALLOW, rules: [auth_key, kibana_access, indices, kibana_hide_apps]}
[2018-12-26T17:43:35,172][INFO ][t.b.r.a.ACL ] ADDING BLOCK: { name: ‘::ADMIN::’, policy: ALLOW, rules: [auth_key, kibana_access]}
[2018-12-26T17:43:35,172][INFO ][t.b.r.a.ACL ] ADDING BLOCK: { name: ‘admins’, policy: ALLOW, rules: [kibana_access, indices, kibana_hide_apps]}
[2018-12-26T17:43:35,252][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [QUAL-LOGSRV-01] fatal error in thread [Background connect thread for QUALADDS.TESTES.LOCAL/8.5.5.8:389], exiting
java.lang.ExceptionInInitializerError: null
at com.unboundid.ldap.sdk.ConnectThread.run(ConnectThread.java:152) ~[?:?]
Caused by: java.security.AccessControlException: access denied (“java.util.PropertyPermission” “*” “read,write”)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_172]
at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_172]
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_172]
at java.lang.SecurityManager.checkPropertiesAccess(SecurityManager.java:1262) ~[?:1.8.0_172]
at java.lang.System.getProperties(System.java:630) ~[?:1.8.0_172]
at com.unboundid.util.Debug.(Debug.java:166) ~[?:?]
… 1 more
Here is my readonlyrest.yml configuration:
readonlyrest:
access_control_rules:
- name: "::LOGSTASH::"
auth_key: logstash:logstash
actions: ["indices:data/read/*","indices:data/write/*","indices:admin/template/*","indices:admin/create"]
indices: ["demo-csv-*","filebeat-*","logstash*","servico*","winlogbeat-*"]
- name: "::KIBANA-SRV::"
auth_key: kibana:kibana
- name: "::RO::"
auth_key: ro:dev
kibana_access: ro
indices: [ ".kibana", ".kibana-devnull", "filebeat-*"]
kibana_hide_apps: ["readonlyrest_kbn", "timelion", "kibana:dev_tools", "kibana:management"]
- name: "::RW::"
auth_key: rw:dev
kibana_access: rw
indices: [".kibana", ".kibana-devnull", "filebeat-*" ,"winlogbeat-*"]
kibana_hide_apps: ["readonlyrest_kbn", "timelion", "kibana:dev_tools", "kibana:management"]
- name: "::ADMIN::"
auth_key: admin:kibana
kibana_access: admin
- name: admins
kibana_access: rw
indices: [".kibana", ".kibana-devnull", "filebeat-*"]
kibana_hide_apps: ["readonlyrest_kbn", "timelion", "kibana:dev_tools", "kibana:management"]
- name: "::RW LDAP::"
ldap_auth:
name: "ldap1"
groups: ["admins"]
users:
- username: scamela
groups: ["admins"]
ldap_authentication: "ldap1"
ldaps:
- name: ldap1
host: "QUALADDS.TESTES.LOCAL"
port: 389
ssl_enabled: false
ssl_trust_all_certs: true
bind_dn: "CN=Sean Camela,OU=Users,OU=DSI,DC=TESTES,DC=local"
bind_password: "P@ssword1"
search_user_base_DN: "OU=Users,OU=DSI,DC=TESTES,DC=local"
user_id_attribute: "sAMAccountName"
search_groups_base_DN: "OU=DSI,DC=TESTES,DC=local"
unique_member_attribute: "member"
connection_pool_size: 10
connection_timeout_in_sec: 10
request_timeout_in_sec: 10
cache_ttl_in_sec: 60
group_search_filter: "(objectClass=group)(cn=*)"
group_name_attribute: "cn"
Here is the /usr/share/elasticsearch/plugins/readonlyrest/plugin-security.policy file:
grant {
permission java.security.SecurityPermission “getProperty.ssl.KeyManagerFactory.algorithm”;
permission java.lang.reflect.ReflectPermission “suppressAccessChecks”;
permission java.lang.RuntimePermission “accessDeclaredMembers”;
permission java.lang.RuntimePermission “accessClassInPackage.sun.misc”;
permission java.net.SocketPermission “QUALADDS.TESTES.LOCAL:389”, “accept, connect, resolve”;
permission java.util.PropertyPermission “", “read,write”;
permission java.util.PropertyPermission "”, “read,write”;
permission java.lang.RuntimePermission “getClassLoader”;
permission java.net.SocketPermission “*”, “accept, resolve, connect”;
permission java.io.FilePermission “<< ALL FILES >>”, “read”;
permission java.lang.RuntimePermission “setContextClassLoader”;
};
What can I do to get this working?
Regards
Sean Camela