Skip to content

Commit 7100b13

Browse files
committed
Fix permissions for UnboundID LDAP SDK (#68872)
We inadvertently removed permissions needed by the UnboundID LDAP SDK during a refactoring. This commit returns them to their rightful place. These permissions are needed in core because we force the class initializers for two classes from the UnboundID LDAP SDK to load while loading the x-pack-core plugin. We have to do this there because x-pack-core depends on the UnboundID LDAP SDK as some realm classes live in x-pack-core. Without these permissions, Elasticsearch will fail to start if an AD or LDAP realm is configured.
1 parent 7aad648 commit 7100b13

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

x-pack/plugin/core/src/main/plugin-metadata/plugin-security.policy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ grant {
88

99
// needed for multiple server implementations used in tests
1010
permission java.net.SocketPermission "*", "accept,connect";
11+
12+
// needed because of problems in unbound LDAP library
13+
permission java.util.PropertyPermission "*", "read,write";
1114
};
1215

1316
grant codeBase "${codebase.netty-common}" {

x-pack/plugin/security/src/main/plugin-metadata/plugin-security.policy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
grant {
22
permission java.lang.RuntimePermission "setFactory";
33

4-
// needed because of problems in unbound LDAP library
5-
permission java.util.PropertyPermission "*", "read,write";
4+
// needed for SAML
5+
permission java.util.PropertyPermission "org.apache.xml.security.ignoreLineBreaks", "read,write";
66

77
// needed during initialization of OpenSAML library where xml security algorithms are registered
88
// see https://github.com/apache/santuario-java/blob/e79f1fe4192de73a975bc7246aee58ed0703343d/src/main/java/org/apache/xml/security/utils/JavaUtils.java#L205-L220

0 commit comments

Comments
 (0)