[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with ntlm authentication (message type-2)
Hello
I'm calling a web Service (SharePoint REST service) which runs under
NTLM authentication using the NTLM patch written by Thomas.
The debug log looks good till HTTPAPI tries to process the recvdoc()
procedure. The web service response is a simple true/false flag, we�
tried both for the response, json and xml which hasn�any effect to
the error message. The error message in the debug log is �iled
validating type-2 message�hich comes from NTMLR4 module. This is
confusing for me, because before the error message I� got an HTTP 200
response code and the correct response message so I� assumed that the
authentication process was successfully. So the question is why I�
got the �iled validating type-2 message�fter the whole processing
with the webserver is done? I� seen in debug, that the field
ntlmType2Msg
from dsAuth is empty before the check for the message type:
��� type2Msg =
Message_decodeBase64(dsAuth.ntlmType2Msg);��������������� ����������������������������������� ������������������������������������ ���������������������������� ����������� if (not Message_isType2(type2Msg));
�������������� dsAuth.ntlmStatus =
NTLM_NONE;������������������������������� ��������������� �������������� SetError(HTTP_NDAUTH: ' failed validating
type-2 message');
�������������� rc =
-1;���������������������������������� ���������������������������������� �������������� leave;��������������������������������� ����������������������������������� �� ����������� endif;�
I� attached the whole debug log and a log from SoapUI for the same
service.
Thanks,
Timo
HTTPAPI Ver 1.25beta2 released 2012-03-06
NTLM Ver 1.3 released 2013-04-09
OS/400 Ver V7R1M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: de.vega.corp
DNS server found: XXX.XX.X.XX
DNS server found: XXX.XX.X.XX
http_setauth(): entered
NTLM_setCredentials(): entered
http_persist_get(): entered
http_persist_req(GET) entered.
http_long_ParseURL(): entered
http_long_ParseURL(): entered
NTLM_negotiateAuthentication(): entered
http_long_ParseURL(): entered
http_persist_get(): entered
http_persist_req(GET) entered.
http_long_ParseURL(): entered
http_long_ParseURL(): entered
do_oper(GET): entered
AuthPlugin_produceAuthenticationHeader(): entered
There are 0 cookies in the cache
GET /SPUserWebservice/SPUserWebservice.svc/rest/SetUserProfilePropertyXML?mysiteUrl=http://my.company.corp&username=DE\\UserName&property=ERPImportData&value="PurchaseOrder=316883" HTTP/1.1
Host: spservices.company.corp
User-Agent: http-api/1.24
Authorization: NTLM TlRMTVNTUAABAAAAByIAAAAAAAAAAAAACgAKACAAAABRUEFERVYwMEQ5
recvresp(): entered
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 81
Content-Type: application/xml; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 23 Jul 2014 08:45:28 GMT
SetError() #13: HTTP/1.1 200 OK
recvresp(): end with 200
recvdoc parms: identity 81
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</string>
SetError() #36: failed validating type-2 message
http_close(): entered
Wed Jul 23 13:54:33 CEST 2014:DEBUG:>> "GET /SPUserWebservice/SPUserWebservice.svc/rest/SetUserProfilePropertyXML?mysiteUrl=http%3A%2F%2Fmy.company.corp&username=DE%5C%5CUserName&property=ERPImportData&value=%22PurchaseOrder%3D316888%22 HTTP/1.1[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:>> "Host: spservices.company.corp[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:>> "[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "Cache-Control: private[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "Content-Length: 81[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "Content-Type: application/xml; charset=utf-8[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "Server: Microsoft-IIS/8.0[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "X-AspNet-Version: 4.0.30319[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "Date: Wed, 23 Jul 2014 11:54:33 GMT[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "[\r][\n]"
Wed Jul 23 13:54:33 CEST 2014:DEBUG:<< "<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">true</string>"
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------