Skip to Content
author's profile photo Former Member
Former Member

Custom Adapter Module - Privatekey Access

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


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jan 01, 2014 at 11:41 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 02, 2014 at 02:03 AM

    Hi Sat,

    Please share the code too.

    Regards,

    Karthik

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.