Repository navigation
CXH-3209: register go-mssqldb's krb5 authenticator for keytab auth - #156
Conversation
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
…nix_test.go DefaultProviderName is set by go-mssqldb's platform-specific init (ntlm on unix, winsspi on Windows), so the unix-default assertion needs //go:build !windows. Keeps Test_Krb5ProviderRegistered compiling on every GOOS. Addresses judge review comment 4380239426 on PR #156. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
luisina-santos
left a comment
There was a problem hiding this comment.
A few nits inline.
- nit (optional, general): Not needed for this ticket. Importing the package also enables the credential-cache (
krb5-credcachefile) and user/password Kerberos methods. Mention them in one line, or leave a follow-up to document them. - nit (PR description): The title has the issue ID, good. The body is very long. Trim it to what changed, why, and how it was tested.
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
…nix_test.go DefaultProviderName is set by go-mssqldb's platform-specific init (ntlm on unix, winsspi on Windows), so the unix-default assertion needs //go:build !windows. Keeps Test_Krb5ProviderRegistered compiling on every GOOS. Addresses judge review comment 4380239426 on PR #156. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
… clarify comments Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
- gofmt -w both test files (trailing blank lines at EOF in krb5_test.go; missing final newline in krb5_unix_test.go) — G1 - shrink the inline comment in Test_Krb5ProviderRegistered to one line that adds only what the doc comment does not (deterministic error via nonexistent config paths); the doc comment remains the full explanation — G2 Co-authored-by: Resolver3 <resolver3@connector-farm.local> Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Shorten krb5 test comments, pin the username-only DSN form in the buildConnectionURL krb5 row, and document the connect.user/connect.params form, runtime file mounts, SPN/FQDN and connect.database gotchas, and the other krb5 login methods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f735dd5 to
fbb69c0
Compare
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
There was a problem hiding this comment.
No blocking issues found — see the full review report
Drop tests that only exercise upstream behavior or generic DSN pass-through already covered by existing buildConnectionURL rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Superseded — see the current review report for commit
|
Connector PR Review: CXH-3209: register go-mssqldb's krb5 authenticator for keytab authBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe PR adds a blank import of I scanned the full PR diff for security and correctness, including The remaining test still holds. With I applied the repo-local criteria. Sections A, B, C, D, F and S (logging, error wrapping, spans, JSON types, provisioning, empty-result data loss) do not apply: the PR adds no logging, spans, response structs, provisioning or List/Grants paths. Section E (breaking changes) found nothing breaking, because this only adds an opt-in auth method. I did not review the vendored Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. Reviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
Registers go-mssqldb's
krb5integrated-auth provider so a SQL Server DSN withauthenticator=krb5and keytab params authenticates via Kerberos instead of failing withprovider krb5 not found.What changed
pkg/database/sqlserver/sqlserver.go: blank import ofgithub.com/microsoft/go-mssqldb/integratedauth/krb5. Itsinit()registers thekrb5provider. Nothing imported it before, so the driver's registry never had it.pkg/database/sqlserver/krb5_test.go: asserts thekrb5registry lookup reaches the provider (fails withprovider krb5 not foundif the import is dropped).docs/docs-info.md: Kerberos/keytab DSN andconnect.user/connect.paramsforms, runtime file mounts, SPN/FQDN andconnect.databasegotchas.go.mod,go.sum,vendor/: addsjcmturner/gokrb5/v8and its transitive modules. No existing pin moved.Testing
go test ./pkg/database/sqlserver/.CORP.EXAMPLE.COM) and SQL Server 2022 configured with anMSSQLSvckeytab. LoginCORP\svcbatonwas createdFROM WINDOWS. baton-sql ran with only the client keytab, using the ticket's DSN form plus a username and no password.auth_scheme=KERBEROSasCORP\svcbaton, with 3 table rows synced. The KDC logs AS-REQ and TGS-REQ forMSSQLSvc/sql1.corp.example.com:1433as SUCCESS.validate failed: database "" ping failed: provider krb5 not found. This reproduces the ticket.connect.databaseinstead of?database=fails withKDC_ERR_S_PRINCIPAL_UNKNOWN, because the path is read as an instance name. This is now documented.Risk
The gokrb5/v8 tree is vendored into every build, including for users who never use Kerberos.
Release Notes
baton-sql now supports Kerberos keytab authentication for SQL Server. Use a DSN with the Kerberos principal as the username (no password) plus
authenticator=krb5,krb5-realm,krb5-keytabfileandkrb5-configfile.Resolves CXH-3209
🤖 Generated with Claude Code