open-telemetry / open-telemetry/opentelemetry-java
enable JKS certificate format in opentelemetry sdk autoconfigure
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 58
Description
Hi,
When using the java library we can set our jks certificates with following method:
KeyStore ks = KeyStore.getInstance("JKS");
ks.load(getResourceAsInputStream(tlsKeyStore), tlsKeyStorePassword.toCharArray());
KeyStore ts = KeyStore.getInstance("JKS");
ts.load(getResourceAsInputStream(tlsTruststore), tlsTrustStorePassword.toCharArray());
builder.setEndpoint(String.format(ENDPOINT_FORMAT, agentHost, agentPort))
.setTimeout(timeout, TimeUnit.SECONDS)
.setClientTls(ks.getKey("private-key", tlsKeyPassword.toCharArray()).getEncoded(), ks.getCertificate("cert-chain").getEncoded())
.setTrustedCertificates(ts.getCertificate("collector-cert").getEncoded())
.build();
Can we make it possible to do this with the autoconfigure as well?
Right now I'm using PEM format certificates, which works (OTEL_EXPORTER_OTLP_CERTIFICATE / OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE) but in the future we need to use JKS files.
Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the autoconfigure handling for the existing PEM environment variables and compare it with the JKS KeyStore usage shown in the issue. Done means JKS keystore and truststore files can be configured through autoconfigure for the relevant TLS settings, while existing PEM configuration continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100