• 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

Questions on Policy and Classloader setting Permissions

 
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a few questions:
When I call AccessController.checkPermission for the first time, it calls
Policy.getPermissions(CodeSource). This then returns a permission
collection for the codesource (essentially a protection domain).
1. Since the classloaders set the protectiondomain for classes, is this
essentially a guaranteed "override"?
2. This is only called the first time. How would I make it consult the
policy every time, or is that impossible?
3. Will it always call "Policy.getPermissions(..)" the first time? Or is
this only done when no AccessControlContext is passed in? Or is it only
when no non-null ProtectionDomain was set by the classloader?
Why is it so all over the place? There's about 5 different places where
permissions are set for everything, and they it's not clear what overrides
what? What was the thinking behind this?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic