Skip to content

Commit 2f168b8

Browse files
committed
improve plugin author documentation
1 parent 6e6c2bf commit 2f168b8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/plugins/authors.asciidoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ Read more in {ref}/integration-tests.html#changing-node-configuration[Changing N
124124

125125
Some plugins may need additional security permissions. A plugin can include
126126
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!
129131

130132
If you are using the elasticsearch Maven build system, place this file in
131133
`src/main/plugin-metadata` and it will be applied during unit tests as well.
@@ -138,6 +140,9 @@ from gaining escalated permissions. For example:
138140

139141
[source,java]
140142
--------------------------------------------------
143+
// ES permission you should check before doPrivileged() blocks
144+
import org.elasticsearch.SpecialPermission;
145+
141146
SecurityManager sm = System.getSecurityManager();
142147
if (sm != null) {
143148
// unprivileged code such as scripts do not have SpecialPermission

0 commit comments

Comments
 (0)