• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic