Skip to content

Feature/TLS cert configuration#1660

Merged
breedx-splk merged 4 commits into
open-telemetry:mainfrom
brsgina:feature/tls-cert-configuration
Apr 21, 2026
Merged

Feature/TLS cert configuration#1660
breedx-splk merged 4 commits into
open-telemetry:mainfrom
brsgina:feature/tls-cert-configuration

Conversation

@brsgina
Copy link
Copy Markdown
Contributor

@brsgina brsgina commented Mar 19, 2026

Resolves #1475

This modification allows us to set a client TLS certificate for OtlpHttpExporters in the configuration parameter via the initialize() function.

@brsgina brsgina requested a review from a team as a code owner March 19, 2026 14:02
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Mar 19, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 80.32787% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.23%. Comparing base (89c36e2) to head (7cb20a6).
⚠️ Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
...metry/android/agent/OpenTelemetryRumInitializer.kt 64.70% 6 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1660      +/-   ##
==========================================
+ Coverage   61.92%   62.23%   +0.31%     
==========================================
  Files         159      160       +1     
  Lines        3409     3440      +31     
  Branches      345      348       +3     
==========================================
+ Hits         2111     2141      +30     
+ Misses       1204     1202       -2     
- Partials       94       97       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marandaneto
Copy link
Copy Markdown
Member

This is a serious security issue. APKs are trivially decompilable (e.g., apktool, jadx), so anyone can extract the
private key and impersonate your client

where are you reading this info from? hardcoded or read at runtime from keystore?

@brsgina
Copy link
Copy Markdown
Contributor Author

brsgina commented Mar 25, 2026

@marandaneto We are aware of the risks of embedding secrets in the APK. The endpoint is protected with mutual TLS (mTLS), so client authentication is based on a certificate, not just a static key.

The private key is stored in the Android Keystore and is not directly extractable. The app never exposes the raw key material; it is only used via the secure hardware-backed keystore APIs.

Additionally, even if someone decompiles the APK, they cannot simply impersonate the client without access to the keystore-protected private key and a valid device context.
Of course, we understand that mobile environments cannot be considered fully secure, so mTLS is combined with additional server-side checks and monitoring.

Copy link
Copy Markdown
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. I had a few small suggestions, and I do feel like we should definitely try to flag this as incubating. Thanks for the contribution!

@breedx-splk
Copy link
Copy Markdown
Contributor

This is a serious security issue. APKs are trivially decompilable (e.g., apktool, jadx), so anyone can extract the private key and impersonate your client

where are you reading this info from? hardcoded or read at runtime from keystore?

I think this will virtually always be the case....but this makes it significantly more difficult.

Copy link
Copy Markdown
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

Copy link
Copy Markdown
Member

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

*/

@Incubating
class ClientTlsConnectivity(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My general preference would be for interfaces rather than classes in public APIs, as it avoids exposing <init> functions publicly and also tends to allow for more flexibility if we ever want to switch out a specific implementation for another. That feedback isn't blocking however.

@breedx-splk breedx-splk merged commit 143163e into open-telemetry:main Apr 21, 2026
8 checks passed
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.

How to add client TLS in the OpenTelemetryRumInitializer?

4 participants