Skip to content

Commit

Permalink
Security Plugin cannot startup due to AccessControlException: access …
Browse files Browse the repository at this point in the history
…denied

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Sep 5, 2023
1 parent fd3a143 commit 7d6dac6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions plugin-security.policy
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ grant {
permission java.net.NetPermission "getProxySelector";
permission java.net.SocketPermission "*", "connect,accept,resolve";

// BouncyCastle permissions
permission java.security.SecurityPermission "putProviderProperty.BC";
permission java.security.SecurityPermission "insertProvider.BC";
permission java.security.SecurityPermission "removeProviderProperty.BC";

permission java.lang.RuntimePermission "accessUserInformation";

permission java.security.SecurityPermission "org.apache.xml.security.register";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,6 @@ public OpenSearchSecurityPlugin(final Settings settings, final Path configPath)
sm.checkPermission(new SpecialPermission());
}

AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
if (Security.getProvider("BC") == null) {
Security.addProvider(new BouncyCastleProvider());
}
return null;
}
});

final String advancedModulesEnabledKey = ConfigConstants.SECURITY_ADVANCED_MODULES_ENABLED;
if (settings.hasValue(advancedModulesEnabledKey)) {
deprecationLogger.deprecate("Setting {} is ignored.", advancedModulesEnabledKey);
Expand Down

0 comments on commit 7d6dac6

Please sign in to comment.