cancel
Showing results for 
Search instead for 
Did you mean: 

PGP decryption in Receiver Channel?

former_member434498
Participant
0 Kudos

Hi SAP Gurus,

We have this HR interface that needs to be encrypted so the data will not be visible within PI monitoring tools.

As solution, we are planning to use this PGP module to do the encryption and decryption.

However as much as possible, we are trying to avoid doing the encryption/decryption on partners end (as main purpose is just to hide the data within PI).

This is the scenario we have in mind:

File to File scenario

1) Partner sends the raw file

2) PI receives the raw file and encrypts it using PGP encryption module and public key installed in PI.

Sender Channel configuration (does the encryption):

ENC    applyEncryption    true

ENC    applySignature    false

ENC    keyRootPath    C:\usr\sap\PI\keys

ENC    partnerPublicKey    PIpub.asc

3) Before PI sends the file which was encrypted earlier in PI, PI decrypts the file using PGP decryption module in the Receiver Communication Channel.

Receiver Channel Configuration (does the decryption):

DEC    keyRootPath    C:\usr\sap\PI\keys

DEC    ownPrivateKey    PIprivate.asc

DEC    partnerPublicKey    PIpub.asc

DEC    pwdOwnPrivateKey    ***********

I tried to test above scenario but I'm getting below error in the receiver communication channel..

Error    Exception caught by adapter framework: org.bouncycastle.openpgp.PGPPublicKeyRing found where PGPSecretKeyRing expected

Error    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: org.bouncycastle.openpgp.PGPException: org.bouncycastle.openpgp.PGPPublicKeyRing found where PGPSecretKeyRing expected

Could you please confirm if above mentioned scenario is possible?

And, what is the cause of the error?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member194741
Participant
0 Kudos

Hi carlo,

It seems the above issue which you had mentioned is related to the Private key, PI can' able to recognize ur Private key and cant able to decrypt the content. Plz contact BASIS guy to check for the certificates and keys imported.

Thanks,

Karthick

former_member434498
Participant
0 Kudos

Thanks Karthick. We had Basis re-import the private key and it worked.

Answers (3)

Answers (3)

former_member200386
Active Participant
0 Kudos

Hi Carlo ,

Are you doing this for the first time? If yes  please ensure sufficient JCE files were placed in the back end PI please refer below threads hope this help you

Thanks,

Pavan T

former_member182455
Active Contributor
0 Kudos

Hi,

you can try like this,

Encryption :

1AF_Modules/MessageTransformBeanLocal Enterprise Bean3
2AF_Modules/DynamicConfigurationBeanLocal Enterprise Bean2
3localejbs/PGPEncryptionLocal Enterprise Bean1
4CallSapAdapterLocal Enterprise Bean0

1  applyEncryption                     true

1  encryptionAlgo                      AES_256

1  keyRootPath                        XXXXXXX

  1  partnerPublicKey                XXXXXXXXX

  1  pwdOwnPrivateKey              ***

Regards

srinivas

former_member184720
Active Contributor
0 Kudos

If it is just about restricting access to HR interfaces data then did you check the below blog?