Repository navigation
CXH-3209: register go-mssqldb's krb5 authenticator for keytab auth #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
luisina-santos
merged 8 commits into
main
from
connector-farm/CXH-3209-cf-2610266c3s-CXH-3209-cf-2610266c3s.12.5-impl
Nov 2, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
24df32a
CXH-3209: register go-mssqldb's krb5 authenticator for keytab auth
85f1e5c
CXH-3209: review fixes - keytab docs DSN form, R-3 test wording, gofmt
53b7a91
CXH-3209: review fix - keytab DSN form requires a username (no password)
9d027fe
test(sqlserver): move DefaultProviderName check into unix-only krb5_u…
f0192de
test(sqlserver): add negative control for krb5 registry-miss message;…
08a2e89
test(sqlserver): gofmt test files and dedup krb5 comment
fbb69c0
CXH-3209: address review nits on krb5 tests and docs
luisina-santos 48f6750
CXH-3209: keep only the krb5 registration test
luisina-santos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package sqlserver | ||
|
|
||
| import ( | ||
| "strings" | ||
| "testing" | ||
|
|
||
| "github.com/microsoft/go-mssqldb/integratedauth" | ||
| "github.com/microsoft/go-mssqldb/msdsn" | ||
| ) | ||
|
|
||
| // A non-"not found" error proves the lookup reached the krb5 provider | ||
| // registered by the blank import in sqlserver.go. | ||
| func Test_Krb5ProviderRegistered(t *testing.T) { | ||
| config := msdsn.Config{ | ||
| Parameters: map[string]string{ | ||
| "authenticator": "krb5", | ||
| "krb5-realm": "EXAMPLE.COM", | ||
| "krb5-keytabfile": "/nonexistent", | ||
| "krb5-configfile": "/nonexistent", | ||
| }, | ||
| } | ||
|
|
||
| // Both paths point at /nonexistent, so the error is deterministic without touching /etc/krb5.conf. | ||
| _, err := integratedauth.GetIntegratedAuthenticator(config) | ||
| if err == nil { | ||
| t.Fatalf("expected an error from the krb5 provider for a nonexistent krb5 config, got nil") | ||
| } | ||
| if strings.Contains(err.Error(), "not found") { | ||
| t.Fatalf("krb5 provider not registered (lookup missed the registry): %v", err) | ||
| } | ||
| } | ||
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.