File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,10 @@ Read more in {ref}/integration-tests.html#changing-node-configuration[Changing N
124
124
125
125
Some plugins may need additional security permissions. A plugin can include
126
126
the optional `plugin-security.policy` file containing `grant` statements for
127
- additional permissions. These permissions will be displayed to the user and
128
- they will have to confirm them when installing the plugin interactively.
127
+ additional permissions. Any additional permissions will be displayed to the user
128
+ with a large warning, and they will have to confirm them when installing the
129
+ plugin interactively. So if possible, it is best to avoid requesting any
130
+ spurious permissions!
129
131
130
132
If you are using the elasticsearch Maven build system, place this file in
131
133
`src/main/plugin-metadata` and it will be applied during unit tests as well.
@@ -138,6 +140,9 @@ from gaining escalated permissions. For example:
138
140
139
141
[source,java]
140
142
--------------------------------------------------
143
+ // ES permission you should check before doPrivileged() blocks
144
+ import org.elasticsearch.SpecialPermission;
145
+
141
146
SecurityManager sm = System.getSecurityManager();
142
147
if (sm != null) {
143
148
// unprivileged code such as scripts do not have SpecialPermission
You can’t perform that action at this time.
0 commit comments