QUSIR / staff

Automatically exported from code.google.com/p/staff
Apache License 2.0
0 stars 0 forks source link

NTLM authentication support for staff #194

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I need needed ntlm authentication for webservices using staff...

I noticed axis2c 1.6.0 branch doesn't support it so, after some investigation I 
managed to compile a patch with all the modifications necesary to make ntlm 
work on axis (through libcurl), and I implemented a wrapper method for staff to 
be able to configure that connection...

I realize this code may not be added to staff trunk until axis2c 1.7 is 
released, but I attach the code in case someone needs to use that 
authentication...

I tested the code and it works, it connects to an NTLM server fine (tested with 
IIS7)
I couldn't find a way to test the ntlm proxy connection (I'm not used to 
windows servers and I didn't know how to configure it to work as a proxy), so I 
didn't created the wrapper for staff still, but It would be really simple to 
implement...

I hope it is useful to anyone, let me know if the patches need to be modified...
Regards

Original issue reported on code.google.com by alexmantaut on 5 Nov 2012 at 7:10

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, can't apply your axis2/c patch.

Looks like it created not in unified mode.

Please recreate it using that command line:

diff -u axis2c-src-1.6.0.orig/src/core/clientapi/options.c 
axis2c-src-1.6.0.orig.conax/src/core/clientapi/options.c > 
axis2c_ntlm_support.patch

One notice, staff's patch can be included into trunk, but must be surrounded 
with guard:

#ifdef WITH_NTLM
// ...
#endif

Then NTLM support can be enabled while compiling as follows:

make COMPILER_FLAGS=-DWITH_NTLM

Original comment by loentar on 6 Nov 2012 at 5:46

GoogleCodeExporter commented 9 years ago
Sorry, I've made a mistake when creating the axis2/c patch. Here it goes 
again...

Also I modified the staff patch to use the ifdef directive in order to 
incorporate it to trunk... tell me if any modifications need to be made on 
that...

Also when compiling axis2c, to enable ntlm support you need to run
./configure --enable-libcurl=yes 

in order to enable libcurl library...

Original comment by alexmantaut on 6 Nov 2012 at 2:02

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately, I can't apply patch for axis2/c: looks like it was created not 
on HEAD revision.

Anyway I will commit your patch for staff. Just modified it slightly.

Thank you for patch.

Original comment by loentar on 6 Nov 2012 at 6:21

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r716.

Original comment by loentar on 6 Nov 2012 at 6:21

GoogleCodeExporter commented 9 years ago
Dmitry, 
      I'm sorry I've forgot to specify, the patch was made to be applied to axis2/c 1.6.0 branch... it has multiple axis patches applied... In order to use it with trunk the patches from this issue must be applied:
https://issues.apache.org/jira/browse/AXIS2C-1370

(they're a little outdated so I applied them manually, if you need I can 
recopilate those changes and create a new patch)

Original comment by alexmantaut on 6 Nov 2012 at 7:14