ClientBuilder::setPrivateKey should have a variant where I can set the pem-content directly
See original GitHub issueRight now, it allows me to set a String which contains a hard file-system-path. This is not appropriate in many cloud-native environments where configuration-properties like this are loaded from a service, such as AWS Secrets Manager.
Also, it is inconvenient for the pem file to have to be in a physical file. In containerized cloud-native environments access to a filesystem is not as normal as it was in the old days.
It will also be much more flexible this way. Maybe passing an InputStream
is even better.
So please allow the pem content to be set something like this:
String pemContent = readPem();// so this I take care of myself
var client = Clients.builder()
.setPrivatePem(pemContent) // pass the whole pem, avoid reading the FS
.setOrgUrl("https://" + oktaDomain) // e.g. https://dev-123456.okta.com
.setAuthorizationMode(AuthorizationMode.PRIVATE_KEY)
.setClientId("my-id")
.setScopes(Set.of("okta.users.read"))
.setCacheManager(Caches.newDisabledCacheManager())
.build();
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Getting SecKey from a pem file | Apple Developer Forums
I have a pem file with a public key that was creted by a server and I need to import this key to...
Read more >how to get private key from PEM file? - Stack Overflow
To get the bytes for either a certificate or a key from the PEM file the following method will work, regardless of the...
Read more >How to Read PEM File to Get Public and Private Keys
Learn how to read public and private keys from PEM files. ... It's a binary encoding, and the resulting content can't be viewed...
Read more >Convert a Certificate File to the PEM Format Required for Pod ...
You must convert your non-PEM-format file into PEM format and create a single PEM file that contains the full certificate chain plus private...
Read more >What is a Pem file and how does it differ from other OpenSSL ...
The returned certificate is the public certificate (which includes the public key but not the private key), which itself can be in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I provide that PR, how long until you merge and release? 😃
Nice!