-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add a new keyLog property to HttpClient #48093
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
Comments
I couldn't find any usages of |
Note that this may impact internal customer code. I did a quick spot check and it will impact the Assistant team but overall there aren't many usages of |
I don't object. We should make sure we document that this is a very security-sensitive API though, and that applications should only use it during debugging. |
Do we have summary on level of impact on internal and external code of this breaking change? |
@vsmenon For Google code, there are a few places that I checked some likely-to-be-affected external packages e.g. |
Thanks! For this (and #47887), what would downstream users need to do a minimum? E.g., implement an empty |
@vsmenon Yes, my plan was for the changelog to include instructions to add this to your implementation:
|
Thanks - lgtm |
@brianquinlan - you're good to go with this change (see the 'Execution' steps here: https://github.com/dart-lang/sdk/blob/main/docs/process/breaking-changes.md#step-3-execution). Thanks for your patience! |
Fixed in 917ae52 |
Change
I propose that we add a new
keyLog
property toHttpClient
with a signature like:This would allow users to log TLS keys for use with Wireshark and other analysis tools.
The approach was discussed in this code review
The non-breaking alternative would be to make
keyLog
an argument to theHttpClient
constructor but that is not symmetrical with theHttpClient
API (i.e. onBadCertificateCallback).See related discussing on Add a new connectionFactory property to HttpClient.
Rationale
The
HttpClient
API already has multiple attributes that accept functions e.g.and implementing this as a constructor argument would be inconsistent with the rest of the API. Also, parameterizing all future functionality as constructor arguments does not seem scalable.
Impact
All classes that
implements HttpClient
(withoutextends Mock
or equivalentnoSuchMethod
implementation) will need to be updated.I suspect that there are not many implementations of HttpClient outside of mocks.
Mitigation
Users must implement the
keyLog
property.The text was updated successfully, but these errors were encountered: