You are viewing a plain text version of this content. The canonical link for it is here.
Posted to api@directory.apache.org by "George S." <ge...@mhsoftware.com> on 2018/03/08 04:55:26 UTC

Using Directory API Under Security Manager

I'm trying to run the Directory API under tomcat using a security 
manager. It's throwing an error:

2018-03-07 21:41:55,525 [http-nio-443-exec-12] ERROR org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory- Failed to instantiate a viable instance, instantiating new instance of
java.security.AccessControlException: access denied ("java.util.PropertyPermission" "apacheds.controls" "read")
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
         at java.security.AccessController.checkPermission(AccessController.java:884)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
         at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
         at java.lang.System.getProperty(System.java:717)
         at org.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService.getControlsFromSystemProperties(StandaloneLdapApiService.java:204)
         at org.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService.<init>(StandaloneLdapApiService.java:145)

I've signed the jar and I have a grant:

grant signedBy "mysign" {
     permission java.security.AllPermission;
}

Can anyone help me understand why this isn't working?

-- 
George S.
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com

Re: Using Directory API Under Security Manager

Posted by Emmanuel Lécharny <el...@gmail.com>.

Le 08/03/2018 à 06:55, George S. a écrit :
> Never mind. The problem is I'm trying to use this from a JSP which is
> untrusted. I got through it, but what a pain.

SecurityManager has always been a pain...

-- 
Emmanuel Lecharny

Symas.com
directory.apache.org


Re: Using Directory API Under Security Manager

Posted by "George S." <ge...@mhsoftware.com>.
Never mind. The problem is I'm trying to use this from a JSP which is 
untrusted. I got through it, but what a pain.


On 3/7/2018 9:55 PM, George S. wrote:
>
> I'm trying to run the Directory API under tomcat using a security 
> manager. It's throwing an error:
>
> 2018-03-07 21:41:55,525 [http-nio-443-exec-12] ERROR org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory- Failed to instantiate a viable instance, instantiating new instance of
> java.security.AccessControlException: access denied ("java.util.PropertyPermission" "apacheds.controls" "read")
>          at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
>          at java.security.AccessController.checkPermission(AccessController.java:884)
>          at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>          at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
>          at java.lang.System.getProperty(System.java:717)
>          at org.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService.getControlsFromSystemProperties(StandaloneLdapApiService.java:204)
>          at org.apache.directory.api.ldap.codec.standalone.StandaloneLdapApiService.<init>(StandaloneLdapApiService.java:145)
> I've signed the jar and I have a grant:
>
> grant signedBy "mysign" {
>     permission java.security.AllPermission;
> }
>
> Can anyone help me understand why this isn't working?
>
> -- 
> George S.
> *MH Software, Inc.*
> Voice: 303 438 9585
> http://www.mhsoftware.com

-- 
George S.
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com