I get this error when I call logincontextobject.Login();
Policy File: grant Principal chp02.UserPrincipal "user" { // not granted anything }; grant Principal chp02.SysAdminPrincipal "sysadmin" { permission java.io.FilePermission "conf/chp02.policy", "read"; };
Configuration File
chp02 { chp02.auth.SimpleLoginModule REQUIRED; };
Can someone help
Thanks Shashank
SCJP 1.4, SCWCD 1.4, SCBCD 1.5
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35237
7
posted
0
Your post seems to contain the answer to your question already: the user running the application needs to have the "AuthPermission createLoginContext.chp02" permission.
to the "user" and "sysadmin" entries in the policy file. Once that works, other permissions may also be needed; have a look at the javadocs of the AuthPermission class for more detail.