History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-433
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Piotr Smolinski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

Missing NTLM support for dynamic client

Created: 31/May/06 09:07 AM   Updated: 20/Aug/06 02:59 PM
Component/s: Core
Affects Version/s: 1.1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Java Source File CommonsHttpMessageSender.java (13 kb)



 Description  « Hide
org.codehaus.xfire.transport.http.CommonsHttpMessageSender does not support NTLM authentication.

Here is snippet from XFire 1.1 about authorization:

String username = (String) context.getContextualProperty(Channel.USERNAME);
if (username != null)
{
String password = (String) context.getContextualProperty(Channel.PASSWORD);
client.getParams().setAuthenticationPreemptive(true);
state.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(username, password));
}

There should be a way to plug custom credentials to the transport stack. To workaround this I had to reimplement
whole http handling stack as subsequent layers are created as local variables instead of access by dependency.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tomasz Sztelak - 25/Jul/06 08:20 AM
Can attach this patch or at least some code sample ? This will make our work easier

Sara - 10/Aug/06 02:26 PM
Can you post your client code as well?

Piotr Smolinski - 10/Aug/06 05:55 PM
Approach similar to Axis 1.x:

int domainIndex = username.indexOf('
');
if (domainIndex > 0 && username.length() > domainIndex + 1) { state.setCredentials( AuthScope.ANY, new NTCredentials( username.substring(0, domainIndex), password, "localhost", // TODO: resolve local host name username.substring(domainIndex+1))); } else { state.setCredentials( AuthScope.ANY, new UsernamePasswordCredentials( username, password)); }

Other possible solution:

Add service parameter Channel.AUTHTYPE /"Basic", "NTLM"/ to distinguish between types of authentication schemes and Channel.DOMAIN to avoid parsing username.

Piotr


Tomasz Sztelak - 20/Aug/06 02:59 PM
Code added to svn