Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: how to set the username & password dynamically using Rampart: msg#00150

apache.webservices.axis-c.user

Subject: Re: how to set the username & password dynamically using Rampart

Hi Murali,
Rampart/C[1] is the security module of Axis2/C. And it is based on the security policy assertions. So in order to enable username tokens, you need to engage Rampart/C with axis2/C. Please look at the scenario2, which shows how to enable user name tokens. And I hope following description would be a help.

To add a usernametoken you need to include it under the sp:SignedSupportingTokens assertion. This is how you do it in the policy file.
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
</wsp:Policy>
</sp:SignedSupportingTokens>

In addition you need to tell, which username should be included in the Usernametoken. This can be done using following assertion under <RampartConfigs>
<rampc:User>Alice</rampc:User>

Like for the user name we do not specify the password in the configuration file. instead we use a password callback mechanism, where we get a password for the above mentioned user name. The user has to specify a DLL or a module to load the password from. For this, following assertion is used.
<rampc:PasswordCallbackClass>/home/Alice/my_modules/pwcb.so</rampc:PasswordCallbackClass>

So what Rampart/C does is, first it loads the module dynamically and then call the function to get the password, which has to be implemented by the user. This gives user flexibility to call databases, flat files or any other storage mechanism to extract the password.

The username token profile allows two ways to send a password. Either you can send the password in the pain text form or you can send as a digest of the password. This can be specified using following assertion.
<rampc:PasswordType>Digest/PlainText</rampc:PasswordType>

Note that we are about to release version 1.0. And the artifacts are here. You may use these releases for now. We will announce once the version 1.0 is released.
Cheers,
Kaushalye
[1] http://people.apache.org/~kaushalye/release/rampart-c/1.0.0/

Murali Konnipati wrote:

Hi All,

I am very new to Axis2c. I am trying to develop a client for my .Net Web service. For this .Net web service, i need to send the username & password in the UsernameToken element of the SOAP header.

So, i am planning to use the Rampart API to set the username & password in my code. Can anybody please tell me, how to set the username & password in the client through programmatically..


Thanks & Regards,

Murali Krishna K



--
http://kaushalye.blogspot.com/
http://wso2.org/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation