palantir / palantir/conjure-java-runtime

Support creating an SslConfiguration from a PEM encoded String

Open
#2,131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
95
Forks
96
Avg merge
3h 38m
Merged PRs (30d)
33

Description

What happened?

At present, the only acceptable signatures for constructing an SslConfiguration are by supplying a truststore/keystore path on disk, in either PKCS12 or JKS format:

https://github.com/palantir/conjure-java-runtime-api/blob/develop/ssl-config/src/main/java/com/palantir/conjure/java/api/config/ssl/SslConfiguration.java#L97

What did you want to happen?

Internally, we have some services which have no capability of constructing a keystore through normal means, instead, the only mechanism provided for accessing private keys is by passing an encrypted string through to the configuration that is being constructed.

Concretely, we construct our services current like:

conf:
  runtime:
     security:
        key-store-path: /path/to/keystore.jks
        trust-store-path: /path/to/truststore.jks

And we would now like to construct this configuration like:

conf:
  runtime:
    security:
       keys:
          alias: 
              key: PEM_ENCODED_KEY_GOES_HERE
              password: PASSWORD_TO_READ
          alias-2: 
              key: PEM_ENCODED_KEY_GOES_HERE
              password: PASSWORD_TO_READ
        certificates:
          alias: PEM_ENCODED_CERT_GOES_HERE

The above implementation is up for discussion, but it hopefully describes the requirement.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ssl-config/src/main/java/com/palantir/conjure/java/api/config/ssl/SslConfiguration.java at the linked constructor signatures. Review how keystore and truststore paths are currently handled, then determine the supported API and configuration shape for PEM-encoded keys, certificates, aliases, and passwords. Done means a settled design and working construction path for the requested in-memory credentials.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.