users@glassfish.java.net

HTTP Basic Authentication - Roles/Groups

From: <forums_at_java.net>
Date: Mon, 16 May 2011 09:55:59 -0500 (CDT)

Hi,

I have developed a SOAP webservice in OpenESB and added the HTTP basic

authentication on top of it ( added the policy ). I have used LDAP realm to

authenticate the users from the LDAP server and its working fine.

 

Below is the code snippet of the WSDL used to point to LDAP realm.

 

    <service name="casaService1">

        <port name="casaPort1" binding="tns:casaBinding1">

            <soap:address

location="http://localhost:9080/SOAPWSService/SOAPWS"/>

            <wsp:PolicyReference
URI="#HttpBasicAuthBindingLdapRealmPolicy"/>

        </port>

    </service>

        <wsp:Policy wsu:Id="HttpBasicAuthBindingLdapRealmPolicy">

        <mysp:MustSupportBasicAuthentication on="true">

            <mysp:BasicAuthenticationDetail>

               <mysp:Realm realmName="LdapRealm" />

            </mysp:BasicAuthenticationDetail>

        </mysp:MustSupportBasicAuthentication>

    </wsp:Policy>

 

The LDAP realm details from the Glassfish Server are as below:

JAAS Context - ldapRealm

Directory - ldap://localhost:389

Based DN - dc=example,dc=com

Bind DN - cn=Directory Manager

Password - ldap123

 

Now i would like to provide access to only users in a particular group. I
have

updated the Assigned Groups in the LDAP realm ( admin console ) to the group
for

which i would like to provide access to. But its not working.

FOr EJB webservices,we can use the web.xml , sun-web.xml,deployment
descriptor

files to add roles and map groups to this roles.

But how do we implement the same in OpenESB ( service assemblies ). Do we
have

to modify the WSDL ? Please share some info if anyone has worked on this
before.

Thanks,

Kris.


--
[Message sent by forum member 'phani16']
View Post: http://forums.java.net/node/802623