[
https://issues.apache.org/jira/browse/HTTPCLIENT-2086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17139525#comment-17139525
]
Eric Kerwin commented on HTTPCLIENT-2086:
-----------------------------------------
I'd love to assist if I could actually help. I've been looking at the parser
and it seems like you might want the scheme, as [~michael-o] mentions above.
I am not an expert on NTLM at all, but it looks like its challenge response
should not be tokenized, here's my challenge:
{code:java}
NTLM
TlRMTVNTUAACAAAAAAAAADgAAAABggiiS0u2y+0O6WIAAAAAAAAAAAAAAAA4AAAABgEAAAAAAA8={code}
I'm currently working on a forked version so I can provide a PR once I have an
NTLM parser ready. Is this a waste of my (and more importantly, your) time?
> NTLM Message parse Error
> ------------------------
>
> Key: HTTPCLIENT-2086
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2086
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Affects Versions: 5.0
> Reporter: Michael Wagner
> Priority: Minor
> Attachments: screenshot-1.png
>
>
> My Authentication endpoint returns an NTLM Message header like this:
> {code}
> "WWW-Authenticate: NTLM
> TlRMTVNTUAACAAAABgAGADgAAAAF.....QByAGcALgBkAGUABwAIAMG9LHviQtYBAAAAAA=="
> {code}
> Upon reading this header with {{AuthChallengeParser}} hc parses this field
> using the code in [line
> 70|https://github.com/apache/httpcomponents-client/blob/3730b03a99308ff99769fdd60e80a43230cf5aac/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/AuthChallengeParser.java#L70]:
> {code}
> if (!cursor.atEnd() && buffer.charAt(cursor.getPos()) == EQUAL_CHAR) {
> cursor.updatePos(cursor.getPos() + 1);
> final String value = tokenParser.parseValue(buffer, cursor,
> DELIMITER);
> return new BasicNameValuePair(token, value);
> }
> {code}
> When reading the first "=" char of the message, it interprets the value as a
> key-value pair. The first part of the NTLM message being the key and the
> second "=" the value.
> [Later|https://github.com/apache/httpcomponents-client/blob/3730b03a99308ff99769fdd60e80a43230cf5aac/httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/AuthChallengeParser.java#L126]
> an AuthChallenge is later created with
> {code}
> new AuthChallenge(challengeType, schemeName, null, params.size() > 0 ? params
> : null);
> {code}
> where {{value}} is null and params a list containing the NTLM message without
> the equals signs.
> Without the "==" the next auth step fails.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]