• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Custom Security like EJB using JAAS

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I want to implement security model for granting access permissions at object method level.
suppose i have a class

An object of account class is created by manager and passed to report generator for generate report

one solution of this problem is to make an interface with only getBalance() method, and implement this in Account class, and pass Account object to report generator by this reference.
But the problem is that, I don't know in advance that where this object will be passed in future. for each place method access permissions are different for account object. It means i have to create all possible interfaces and implement that..
JBoss solves this problem by generating security code for each method, where it checks user role before calling method of actual EJB Object. EJB server uses request intercepter for this.
Do i have to create request interceptors for all of my classes like..

Is there any thing in JAAS, which is used to declare this kind of method permissions without modifying Account class code.
like
permissions.xml
<class name="Account">
<method-permission name="getBalance">ReportGenerator<method-permission>
</class>
rahul
SCJP2, SCWCD,IBM XML, IBM UML, IBM J2EE, Oracle PL/SQL
[ November 26, 2002: Message edited by: Rahul Parsad ]
[ November 26, 2002: Message edited by: Rahul Parsad ]
 
No holds barred. And no bars holed. Except this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic