You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Peter Wilkes <pw...@cowpie.acm.vt.edu> on 2006/08/22 17:19:20 UTC

Axis2 authenticating with IIS/Active Directory

hello,

	first time poster. ^_^ please forgive me.

i'm trying to use Axis2 to connect a Java client to a .NET service running
on IIS.  if i don't require authentication i have no problem however my
group would like to use Integrated Windows Authentication (IWA) to only
allow users within a specific group access to our website.  i've looked
into axis2 and other avenues and are slightly confused.

i've looked into kerberos and have code that will give me a kerberos token
to my java client from the active directory.  what i am looking to do is
either give that token to axis2 and have it authenticate with the IIS
website or use that token somehow to get credientals axis could use to
authenticate with the IIS server.

has anyone had any success with this?

we are taking our application in steps also. so if possible i'd like to
use a popup to ask the user form their username/password and use that to
authenticate with the IIS/AD. then if possible move to the single sign-on
approach. however we don't want to put the username/password into a text
file.  we dont have a problem prompting for it however don't want to put
it in a xml/txt file.

does anyone have an example that would show how to at runtime configure
Axis2 to use a CommonHTTPTransportSender to use NT Authentication and
allow us to set the username and password all at runtime?

thank you very much for any assistance you can provide.

Pete

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 authenticating with IIS/Active Directory

Posted by Peter Wilkes <pw...@cowpie.acm.vt.edu>.
Saminda,

	i was able to figure out what my problem was. i was downloading
Axis2 1.0 and apparently the ntlm authentication method isnt available in
1.0 it requires the nightly builds.  after i downloaded and installed a
nightly build i was able to successfully use NTLM authentication with
Axis2.

thank you

Pete

On Wed, 23 Aug 2006, Saminda Abeyruwan wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> HttpTransportProperties.NTLMAuthentication ntlmAuthentication =
>                     new HttpTransportProperties.NTLMAuthentication();
>
>             ntlmAuthentication.setUsername("axis2");
>             ntlmAuthentication.setPassword("axis2");
>             ntlmAuthentication.setHost("axis2");
>             ntlmAuthentication.setPort(9443);
>             ntlmAuthentication.setRealm("someRealm");
>
>             options.setProperty(
>
> org.apache.axis2.transport.http.HTTPConstants.NTLM_AUTHENTICATION,
>                     ntlmAuthentication);
>
> Please do try this,
>
> Thank you
>
> Saminda
>
>
> Peter Wilkes wrote:
> > Saminda,
> >
> > 	thank you for the link.  that article is a great help however i am
> > still a little confused.
> >
> > from the article it seems that i want to create some
> > HttpTransportProperties and specify that i want NTLM Authentication and
> > then set these properties for the options for the stub. however i'm not
> > having much luck.
> >
> > my compiler cant seem to find the
> > HttpTransportProperties.NTLMAuthenication class.  i have checked the
> > online documentation and it doesnt seem to be there as well.  do i need to
> > put my imports in a particular order to get a different version of this
> > object?
> >
> > i am using the axis2 1.0 download on the axis2 website.  the documentation
> > you pointed me to said it required commons-http3.0 which is in my
> > classpath.  i tried moving it to the front to no avail. so far my code
> > looks similiarly to this
> >
> > String serviceLoc = "myServiceURI";
> > MyServiceStub stub = null;
> > Options options = new Options();
> >
> > HttpTransportProperties.NTLMAuthenication ntlmAuthentication = null; //
> > this line generates an error
> >
> > options.setProperty(org.apache.axis2.transport.http.HTTPConstants.NTLM_AUTHENTICATION,
> > ntlmAuthentication); //this line also generates an error
> >
> > stub = new MyServiceStub(serviceLoc);
> > stub._getServiceClient().setOptions(options);
> >
> >
> > thank you
> >
> > Pete
> >
> > On Wed, 23 Aug 2006, Saminda Abeyruwan wrote:
> >
> >
> > http://www.wso2.net/kb/161
> >
> > Peter Wilkes wrote:
> >
> >>hello,
> >
> >>	first time poster. ^_^ please forgive me.
> >
> >>i'm trying to use Axis2 to connect a Java client to a .NET service running
> >>on IIS.  if i don't require authentication i have no problem however my
> >>group would like to use Integrated Windows Authentication (IWA) to only
> >>allow users within a specific group access to our website.  i've looked
> >>into axis2 and other avenues and are slightly confused.
> >
> >>i've looked into kerberos and have code that will give me a kerberos token
> >>to my java client from the active directory.  what i am looking to do is
> >>either give that token to axis2 and have it authenticate with the IIS
> >>website or use that token somehow to get credientals axis could use to
> >>authenticate with the IIS server.
> >
> >>has anyone had any success with this?
> >
> >>we are taking our application in steps also. so if possible i'd like to
> >>use a popup to ask the user form their username/password and use that to
> >>authenticate with the IIS/AD. then if possible move to the single sign-on
> >>approach. however we don't want to put the username/password into a text
> >>file.  we dont have a problem prompting for it however don't want to put
> >>it in a xml/txt file.
> >
> >>does anyone have an example that would show how to at runtime configure
> >>Axis2 to use a CommonHTTPTransportSender to use NT Authentication and
> >>allow us to set the username and password all at runtime?
> >
> >>thank you very much for any assistance you can provide.
> >
> >>Pete
> >
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >>For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFE7G86YmklbLuW6wYRAmbmAKCx5HXxOknrXRId60OSpKHb/s3tmQCfdLPk
> S+YDLUg0YTX1T55EjEKrcD0=
> =brCT
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 authenticating with IIS/Active Directory

Posted by Saminda Abeyruwan <sa...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

HttpTransportProperties.NTLMAuthentication ntlmAuthentication =
                    new HttpTransportProperties.NTLMAuthentication();

            ntlmAuthentication.setUsername("axis2");
            ntlmAuthentication.setPassword("axis2");
            ntlmAuthentication.setHost("axis2");
            ntlmAuthentication.setPort(9443);
            ntlmAuthentication.setRealm("someRealm");

            options.setProperty(

org.apache.axis2.transport.http.HTTPConstants.NTLM_AUTHENTICATION,
                    ntlmAuthentication);

Please do try this,

Thank you

Saminda


Peter Wilkes wrote:
> Saminda,
> 
> 	thank you for the link.  that article is a great help however i am
> still a little confused.
> 
> from the article it seems that i want to create some
> HttpTransportProperties and specify that i want NTLM Authentication and
> then set these properties for the options for the stub. however i'm not
> having much luck.
> 
> my compiler cant seem to find the
> HttpTransportProperties.NTLMAuthenication class.  i have checked the
> online documentation and it doesnt seem to be there as well.  do i need to
> put my imports in a particular order to get a different version of this
> object?
> 
> i am using the axis2 1.0 download on the axis2 website.  the documentation
> you pointed me to said it required commons-http3.0 which is in my
> classpath.  i tried moving it to the front to no avail. so far my code
> looks similiarly to this
> 
> String serviceLoc = "myServiceURI";
> MyServiceStub stub = null;
> Options options = new Options();
> 
> HttpTransportProperties.NTLMAuthenication ntlmAuthentication = null; //
> this line generates an error
> 
> options.setProperty(org.apache.axis2.transport.http.HTTPConstants.NTLM_AUTHENTICATION,
> ntlmAuthentication); //this line also generates an error
> 
> stub = new MyServiceStub(serviceLoc);
> stub._getServiceClient().setOptions(options);
> 
> 
> thank you
> 
> Pete
> 
> On Wed, 23 Aug 2006, Saminda Abeyruwan wrote:
> 
> 
> http://www.wso2.net/kb/161
> 
> Peter Wilkes wrote:
> 
>>hello,
> 
>>	first time poster. ^_^ please forgive me.
> 
>>i'm trying to use Axis2 to connect a Java client to a .NET service running
>>on IIS.  if i don't require authentication i have no problem however my
>>group would like to use Integrated Windows Authentication (IWA) to only
>>allow users within a specific group access to our website.  i've looked
>>into axis2 and other avenues and are slightly confused.
> 
>>i've looked into kerberos and have code that will give me a kerberos token
>>to my java client from the active directory.  what i am looking to do is
>>either give that token to axis2 and have it authenticate with the IIS
>>website or use that token somehow to get credientals axis could use to
>>authenticate with the IIS server.
> 
>>has anyone had any success with this?
> 
>>we are taking our application in steps also. so if possible i'd like to
>>use a popup to ask the user form their username/password and use that to
>>authenticate with the IIS/AD. then if possible move to the single sign-on
>>approach. however we don't want to put the username/password into a text
>>file.  we dont have a problem prompting for it however don't want to put
>>it in a xml/txt file.
> 
>>does anyone have an example that would show how to at runtime configure
>>Axis2 to use a CommonHTTPTransportSender to use NT Authentication and
>>allow us to set the username and password all at runtime?
> 
>>thank you very much for any assistance you can provide.
> 
>>Pete
> 
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>>For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 

- ---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE7G86YmklbLuW6wYRAmbmAKCx5HXxOknrXRId60OSpKHb/s3tmQCfdLPk
S+YDLUg0YTX1T55EjEKrcD0=
=brCT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 authenticating with IIS/Active Directory

Posted by Peter Wilkes <pw...@cowpie.acm.vt.edu>.
Saminda,

	thank you for the link.  that article is a great help however i am
still a little confused.

from the article it seems that i want to create some
HttpTransportProperties and specify that i want NTLM Authentication and
then set these properties for the options for the stub. however i'm not
having much luck.

my compiler cant seem to find the
HttpTransportProperties.NTLMAuthenication class.  i have checked the
online documentation and it doesnt seem to be there as well.  do i need to
put my imports in a particular order to get a different version of this
object?

i am using the axis2 1.0 download on the axis2 website.  the documentation
you pointed me to said it required commons-http3.0 which is in my
classpath.  i tried moving it to the front to no avail. so far my code
looks similiarly to this

String serviceLoc = "myServiceURI";
MyServiceStub stub = null;
Options options = new Options();

HttpTransportProperties.NTLMAuthenication ntlmAuthentication = null; //
this line generates an error

options.setProperty(org.apache.axis2.transport.http.HTTPConstants.NTLM_AUTHENTICATION,
ntlmAuthentication); //this line also generates an error

stub = new MyServiceStub(serviceLoc);
stub._getServiceClient().setOptions(options);


thank you

Pete

On Wed, 23 Aug 2006, Saminda Abeyruwan wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> http://www.wso2.net/kb/161
>
> Peter Wilkes wrote:
> > hello,
> >
> > 	first time poster. ^_^ please forgive me.
> >
> > i'm trying to use Axis2 to connect a Java client to a .NET service running
> > on IIS.  if i don't require authentication i have no problem however my
> > group would like to use Integrated Windows Authentication (IWA) to only
> > allow users within a specific group access to our website.  i've looked
> > into axis2 and other avenues and are slightly confused.
> >
> > i've looked into kerberos and have code that will give me a kerberos token
> > to my java client from the active directory.  what i am looking to do is
> > either give that token to axis2 and have it authenticate with the IIS
> > website or use that token somehow to get credientals axis could use to
> > authenticate with the IIS server.
> >
> > has anyone had any success with this?
> >
> > we are taking our application in steps also. so if possible i'd like to
> > use a popup to ask the user form their username/password and use that to
> > authenticate with the IIS/AD. then if possible move to the single sign-on
> > approach. however we don't want to put the username/password into a text
> > file.  we dont have a problem prompting for it however don't want to put
> > it in a xml/txt file.
> >
> > does anyone have an example that would show how to at runtime configure
> > Axis2 to use a CommonHTTPTransportSender to use NT Authentication and
> > allow us to set the username and password all at runtime?
> >
> > thank you very much for any assistance you can provide.
> >
> > Pete
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFE6/BnYmklbLuW6wYRAgH2AJ4g8/Y9FZXiC4Yid9kYyB8b9SNRkgCeP8WI
> oGBP3IrEUAimgK/39QnqQ0o=
> =7GCT
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 authenticating with IIS/Active Directory

Posted by Saminda Abeyruwan <sa...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://www.wso2.net/kb/161

Peter Wilkes wrote:
> hello,
> 
> 	first time poster. ^_^ please forgive me.
> 
> i'm trying to use Axis2 to connect a Java client to a .NET service running
> on IIS.  if i don't require authentication i have no problem however my
> group would like to use Integrated Windows Authentication (IWA) to only
> allow users within a specific group access to our website.  i've looked
> into axis2 and other avenues and are slightly confused.
> 
> i've looked into kerberos and have code that will give me a kerberos token
> to my java client from the active directory.  what i am looking to do is
> either give that token to axis2 and have it authenticate with the IIS
> website or use that token somehow to get credientals axis could use to
> authenticate with the IIS server.
> 
> has anyone had any success with this?
> 
> we are taking our application in steps also. so if possible i'd like to
> use a popup to ask the user form their username/password and use that to
> authenticate with the IIS/AD. then if possible move to the single sign-on
> approach. however we don't want to put the username/password into a text
> file.  we dont have a problem prompting for it however don't want to put
> it in a xml/txt file.
> 
> does anyone have an example that would show how to at runtime configure
> Axis2 to use a CommonHTTPTransportSender to use NT Authentication and
> allow us to set the username and password all at runtime?
> 
> thank you very much for any assistance you can provide.
> 
> Pete
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE6/BnYmklbLuW6wYRAgH2AJ4g8/Y9FZXiC4Yid9kYyB8b9SNRkgCeP8WI
oGBP3IrEUAimgK/39QnqQ0o=
=7GCT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org