dcsimg
Facing problem with the JAAS code
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rajeev_nair
Posted On:   Thursday, August 26, 2004 10:31 PM

I was trying to run the code given under the section Extend JAAS for class instance-level authorization in the website http://www-106.ibm.com/developerworks/java/library/j-jaas/.I have run the code as per the instructions given in the page. I am getting the error as below... D:JaasExample>java -Djava.security.manager -Djava.security.policy=policy -Dcom. ibm.resource.security.auth.policy=ResourcePolicy.xml -Djava.security.auth.login. config=login.conf com.ibm.resource.security.example.Example Users file: users.xml Group file: groups.xml userid: admin password: passw0rd LoginModuleExample: userid = admin LoginModuleExample: password = passw0rd LoginModuleExample: authent   More>>

I was trying to run the code given under the section Extend JAAS for class instance-level authorization in the website http://www-106.ibm.com/developerworks/java/library/j-jaas/.I have run the code as per the instructions given in the page. I am getting the error as below...



D:JaasExample>java -Djava.security.manager -Djava.security.policy=policy -Dcom.
ibm.resource.security.auth.policy=ResourcePolicy.xml -Djava.security.auth.login.
config=login.conf com.ibm.resource.security.example.Example
Users file: users.xml
Group file: groups.xml
userid: admin
password: passw0rd
LoginModuleExample: userid = admin
LoginModuleExample: password = passw0rd
LoginModuleExample: authentication succeeded
The authenticated user has the following Principals:
PrincipalExample: admin
PrincipalExample: administrators
PrincipalExample: users

Creating a new UserProfile...
Exception in thread "main" java.security.AccessControlException: access denied c
om.ibm.resource.security.example.UserProfile:create
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at com.ibm.resource.security.example.UserProfile.(UserProfile.java
:15)
at com.ibm.resource.security.example.actions.CreateUserProfileAction.run
(CreateUserProfileAction.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at com.ibm.resource.security.example.Example.main(Example.java:75)



D:JaasExample>



I am not getting why it is so, can anybody gave an idea ?

   <<Less
About | Sitemap | Contact