feat(pam): NTLM authentication for MSSQL proxy#241
Open
saifsmailbox98 wants to merge 5 commits into
Open
Conversation
Gateway MSSQL proxy now supports NTLM (Windows Authentication) in addition to SQL auth. When AuthMethod is "ntlm", the proxy performs a 3-message NTLM handshake with the server (negotiate, challenge, authenticate) using go-ntlmssp, instead of sending SQL credentials in LOGIN7. The client-to-gateway leg is unchanged — clients always use SQL auth with dummy credentials, and the proxy injects the real NTLM auth on the server leg.
|
💬 Discussion in Slack: #pr-review-cli-241-feat-pam-ntlm-authentication-for-mssql-proxy Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
11 tasks
…x SSPI length sentinel Extract SSPI token before checking for error tokens — the NTLM challenge contains random binary that can match the 0xAA error byte. Also fix the SSPI length boundary: 0xFFFF is a sentinel per TDS spec, so use strict less-than.
Contributor
Author
|
@claude review once |
go-ntlmssp uses splitNameForAuth to extract domain from the username. Without the DOMAIN\ prefix, the domain is empty in the NTLMv2 hash and authenticate message, which may fail on domain-member SQL Servers authenticating against a remote DC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description 📣
Gateway MSSQL proxy can now perform NTLM authentication with the target SQL Server when the account is configured for Windows auth. Uses go-ntlmssp for the handshake; the client-to-gateway leg remains unchanged.
Infisical/infisical#6544
Type ✨
Tests 🛠️
# Here's some code block to paste some code snippets