cancel
Showing results for 
Search instead for 
Did you mean: 

Creating and mapping a new security role in ejb

Former Member
0 Kudos

Hi Experts,

I use NW 7.0.

I need to create an ejb that will work only with users that are assigned to some UME group called "DUET_BUSINESS_GROUP".

I have created new security role (DUET_BUSINESS) in my ejb-jar.xml.

In ejb-j2ee-engine.xml the role was set with No mapping.

The ejb has been deployed successfully after the above change.

Then I have created manually a new group: DUET_BUSINESS_GROUP in UME.

The last step was to define the role-group mapping in Visual Admin. I went to Policy Configurations of Security Provider and made a mapping between the security role and the UME group.

Will it always work ?

Have I made everything to make it work ?

Is there a way to make the role-group mapping programmatically ?

Regards,

Slavik.

Edited by: Stanislav Lvovsky on Nov 4, 2009 8:43 AM

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Slavik

>Will it always work ?

What do you mean?

>Have I made everything to make it work ?

Yes, it shall work.

>Is there a way to make the role-group mapping programmatically ?

In fact the operation belongs to administrative or configuration phase of your App's life cycle. Naturally It's not a developer's responsibility. From other point of view at development time you cannot predict UME roles/groups that will be on J2EE server during application deployment. Developer cannot predict even target J2EE server. Different servers can have own UME roles/groups.

Still at development time it's possible to design very restricted mapping. There are three constants 'all', 'administrators', 'guests' which you can use in XML descriptors. These constants will be mapped to the corresponding UME roles during deployment.

BR, Siarhei

Answers (0)