-
Notifications
You must be signed in to change notification settings - Fork 293
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
Expose connection encryption information to clients #2353
Comments
This would help all integrators who must implement interfaces requiring this information. Currently SQL Server looks bad (unsafe) when it is necessary to explain that connection security feedback is not available with a preferred API. Incomplete and/or inferred security info is not useful, and difficult to trust. It would really be nice to push this out to DbConnection, but that is another story I suppose. |
In the meantime, noting down an alternative: If you have
|
@cheenamalhotra : The info needed here are connection negotiation artifacts. Maybe SQL Server squirrels that away somewhere, but it seems more efficient to collect it on the client side, where it should already reside in a connected AuthenticatedStream, etc. |
Oops, yes I meant |
Having the information available during connection is a bit higher priority for administrative applications. Similar to how the web browser and remote desktop clients work, we need to be able to present the certificate information to the user to let them decide whether to install it/trust it etc. |
@shueybubbles:
Today those results are not available to a security-conscious client app. |
Is your feature request related to a problem? Please describe.
For SSMS we want to give the user full details about their connection security, including encryption status, certificate details, and TLS protocol version.
Such information is needed for both failed and successful connections. For failed connections we want to show the cert validation errors along with the public key cert information so the user can make an informed choice about whether to set
Trust Server Certificate
orHost Name In Certificate
in their connection dialog.Describe the solution you'd like
SqlException
that contains the certificate information when cert validation failsSqlConnection
objects that are in theOpen
state.It'd be great if this functionality enables an app like SSMS to install the server cert locally to automate the client config steps documented at https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/special-cases-for-encrypting-connections-sql-server?view=sql-server-ver16
Describe alternatives you've considered
We could try to negotiate a TLS connection to the server out-of-band from the SQL connection to get the cert and do our own validation.
The text was updated successfully, but these errors were encountered: