> Hi,
>
[quoted text clipped - 15 lines]
> Any ideas or opinions would be appreciated.
> Regards, Oliver Plohmann
From what I understood, you're right. Passing credentials to a method
and the method determining whether to execute or not is not a good
idea under most circumstances.
That is why Java EE supports the security model based on descriptors,
where by you declare roles, assign users to those roles and then have
the permissions managed on the methods based on these roles, all
external to the application in the form of deployment descriptors.
This is also referred to as the declarative security model (vs. the
programmatic security model you've mentioned in the post).
Here is a good tutorial by Sun on EE Security :
http://java.sun.com/javaee/5/docs/tutorial/doc/bnbwk.html
-cheers,
Manish
Martin Gregorie - 01 Dec 2007 17:32 GMT
>> Hi,
>>
[quoted text clipped - 29 lines]
> Here is a good tutorial by Sun on EE Security :
> http://java.sun.com/javaee/5/docs/tutorial/doc/bnbwk.html
I assume the OP has these sensitive classes in a package. If so, why
can't they simply be declared as "protected class", which would restrict
access to package members?

Signature
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |