In EJB model is posibility to add roles, and link permission to method execution with them.
And here is my question:
Suppose that, a client is a simple command line program
on a Unix platform.
How the client can tell: "i'm in role...". Or maybe somebody else can authorize such client, but how?
Thx for any info,
you can simply pass your user name an d password through command line or through some frame which u can develop useing awt.
sorry, if my question wasn't clear :)
yes, i can pass it to client program...
but how the client program can authorize itself, when it's
calling EJB method, which required some role (on the server side you can check it calling isCallerInRole(String))
thx for the post :)
You have to create a Properties object and store userid and passord as properties(like initial context factory) and pass the properties object to the constructor of InitialContext. This will logon to the app server ejb context.
Yes, but the spec does not cover the creation of the roles and users and how they map. That's server specific.
You provide user and password when you authenticate to JNDI to get the initial context object (by default your apps server probably doesn't authenticate, so lets anyone in.)