cancel
Showing results for 
Search instead for 
Did you mean: 

Required information to gather to apply digital signature on XML

Former Member
0 Kudos
367

Dear Expert,

I need to apply the digital signature on XML during java mapping on payload level. I have a sample of required format by third part(bank), however I need to get clarification to what other information I need to get from them to start my development. Please see the below sample source and required target, and my questions.

Required target target Structure :-  The below sample was given by bank with applied digital signature and encoded in base64, I just decoded using online base64 decoder. The highlighted XML is my source XML, on which they had applied digital signature and encoded in base64.

*H
    0    1 0  +     0 + *H

        <?xml version="1.0"?>

<PaymentMessage>

<PaymentTransaction>

    <CompanyCode>ARAMCO0001</CompanyCode>

    <SequenceNum>16080</SequenceNum>

    <TransactionData>:20:21107113

:32A:040523SAR10,00

:50:SAUDI ARABIAN OIL COMPANY

BOX 5000

DHAHRAN

SAUDI ARAMCO OIL COMPANY

:52A:RIBLSARI

:53B:/3010602079901

:57A:RIBLSARI

:59:/4040154769901

SAUDI ARAMCO OIL COMPANY

BOX 5000

DHAHRAN

SAUDI ARAMCO OIL COMPANY

:70:/INV/2000011508</TransactionData>

    <TransactionComment>Bulk TEST</TransactionComment>

  </PaymentTransaction>

</PaymentMessage>  T0 P0   @ G0
*H
    0o1 0  U    SA1 0   U    Unknown1 0   U   AL Riyadh1 0

  U

  B2B1 0

  U    B2B1 0   U    B2B e-Payment Gateway0 

040117095831Z

151230095831Z0o1 0  U    SA1 0   U    Unknown1 0   U   AL Riyadh1 0

  U

  B2B1 0

  U    B2B1 0   U    B2B e-Payment Gateway00

*H
     0 +o+s,5N Կڻ#poddS ݧ&&#127;мj&40,\#P    9|^$E=F -*-[msXu"b "v{aM S    0
*H

     ' 箰z]و @nL_T0gTPpv }e @Q?C K T %/ua퓺uN>[̉  ?:U8ɛ&b

x G|.ǵ gc rZ k;{zGK &v1  0     0w0o1 0  U    SA1 0   U    Unknown1 0   U   AL Riyadh1 0

  U

  B2B1 0

  U    B2B1 0   U    B2B e-Payment Gateway  @ G0  +     0
*H

     RV  CR\_EB鰔@ 앗eD6 %&#127;ZT 2c?W36#=x|Mny iuh7; NE}I

l;

氊[D_gjl  1  8Op4.}X

Additional information from bank to sign the XML is as follows.

PKCS#7

Content type

Signed Data

Version

01

Digest algorithm

SHA-1 Hash algorithm

Digest Encryption Algorithm

RSA

Signer info

Information about a single signer of the signed data object

Questions-

1- Do I need to gather any other information from bank to start my java mapping development, as we know we apply digital signature on XML by using enveloping, enveloping or detached, for me it looks like enveloping. Please correct me if I am wrong.

2- We are using SSL for transport level security as well, they said to use the same public and private key provided by CA to sign the message which is using for SSL, can we use the same keys? in that case I will not generate public key and private keys by my code, and will access form key-store from PI(PI7.4 Dual stack) server. Please confirm.

3- By considering Please suggest me which method (Apis) shall I use to do digital signature, as we have JSR 105, Appache WSS4j,Appache santurio etc. I have chosen java mapping because I need to send the whole input payload on two different string field(after applying digital signature and encoded in base 64).


Thanks,

Farhan

Accepted Solutions (1)

Accepted Solutions (1)

rhviana
Active Contributor
0 Kudos

Hi Farhan,

Asnwers:

1) Depends the tecnical bank team you provide you the format of digital signature. Most of all use enveloping method.

Your example do not look like enveloping method.

2)Yes you can do it, you can use the same key to signature and also for communication. Handshake - Private and public key.

3)Depends also, check this blog:http://scn.sap.com/docs/DOC-49354

I hope that I helps you.

Kind regards,

Ricardo Viana.

Former Member
0 Kudos

Hi Ricardo, thanks a lot for your response. Bank team has not told me anything specifically regarding format(enveloped or enveloping), do you think I need to ask them regarding this?

Thanks a lot. you have answered my other questions:-)

Regards,

Farhan

rhviana
Active Contributor
0 Kudos

Yes you should.

Because you need to know what method you must use for digital signature, depends of case as said, you must use a module adapter PGP for digital signature.

Kind regards,

BR.


Ricardo Viana.

Former Member
0 Kudos

Hi Ricardo,

I just answered to Venkat I cannot use PGP module because of my complexity, I believe that is possible only through java mapping . please see below details from bank.

1.1. Posting Payments Requests

Instead of posting one parameter (in case of account statement request) you will post two parameters (strXmldata , strSignature ), the  strXmldata must contain the XML after base64 encoding, the strSignature should contains the digital signature after base64 encoding.

Pseudocode:

digitalSiganature =  get_Digital_Signature( paymentReqXMLfile ) 

base64DigitalSignature = base64_Encoding (digitalSiganature) 

base64XmlData = base64_Encoding(paymentReqXMLfile) 

replyXML = HTTPS_Post_B2B(“strSignature=”+ base64DigitalSignature+”&strXmldata=”+ base64XmlData)

processReplyXMLinCORE-SYSTEM(replyXML)

The following is html file content shows how to post those parameters with the base64 XML payment request and signature:

Note:

Note:

In the following html examples, html used below only as a demonstration of how data can be posted to B2B Gateway (using HTML form tag), when using your built application you post only the parameters named strXmlData (and strSignature if required), please see the Pseudocode of each service.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>

</HEAD>

<BODY>

<FORM action=" https://<environment-domain/b2b/epay " method="post">

<INPUT type="text" name="strSignature" value="MIIFywYJKoZIhvcNAQcCoIIFvDCCBbgCAQExCzAJBgUrDgMCGgUAMIICKwYJKoZIhvcNAQcBoIICHASCAhg8P3htbCB2ZXJzaW9uPSIxLjAiPz4KPFBheW1lbnRNZXNzYWdlPgo8UGF5bWVudFRyYW5zYWN0aW9uPgogICAgPENvbXBhbnlDb2RlPkFSQU1DTzAwMDE8L0NvbXBhbnlDb2RlPgogICAgPFNlcXVlbmNlTnVtPjE2MDgwPC9TZXF1ZW5jZU51bT4KICAgIDxUcmFuc2FjdGlvbkRhdGE+OjIwOjIxMTA3MTEzCjozMkE6MDQwNTIzU0FSMTAsMDAKOjUwOlNBVURJIEFSQUJJQU4gT0lMIENPTVBBTlkKQk9YIDUwMDAKREhBSFJBTiAKU0FVREkgQVJBTUNPIE9JTCBDT01QQU5ZCjo1MkE6UklCTFNBUkkKOjUzQjovMzAxMDYwMjA3OTkwMQo6NTdBOlJJQkxTQVJJCjo1OTovNDA0MDE1NDc2OTkwMQpTQVVESSBBUkFNQ08gT0lMIENPTVBBTlkKQk9YIDUwMDAKREhBSFJBTiAKU0FVREkgQVJBTUNPIE9JTCBDT01QQU5ZCjo3MDovSU5WLzIwMDAwMTE1MDg8L1RyYW5zYWN0aW9uRGF0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BAMTFUIyQiBlLVBheW1lbnQgR2F0ZXdheQIEQAkHRzAJBgUrDgMCGgUAMA0GCSqGSIb3DQEBAQUABIGAUvJWlbgcDJNDUurCXLNfo8pFQumwlIRAj6epsBvA7JWX4mWSRLM2FSV/Wt1UBzJj/KaRzD+bVzOrqjaPIz14fE1uecEcwbOGab63dWg3OwPmTou5RcN9SQqrj2w71RDfCby+reawilvCRLpfZ/pqbPIQATEYFThPk3A0wy59WOo=">

<INPUT type="text" name="strXmldata" value='PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxQYXltZW50TWVzc2FnZT4KPFBheW1lbnRUcmFuc2FjdGlvbj4KICAgIDxDb21wYW55Q29kZT5BUkFNQ08wMDAxPC9Db21wYW55Q29kZT4KICAgIDxTZXF1ZW5jZU51bT4xNjA4MDwvU2VxdWVuY2VOdW0+CiAgICA8VHJhbnNhY3Rpb25EYXRhPjoyMDoyMTEwNzExMwo6MzJBOjA0MDUyM1NBUjEwLDAwCjo1MDpTQVVESSBBUkFCSUFOIE9JTCBDT01QQU5ZCkJPWCA1MDAwCkRIQUhSQU4gClNBVURJIEFSQU1DTyBPSUwgQ09NUEFOWQo6NTJBOlJJQkxTQVJJCjo1M0I6LzMwMTA2MDIwNzk5MDEKOjU3QTpSSUJMU0FSSQo6NTk6LzQwNDAxNTQ3Njk5MDEKU0FVREkgQVJBTUNPIE9JTCBDT01QQU5ZCkJPWCA1MDAwCkRIQUhSQU4gClNBVURJIEFSQU1DTyBPSUwgQ09NUEFOWQo6NzA6L0lOVi8yMDAwMDExNTA4PC9UcmFuc2FjdGlvbkRhdGE+CiAgICA8VHJhbnNhY3Rpb25Db21tZW50PkJ1bGsgVEVTVDwvVHJhbnNhY3Rpb25Db21tZW50PgogIDwvUGF5bWVudFRyYW5zYWN0aW9uPgo8L1BheW1lbnRNZXNzYWdlPiA='>

<input type="submit" value="Proceed">

</FORM >

</BODY >

</HTML >

Figure 9 – Example of a Payment Message Post Request

  When you post the above request to the B2B Gateway, the gateway will receive the request analyze it, and answer back in the same session with the execution status message

Former Member
0 Kudos

Hi Recardo,

Do you think this is possible to do digital signature by PGP module after seeing the requirement?

waiting eagerly for your comments pal.

Thanks,

Farhan

rhviana
Active Contributor
0 Kudos

Farhan,


What is the request msg for Bank ?

Could you post it.

Regards,

Former Member
0 Kudos

Thanks a ton for prompt response Ricardo. below is the request message for bank before digital signature, base64 signature and mapping to two string fields(strSignature and strXmldata) as per above Pseudocode: to post on Bank URL.

<?xml version="1.0"?>

<PaymentMessage>

  <PaymentTransaction>

    <CompanyCode>PARTNER01</CompanyCode>

    <SequenceNum>0000000000132180</SequenceNum>

    <TransactionData>:20:2000000058

:32A:020112SAR888,00

:50:SAUDI ARABIAN OIL COMPANY

BOX 5000

DHAHRAN

PARTNER ONE COMPANY

:52A:RIBLSARI

:53B:/111111111

:57A:NCBKSAJE

:59:/222222222

PARTNER ONE COMPANY

BOX 5300

DHAHRAN

PARTNER ONE COMPANY

:70:INV/0000002100

</TransactionData>

    <TransactionComment> Payment Message </TransactionComment>

  </PaymentTransaction>

  </PaymentMessage>



Regards,

Farhan

rhviana
Active Contributor
0 Kudos

Hi Farhan,

I dont think that you must use PGP mdoule for that.

I think that you must use javamapping, but I'm trying to understand the requeriment and how to develope that.

As I understand there is a two digital cryptograf values, one it's for a whole XML Data file and others maybe it's to indentify you.

strSignature - I think it's for identify.


strXmldata-  Whole document data signed.

I will learn than post something ok ? For now I dont have the best asnwer what's the best way to code that.

could you help ?

Kind regards,

Ricardo Viana.

Former Member
0 Kudos

Ricardo, I am just thinking how shall I say thanks to you:-)

Your are on track, bank require same whole request payload on two field one is strSignature(will contain the signed xml request, encoded in base64) and another is  strXmldata(wil contain the base64 encoded xml request ) .

Please let me know if you find any way to do this, once you get anything, I will be waiting for your reply.

I believe, you can help me in this:-) , I am not sure how can I contact Shabarish Vijayakumar for help.

Thanks,

Farhan

rhviana
Active Contributor
0 Kudos

No problem Farhan . I'm just trying to help you, SCN helps me so much, now time to payback.

So he is a legend, he knows about digital signatures.

Also do you any idea about what kind of digital signature format you must use for that ?

Do you have a document of requirement from Bank ?

Welcome Farhan !!

Regards,

Ricardo Viana.

former_member184720
Active Contributor
0 Kudos
Shabarish_Nair
Active Contributor
0 Kudos

Hey folks - I am a bit confused on why the standard PGP module cannot be used here. Could you guys explain?

How is this message being send out to the bank? Is it finally a file?

rhviana
Active Contributor
0 Kudos

Sabarish,

I got confusion about PGP concept, I was thinking that you can use that only into module adapter not in java mapping.

But after see the blog, you can use PGP concept and also encrypt a part of xml, that really interesting.

I got confusion, we can use PGP encryption via java mapping as you can see at blog posted above.

Former Member
0 Kudos

Hi Ricardo,

Yes I do have all the documents from bank, but its big document, I am not sure how can I attach here.

Former Member
0 Kudos

Thanks a lot Sabrish for your reply, I am lucky to get answer from you here:-) . Yes its a file in XML format. I have gone through the standard PGP modules blogs and docs, even your blog. as per my understanding standard PGP module will sign the complete xml file,however in my case I need to sign the request message and encode to base64 and send needs to send the whole signed and encoded data in a single contained string field called

strSignature  ,again I need to send the same request XML on another contained string called strXmldata , which will contain only base64 encoded xml, not signed.

Please see above foe detail description. Do you think its possible just by using standard PGP module?

Thanks,

Fahan

Former Member
0 Kudos

Ricardo, a big thanks to you my friend for engaging all top guys including you. So you guys are suggesting me to write java mapping according to the below link?

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/12/14/pgp-encrypting-part-of-an-xml-mes...



Thanks,

Farhan

Shabarish_Nair
Active Contributor
0 Kudos

Yes. You are right. The PGP module will sign and encrypt the entire payload.

So in this specific case, you might have to do a java mapping for the specific data that you are looking for.

There are already blogs on SDN that talk about PGP using java mappings. One of the most widely used open api is bouncycastle for developing PGP based requirements.

rhviana
Active Contributor
0 Kudos

Thanks for support .

go ahead with java mapping that you will cover the requeriment from Bank.

Regards,

Ricardo Viana.

Former Member
0 Kudos

Hi Ricardo Viana and Shabarish Vijayakumar,

I had a communication with bank technical consultant today, regarding posting the message after mapping to their webserver, I was in assumption that I need to post the fields strSignature(will contain the signed xml request, encoded in base64) and strXmldata(wil contain the base64 encoded xml request ) as an XML tag, as shown below, which was wrong.

<?xml version="1.0"?>

<strSignature>

Signed and Base64 encoded(paymentReqXMLfile)

</strSignature>

<strXmldata>

Base64 encoded(paymentReqXMLfile)

  </strXmldata

They told me, this not correct, strSignature and strXmldata are HTML parameter  in the httpRequest being sent.

Do you guys think I need to use dynamicConfiguration in HTTP_AAE adapeter? Or please suggest me how can post these two field as HTML parameter? By keeping in mind that this is synchronous scenario(ABAP proxy to HTTP_AAE)

Please see the below document from bank, which I have already posted.

Instead of posting one parameter (in case of account statement request) you will post two parameters (strXmldata , strSignature ), the strXmldata  must contain the XML after base64 encoding, the strSignature should contains the digital signature after base64 encoding.

Pseudocode:

digitalSiganature = get_Digital_Signature( paymentReqXMLfile ) 

base64DigitalSignature = base64_Encoding (digitalSiganature) 

base64XmlData = base64_Encoding(paymentReqXMLfile) 

replyXML = HTTPS_Post_B2B(“strSignature=”+ base64DigitalSignature+”&strXmldata=”+ base64XmlData)

processReplyXMLinCORE-SYSTEM(replyXML)

The following is html file content shows how to post those parameters with the base64 XML payment request and signature:

Note:

In the following html examples, html used below only as a demonstration of how data can be posted to B2B Gateway (using HTML form tag), when using your built application you post only the parameters named strXmlData (and strSignature if required), please see the Pseudocode of each service.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>

</HEAD>

<BODY>

<FORM action=" https://<environment-domain/b2b/epay " method="post">

<INPUT type="text" name="strSignature" value="MIIFywYJKoZIhvcNAQcCoIIFvDCCBbgCAQExCzAJBgUrDgMCGgUAMIICKwYJKoZIhvcNAQcBoIICHASCAhg8P3htbCB2ZXJzaW9uPSIxLjAiPz4KPFBheW1lbnRNZXNzYWdlPgo8UGF5bWVudFRyYW5zYWN0aW9uPgogICAgPENvbXBhbnlDb2RlPkFSQU1DTzAwMDE8L0NvbXBhbnlDb2RlPgogICAgPFNlcXVlbmNlTnVtPjE2MDgwPC9TZXF1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DIwNzk5MDEKOjU3QTpSSUJMU0FSSQo6NTk6LzQwNDAxNTQ3Njk5MDEKU0FVREkgQVJBTUNPIE9JTCBDT01QQU5ZCkJPWCA1MDAwCkRIQUhSQU4gClNBVURJIEFSQU1DTyBPSUwgQ09NUEFOWQo6NzA6L0lOVi8yMDAwMDExNTA4PC9UcmFuc2FjdGlvbkRhdGE+CiAgICA8VHJhbnNhY3Rpb25Db21tZW50PkJ1bGsgVEVTVDwvVHJhbnNhY3Rpb25Db21tZW50PgogIDwvUGF5bWVudFRyYW5zYWN0aW9uPgo8L1BheW1lbnRNZXNzYWdlPiA='>

<input type="submit" value="Proceed">

</FORM >

</BODY >

</HTML >

Figure 9 – Example of a Payment Message Post Request

When you post the above request to the B2B Gateway, the gateway will receive the request analyze it, and answer back in the same session with the execution status message,

Thanks, I am waiting for reply from you guys.

Farhan

Former Member
0 Kudos

Hello Expert,

Thanks a ton to everyone for helping me here. this thread was more focused to digital signatures. I am closing this thread right now. I will open the new thread to get my above answer.

Thanks again.

Regards,

Farhan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Farhan,

For signing using PGP module you need private key.where as to verify the digital signature in the message you need public key .

Please go through the below links to know more about how to use the module.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/02/07/using-pgp-in-process-integration

Regards

Venkat

Former Member
0 Kudos

Hi Venkat,

Thanks for your response. I cant use PGP module in my case because, I need to send the whole xml payload on two different string field after signing the message and encoding into base64,and then need to post on HTTPS, see below.  I have gone through theses link.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>

</HEAD>

<BODY>

<FORM action=" https://<environment-domain/b2b/epay " method="post">

<INPUT type="text" name="strSignature" value="MIIFywYJKoZIhvcNAQcCoIIFvDCCBbgCAQExCzAJBgUrDgMCGgUAMIICKwYJKoZIhvcNAQcBoIICHASCAhg8P3htbCB2ZXJzaW9uPSIxLjAiPz4KPFBheW1lbnRNZXNzYWdlPgo8UGF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CSUFOIE9JTCBDT01QQU5ZCkJPWCA1MDAwCkRIQUhSQU4gClNBVURJIEFSQU1DTyBPSUwgQ09NUEFOWQo6NTJBOlJJQkxTQVJJCjo1M0I6LzMwMTA2MDIwNzk5MDEKOjU3QTpSSUJMU0FSSQo6NTk6LzQwNDAxNTQ3Njk5MDEKU0FVREkgQVJBTUNPIE9JTCBDT01QQU5ZCkJPWCA1MDAwCkRIQUhSQU4gClNBVURJIEFSQU1DTyBPSUwgQ09NUEFOWQo6NzA6L0lOVi8yMDAwMDExNTA4PC9UcmFuc2FjdGlvbkRhdGE+CiAgICA8VHJhbnNhY3Rpb25Db21tZW50PkJ1bGsgVEVTVDwvVHJhbnNhY3Rpb25Db21tZW50PgogIDwvUGF5bWVudFRyYW5zYWN0aW9uPgo8L1BheW1lbnRNZXNzYWdlPiA='>

<input type="submit" value="Proceed">

</FORM >

</BODY >

  </HTML >