At the moment JndiPermission is based in org.jboss.as.naming module which is private. Because of this it effectively cannot be used by deployments.
WildFlySecurityManager throws exception by some tests with security manager
Fix issues in tests with Security Manager
JNDIPermission is based in a private module
Module org.wildfly.naming does not export JndiPermission