go-mssqldb
go-mssqldb copied to clipboard
Enable consumption into secretless-broker
We are adding a plugin to the secretless-broker
project (https://github.com/cyberark/secretless-broker) and will be using your project to communicate with SQL Server. Secretless is written in go
too and needs a bit more access to some of the internals of this project. In this PR we expose the constants & functions we need to use. Other than that, the logic stays the same.
The Secretless Broker lets your applications connect securely to services - without ever having to fetch or manage passwords or keys. It does so by acting as a connector between the application and the target, retrieving the credentials for authentication from a credentials provider. This way, it opens an authenticated stream between the application and the target, so the application doesn't need to manage credentials in its code. To do so with mssql, we need to get the underlying channel and and the credentials to the message. We needed access to some constants and structs to do so.
It would be great if these minor changes will be merged to the go-mssqldb
project so we can consume it as a 3rd party to our project, rather than relying on our own fork.
Codecov Report
Merging #533 into master will decrease coverage by
0.02%
. The diff coverage is93.33%
.
@@ Coverage Diff @@
## master #533 +/- ##
==========================================
- Coverage 68.86% 68.83% -0.03%
==========================================
Files 22 22
Lines 5058 5060 +2
==========================================
Hits 3483 3483
- Misses 1369 1371 +2
Partials 206 206
Impacted Files | Coverage Δ | |
---|---|---|
net.go | 42.52% <ø> (ø) |
:arrow_up: |
mssql.go | 82.45% <0%> (-0.27%) |
:arrow_down: |
tran.go | 34.78% <100%> (ø) |
:arrow_up: |
buf.go | 100% <100%> (ø) |
:arrow_up: |
types.go | 77.29% <100%> (ø) |
:arrow_up: |
rpc.go | 36.84% <100%> (ø) |
:arrow_up: |
tds.go | 60.44% <91.66%> (ø) |
:arrow_up: |
token.go | 55.91% <91.66%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update cfbb681...77827dd. Read the comment docs.
I don't like exposing so much of internal structures as an interface. That would make it much harder to change internals without introducing a breaking change in the interface. Is it possible to provide some minimal hooks to allow you to implement your functionality?