[ 
https://issues.apache.org/jira/browse/CAMEL-12443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16440735#comment-16440735
 ] 

Zoran Regvart commented on CAMEL-12443:
---------------------------------------

{{KeyStore}} is Java default and preferred interface for fetching key material 
and there is a PKCS#12 keystore implementation shipped with JDK (now the 
default instead of JKS). Could you not provide that KeyStore implementation 
with the URL with 
[URLStreamHandler|https://docs.oracle.com/javase/8/docs/api/java/net/URLStreamHandler.html]
 returning an InputStream based on the content of the database? If we were to 
add support for specifying key as a String value, we would still need to 
provide the format and the password for that key, this would complicate the 
implementation without any real need as you could use the {{KeyStore}} API to 
accomplish the same.

> camel-salesforce - Ability to use 'key' directly instead of pointing resource 
> for generateJwtAssertion
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12443
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12443
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-salesforce
>    Affects Versions: 2.21.0
>            Reporter: Andrey Tyurin
>            Assignee: Zoran Regvart
>            Priority: Major
>
> Hello,
> Could you extend the way of using JWT OAUTH2.0 authorisation for Salesforce 
> component? For the current moment it uses resource uri (path to file, 
> classpath, URL), but we want to use key directly (from String variable):
> String generateJwtAssertion() {
> ...
>     PrivateKey key = (PrivateKey) keystore.getKey(alias, 
> keyStoreParameters.getPassword().toCharArray());
> ....
> We would like to have possibility to set the key directly from String 
> variable, so there will be new way how to configure JWT for SF:
> String keyValue="This is some key content";
> SalesforceLoginConfig loginConfig = new SalesforceLoginConfig();
> loginConfig.setKey(keyValue);       <-------------- new option
>  
> Thanks,
> Andrey 
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to