Open rdnobrega opened 4 years ago
In fact, there is substantial differences in the two messages t1 messages.xlsx
I wonder if that is relevant
Thanks for raising this issue. It would be good to know what message (first or third) the request is failing on. Do you think you'd be able to setup a breakpoint either on line 92 of ntlm/lib/src/http.dart
(the first line of the _ntlm
function), or perhaps easier on your calling code, then just step into the request? I would good to know whether it got to the msg3
request. Even though the type 1 messages are different, the one's generated by this package should still be valid. It's also possible your server requires NTLMv2 authentication, which unfortuantely this package doesn't currently support.
Hi! I'm sending the messages i got:
From Chrome: Send T1 NTLM TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKALpHAAAADw==
Rec T2 NTLM TlRMTVNTUAACAAAABgAGADgAAAAFgomi3gZfEBk51ZgAAAAAAAAAAJIAkgA+AAAABgOAJQAAAA9EAE0AWgACAAYARABNAFoAAQAYAFIARQBDAFcAMQAyAFcARgBFAEQATQBaAAQAEgBEAE0AWgAuAEwATwBDAEEATAADACwAcgBlAGMAdwAxADIAdwBmAGUAZABtAHoALgBEAE0AWgAuAEwATwBDAEEATAAFABIARABNAFoALgBMAE8AQwBBAEwABwAIADnpXW8TSNYBAAAAAA==
Send T3 NTLM TlRMTVNTUAADAAAAGAAYAIYAAABKAUoBngAAAAAAAABYAAAAEAAQAFgAAAAeAB4AaAAAAAAAAADoAQAABYKIogoAukcAAAAP28iGbxUnIVx0glDk7PJA/HIAbgBvAGIAcgBlAGcAYQBEAEUAUwBLAFQATwBQAC0ATgBCADkASgA0AEIATQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkR75qQAw8R5fwbrNfY/X9AQEAAAAAAAA56V1vE0jWATv1eHwhItpHAAAAAAIABgBEAE0AWgABABgAUgBFAEMAVwAxADIAVwBGAEUARABNAFoABAASAEQATQBaAC4ATABPAEMAQQBMAAMALAByAGUAYwB3ADEAMgB3AGYAZQBkAG0AegAuAEQATQBaAC4ATABPAEMAQQBMAAUAEgBEAE0AWgAuAEwATwBDAEEATAAHAAgAOeldbxNI1gEGAAQAAgAAAAgAMAAwAAAAAAAAAAEAAAAAIAAADRa8LPS1GlqqcaFK0rxKgGrtaXoB9wyqNpIodcwXoFgKABAATbN1p8wpZhFINbHueulqhQkANABIAFQAVABQAC8AcAByAG8AagBlAHQAbwBzAC4AYwBoAGUAcwBmAC4AZwBvAHYALgBiAHIAAAAAAAAAAAA=
From Package:
T1 NTLM TlRMTVNTUAABAAAAB6IIogAAAAAoAAAAAAAAACgAAAAFAQAAAA8AAA==
raw T2 NTLM TlRMTVNTUAACAAAABgAGADgAAAAFgomiwhUOC7u6M2UAAAAAAAAAAJIAkgA+AAAABgOAJQAAAA9EAE0AWgACAAYARABNAFoAAQAYAFIARQBDAFcAMQAyAFcARgBFAEQATQBaAAQAEgBEAE0AWgAuAEwATwBDAEEATAADACwAcgBlAGMAdwAxADIAdwBmAGUAZABtAHoALgBEAE0AWgAuAEwATwBDAEEATAAFABIARABNAFoALgBMAE8AQwBBAEwABwAIAE8J4rAYSNYBAAAAAA==
T3 189 NTLM TlRMTVNTUAADAAAAGAAYAFgAAAAYABgAcAAAAAAAAABIAAAAEAAQAEgAAAAAAAAAWAAAAAAAAACIAAAABYKIogUBKAoAAAAPcgBuAG8AYgByAGUAZwBhAF7rXTnPQallAAAAAAAAAAAAAAAAAAAAABELvOqSs1TlInitYcCJK+3d62X/hR9tcw==
is this package written with this documentation? https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/033d32cc-88f9-4483-9bf2-b273055038ce
is this package written with this documentation? https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-nlmp/033d32cc-88f9-4483-9bf2-b273055038ce
I just found this link and I can see its from 2019. When I tried to use Xamarin for this same project years ago I remember to not be able to find this documentation.
It seems that for t1 message, that when also the workstation is not supplied, the flag NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED must be set to zero, similar to the domain flag... Sorry if this is too much messages.
Ok, I've applied that fix and also tried to properly implement NTLMv2. Would you be able to try it out? You'll need to set the version in your pubspec.yaml
to the latest commit of this repository like so:
dependencies:
ntlm:
git:
url: git://github.com/mrbbot/ntlm.git
ref: c8db7fabb9c892021bb003d5ab992dec4b283dca
Hi! It didn't work for my server. However, I'm studying the docs and I'll be debugging on my server and write code according to the specs. Once finished I'll be sure to make a pull request here!
same errors too (
Hi! Thanks for the package! I'm trying to use REST on a project server 2013 on top of a sharepoint 2013 on premisses. However, when trying to get a simple endpoint it returns me 401. The code:
client.get('https://<HOST>/_api/ProjectServer/Projects', headers: { 'Host': '<HOST>', 'Connection': 'keep-alive', 'Accept': 'application/json;odata=verbose', }).then((response) {
I can retreat the data using chrome/explorer/postman just fine.. Further investigating, It seems that the T1 message is being differently. I dont use domain nor workstation to signin. It follows:
PACKAGE T1 TlRMTVNTUAABAAAAB6IIogAAAAAoAAAAAAAAACgAAAAFAQAAAA8AAA== CHROME T1 TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKALpHAAAADw== EXPLORE T1 TlRMTVNTUAABAAAAB4IIogAAAAAAAAAAAAAAAAAAAAAKALpHAAAADw==
Chrome and Explorer do agree on the type1 message. Is something i'm doing wrong?