Skip to content
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

Add support for EC mTLS keys #4920

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

jack-berg
Copy link
Member

Resolves #4918.

This adds support for EC mTLS keys in addition to the currently supported RSA keys. The tricky bit is determining which algorithm type the key is, and therefore which KeyFactory to use to generate the private key. Bouncy castle apparently has a decent way to do this, but we should try to do it without additional dependencies if possible. The strategy I've taken in this PR is to create a list of supported algorithms, and determine which the key corresponds to by iterating through them and trying generate a private key with a try / catch.

@jack-berg jack-berg requested a review from a team November 7, 2022 17:48
@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Base: 90.90% // Head: 91.05% // Increases project coverage by +0.14% 🎉

Coverage data is based on head (bc24f8b) compared to base (51ff803).
Patch coverage: 86.66% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4920      +/-   ##
============================================
+ Coverage     90.90%   91.05%   +0.14%     
- Complexity     4803     4808       +5     
============================================
  Files           545      544       -1     
  Lines         14340    14318      -22     
  Branches       1383     1367      -16     
============================================
+ Hits          13036    13037       +1     
+ Misses          897      884      -13     
+ Partials        407      397      -10     
Impacted Files Coverage Δ
...va/io/opentelemetry/exporter/internal/TlsUtil.java 85.93% <86.66%> (-0.34%) ⬇️
...va/io/opentelemetry/sdk/logs/SdkLoggerBuilder.java 100.00% <0.00%> (ø)
...a/io/opentelemetry/sdk/logs/SdkLoggerProvider.java 100.00% <0.00%> (ø)
.../io/opentelemetry/sdk/logs/LogRecordProcessor.java 85.71% <0.00%> (ø)
...a/io/opentelemetry/sdk/trace/SdkTracerBuilder.java 100.00% <0.00%> (ø)
.../io/opentelemetry/sdk/metrics/SdkMeterBuilder.java 100.00% <0.00%> (ø)
...opentelemetry/sdk/logs/NoopLogRecordProcessor.java 100.00% <0.00%> (ø)
...pentelemetry/sdk/logs/MultiLogRecordProcessor.java 90.90% <0.00%> (ø)
...entelemetry/sdk/logs/SdkLoggerProviderBuilder.java 100.00% <0.00%> (ø)
...metry/sdk/logs/export/BatchLogRecordProcessor.java 88.97% <0.00%> (ø)
... and 14 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jack-berg jack-berg changed the title Add support for EC mTlS keys Add support for EC mTLS keys Nov 7, 2022
@jack-berg
Copy link
Member Author

@jkwatson take a look when you have a chance. Would be good to get this in for the next release.

@yunchen-myob
Copy link

@jkwatson take a look when you have a chance. Would be good to get this in for the next release.

Can I know when is the next release?

@jkwatson
Copy link
Contributor

@jkwatson take a look when you have a chance. Would be good to get this in for the next release.

Can I know when is the next release?

We try to release the end of the first week of the month.

@jack-berg jack-berg merged commit c4d0d86 into open-telemetry:main Nov 22, 2022
dmarkwat pushed a commit to dmarkwat/opentelemetry-java that referenced this pull request Dec 30, 2022
* Add support for EC mTlS keys

* Revert change to integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supports SSH algorithms other than RSA
4 participants