• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Custom Policy Class in JAAS

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am facing problems in implementing JAAS with cutom Policy class. I have created a CustomPolicy class which extends from sun.security.provider.PolicyFile class. In the java.security class I have set the property policy.provider to the custom class and pass the policy file name as command line option.

But when I run the application the custom policy file is not being used. I have printed the policy currently being used and it shows sun.security.provider.PolicyFile.

I don't understand what is going wrong. I have tried to look into the source code to find out which class is creating the Policy class object and where is the getPermissions method invoked, but neither the SecurityManager, nor the AccessController has that.

Can some one please help me to resolve the problem and also to understand who creates the Policy object and who calls the getPermissions method.

Thanks in advance

---
Regards
Ankur
 
reply
    Bookmark Topic Watch Topic
  • New Topic