einfallstoll / express-ntlm

An express middleware to have basic NTLM-authentication in node.js.
BSD 2-Clause "Simplified" License
89 stars 26 forks source link

Multiple Domain Controllers #73

Closed yapnel closed 4 years ago

yapnel commented 4 years ago

Hi,

Many thanks for creating this package. It is fantastic

I would like to know how to use the feature of passing in an array of multiple domain controllers. I have several domain controllers that support different users from different domains. Unfortunately, there is no trust setup on the domains so i can't just use 1 domain for all the users. Could i make the assumption that the array of DC passed in will iterate through until the user is authenticate with the correct DC?

Thanks

Nelson

einfallstoll commented 4 years ago

Hi @yapnel,

I'm not 100% sure to be honest, as I have never tested this. So I'm very curious what you find out.

Theoretically the domain controllers only get accessed after each other during connection, so they're just a fallback and the use-case you described is not possible.

What you could do, is configuring multiple middlewares and try them one after another until one succeeds or all fail. This might work, but I don't know how the browser handles multiple NTLM negotiations in one single request.

yapnel commented 4 years ago

I have tried specifying multiple DCs and it only takes the first one into account. Unfortunately, it didn't work as i was hoping for. I might have to go through the multiple middlewares and test it out.

Thanks,