NTLM Authentication in Elastic Synthetics

I am using Elastic Synthetics to monitor applications in our environment. I'm writing the majority of them as journeys and pushing them to Synthetics.

The issue is that we have a few apps which use NTLM authentication, which is not directly supported by Synthetics. This is an issue which has been discussed in Elastic Beats Issues on Github, and user @PaulB-Elastic the following in this response:

An alternative solution would be to implement this with the new Synthetics offering, where you have full JavaScript capabilities that you use can build the NTLM auth into the script yourself. You would then also have a full browser and user journey capabilities to test more than just the authentication, but continue interactions in the browser beyond the authentication.

This would satisfy my use case perfectly, but I haven't managed to successfully do this. Are there any examples of using JavaScript or TypeScript for this purpose?

Hi @DougR, thanks for your interest in Synthetics; hopefully I can help you out.

If you're asking about how to do NTLM auth in node, I don't know much about it but there are libraries like this one that may help.

If you're wondering how to create monitors that allow for custom scripting, I'd recommend checking out the docs for Project Monitors, which will explain how this is done.

Project monitors allow you to create a complete node package for your monitoring, with a package.json, etc., and you can include any third party libs (like the auth one I linked to above) you may need, as long as they're pure JS. When you're ready, you can simply npm run push to host/run your monitors on your Stack.

If you need to learn more about Synthetics in general, there's an intro doc that includes a Getting Started guide.

If you need to know more don't hesitate to reach back out to us here.

I'm specifically looking for info on doing NTLM auth in node. I've been working with the httpntlm library with little success, so I was hoping for a working example. :frowning:

I've looked at the specific module you recommended, but it uses httpntlm under the hood to manage authentication, so I went directly to httpntlm. I will check it out again though.

Thx.

Unfortunately it's not a focus for us and not something I've heard of others trying / having success with. The tried and true method is to use a sort of NTLM proxy.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.