You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cor Hofman <ch...@lucris.nl> on 2001/09/19 08:52:51 UTC

My java.security.AccessControlException@Waterloo.be

I am stuck and need some help badly.

I try to get my application (JSP + EJB) running via tomcat 4.0 and
JBoss under Windows NT. I use a JAAS  authorization scheme, but what
I keep getting is the exception shown below.

java.security.AccessControlException: access denied
(java.security.SecurityPermission getProperty.login.configuration.provider)

The code I use to authenticate a user with JBoss is the following:

  AppCallbackHandler handler = new AppCallbackHandler(orgPin, userName,
                                          password.toCharArray());
  LoginContext lc = new LoginContext("companion", handler);
  lc.login();

It throws the exception at the "new LoginContext()".

I have set the environment variable CATALINA_OPTS to
-Djava.security.auth.login.config=%JBOSS_HOME%\client\auth.conf

The contents of the auth.conf file is:

other {
    org.jboss.security.ClientLoginModule  required;
};

The indicated module is available in the webapps/<mywebap>/WEB-INF/lib as
part of a .jar.

I also have added the following line to the catalina.policy file of tomcat
4.0
and started catalina using the "startup -security" command.

      permission java.util.SecurityPermission
"getProperty.login.configuration.provider";

The addition of the line above doesn't seem to make any impression
whatsoever. Any hints and suggestions are warmly welcomed, since I am out of
clues, tried whatever I could think of and am facing my Waterloo here.

Regards,

   Cor.