cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Adapter Module - Privatekey Access

Former Member
0 Kudos

I've a requirement to store the message content into a file in SFTP server.  Have created a custom adapter module to do so.  We have a mandatory requirement to use of privatekey to connect with SFTP server (do not have access to uid/pwd).  Have followed below post to try accessing private keys.

http://scn.sap.com/thread/1938857

I'm passing view name and alias name to retrieve privatekey stored in PI 73 server.

When I use my custom adapter module with Seeburger Sender CC, privatekey is accessible.  However, I'm not able access privatekey from any other Adapter (ex.  standard File adapter) CC or even with Seeburger Receiver CC. 


Custom adapter module is running using <SID>adm userid. I don't know if we should run the adapter module with any specific userid to get access to privatekey.  Appreciate anyone helping to find a solution for this issue.


Thanks


Sat


Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Sat,

Please share the code too.

Regards,

Karthik

Former Member
0 Kudos

Below is the code:  highlihted exception is getting thrown when trying to read the keystore value.

{rest of the code can be found in http://scn.sap.com/thread/1938857 }

    public KeyStore getKeystore(String view) throws ResourceException {

     final String SIGNATURE = "getKeystore()";

     //TRACE.entering(SIGNATURE);

     KeyStore keystore;

     try {

         if (keystores.containsKey(view) == true) {

          keystore = keystores.get(view);

         } else {

          keystore = keystoreManager.getKeyStore(view);

          if (keystore == null) {

              throw new ResourceException("Keystore not found. view=" + view);

          }

          keystores.put(view, keystore);

         }

         //TRACE.exiting(SIGNATURE);

         return keystore;

     } catch (KeyStoreException e) {

         //TRACE.catching(SIGNATURE, e);

         throw new ResourceException(e);

     }

    }

Any help is appreciated.

Thanks

Sat

vikas2
Active Participant
0 Kudos

It'll be fastest to add some logging messages and trace the error.