{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/beats/issues/5237","repository_url":"https://api.github.com/repos/elastic/beats","labels_url":"https://api.github.com/repos/elastic/beats/issues/5237/labels{/name}","comments_url":"https://api.github.com/repos/elastic/beats/issues/5237/comments","events_url":"https://api.github.com/repos/elastic/beats/issues/5237/events","html_url":"https://github.com/elastic/beats/issues/5237","id":260313462,"node_id":"MDU6SXNzdWUyNjAzMTM0NjI=","number":5237,"title":"Heartbeat support for NTLM auth","user":{"login":"brandonmensing","id":12900190,"node_id":"MDQ6VXNlcjEyOTAwMTkw","avatar_url":"https://avatars0.githubusercontent.com/u/12900190?v=4","gravatar_id":"","url":"https://api.github.com/users/brandonmensing","html_url":"https://github.com/brandonmensing","followers_url":"https://api.github.com/users/brandonmensing/followers","following_url":"https://api.github.com/users/brandonmensing/following{/other_user}","gists_url":"https://api.github.com/users/brandonmensing/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonmensing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonmensing/subscriptions","organizations_url":"https://api.github.com/users/brandonmensing/orgs","repos_url":"https://api.github.com/users/brandonmensing/repos","events_url":"https://api.github.com/users/brandonmensing/events{/privacy}","received_events_url":"https://api.github.com/users/brandonmensing/received_events","type":"User","site_admin":false},"labels":[{"id":459123149,"node_id":"MDU6TGFiZWw0NTkxMjMxNDk=","url":"https://api.github.com/repos/elastic/beats/labels/Heartbeat","name":"Heartbeat","color":"008000","default":false},{"id":78874874,"node_id":"MDU6TGFiZWw3ODg3NDg3NA==","url":"https://api.github.com/repos/elastic/beats/labels/enhancement","name":"enhancement","color":"fbca04","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-25T15:13:32Z","updated_at":"2018-11-22T10:50:45Z","closed_at":null,"author_association":"NONE","body":"NTLM authentication is required in order to poll certain endpoints on Microsoft services/infrastructure when configured with [NTLM](https://en.wikipedia.org/wiki/NT_LAN_Manager). \r\n"},"comment":{"url":"https://api.github.com/repos/elastic/beats/issues/comments/440991501","html_url":"https://github.com/elastic/beats/issues/5237#issuecomment-440991501","issue_url":"https://api.github.com/repos/elastic/beats/issues/5237","id":440991501,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDk5MTUwMQ==","user":{"login":"gurumaia","id":8412398,"node_id":"MDQ6VXNlcjg0MTIzOTg=","avatar_url":"https://avatars2.githubusercontent.com/u/8412398?v=4","gravatar_id":"","url":"https://api.github.com/users/gurumaia","html_url":"https://github.com/gurumaia","followers_url":"https://api.github.com/users/gurumaia/followers","following_url":"https://api.github.com/users/gurumaia/following{/other_user}","gists_url":"https://api.github.com/users/gurumaia/gists{/gist_id}","starred_url":"https://api.github.com/users/gurumaia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gurumaia/subscriptions","organizations_url":"https://api.github.com/users/gurumaia/orgs","repos_url":"https://api.github.com/users/gurumaia/repos","events_url":"https://api.github.com/users/gurumaia/events{/privacy}","received_events_url":"https://api.github.com/users/gurumaia/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T10:50:45Z","updated_at":"2018-11-22T10:50:45Z","author_association":"NONE","body":"I've come across this issue because I need to test an NTLM-enabled URL and decided to take a look at the code. I've managed to integrate https://github.com/Azure/go-ntlmssp into heartbeat, and I can see via tcp dumps that it is trying to authenticate, but it fails.\r\n\r\nMy analysis of the issue is that it stems from heartbeat closing the connections for every request it makes. \r\n\r\nIn more detail:\r\nThe NTLM process is very awkward and requires some back and forth between the server (including getting a couple of 401s and only then trying to authenticate). From what I can gather, this back and forth should occur on the same socket (as is the case when using a simple implementation of go-ntlmssp, which works fine).\r\nBut when I analyze the dumps for the heartbeat implementation, it does all of the requests on separate sockets and I can only conclude that this is the cause of the issue.\r\n\r\nIt seems I should be looking into this section of code: https://github.com/elastic/beats/blob/master/heartbeat/monitors/active/http/simple_transp.go#L129\r\n\r\nBut I am not sure. And since Go is something new to me (just read my first few lines of Go), this would be a very slow process. So if anyone would like to give some pointers as to how to convince heartbeat to make these requests re-using the same socket, I'm more than happy to keep looking into this and make a PR."}}
{"actor":{"display_login":"gurumaia"}}