• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

security-identity tag for Message Driven Beans

Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I read in Mastering EJB by Ed Roman that � it is illegal for Message Driven Bean�s to perform any programmatic and declarative security� (page no: 267). Is this statement correct? Aren�t MDB�s allowed to use declarative security?
They are allowed to use the <run-as> tag in the <security-identity> section in the DD. So to use <run-as> an abstract security role has to be given in the <role-name> tag in the <security-identity> tag.
But since MDB�s don�t have any client calling them, security roles need not be defined. But to allow the bean to run as with another identity, an abstract security role needs to be defined but I guess that role will not have any mapping to a real security role in the particular application domain.
Can any one help me with a scenario in which such a case would happen where any mapping between the abstract role and the actual role is not needed?
Posts: 3647
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think, Ed Roman is right.
*Declarative security* and *programmatic security* as NOT the same as *security identity*.
So, you can't check role of caller, or define security in DD for MDB.
There is NO caller, and there is no role.
But, you can define SECURITY IDENTITY for MDB, so it can represent a caller
with security role.
Cheers !!
Police line, do not cross. Well, this tiny ad can go through:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic