Sahamati

Collective of Account Aggregator Ecosystem

  • Blog
  • Workshops
  • Resources
  • FAQ
  • Careers




Verify API SignatureVerify Consent Signature



Digital Signature Verification Tool for Account Aggregator Ecosystem - Sahamati

All API must be digitally signed which ensures non-repudiation & authentication of requester. This tool validates the digital signature being used in the APIs.

All API requests must be digitally signed using industry-grade signature algorithms. This ensures non-repudiation and authentication of API requester before the API service provider fulfills the request. This tool validates the digital signature being used in the API call. The procedure to generate the digital signature in API requests is explained below.


Sender Side:

  1. The data to sign if it is in object form, serialized to plain text
  2. A detached content signature is then generated for the data with sender's private key using RS256 algorithm and base64 encoding.
  3. e.g:

    eyJhbGciOiJSUzI1NiIsImtpZCI6IjQyNzE5MTNlLTdiOTMtNDlkZC05OTQ5LTFjNzZmZjVmYzVjZiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..jG6_lRYLsODqnbtzm3qfzb_Oqb_ssBzvSeQ2DN7W9YU4x-BOeSwic3MDJ_djAqE-vgPG2efvza7Dz-3MMImqDpdVBHCorrbmU-cq4yqyXtfZDTqlpj2abDyAapoHug9Tt93Rqjy2aE7KV3HtkVNH8tBXaSjAs6MQLLfWFz2Y0LcyjHggUHaPzyGn8ouIg_fstSIcoiibSYaHHzQSRce0SkBsg1e27QsVDAVhMKJZuQaG615oxFwjPXkw_v9HH2RY8JYXynJhu5ik4opfJuKnoRyGVrX6jou6bHrEkri_tp_VW_pWaaqGLMyQX_WXbMhNNm-mVtALWLJGlBLI-nld-A

  4. The signature is set in the http header x-jws-signature
  5. The text is sent as http body to the receiver.

Receiving side:

  1. Extract the signature from header and extract the data from body of the http post request
  2. Verify the detached signature.
  3. If the verification successful, then perform the de-serialization for further processing


Verify API Signature



Consent Signature Verification Tool for Account Aggregator Ecosystem - Sahamati

In the AA ecosystem, Consents are signed artefacts authorizing a FIU to request for data with an FIP.

Consents must be transmitted with every FI Request to the Account Aggregator by FIU. Hence it is important for an AA to generate a consent artefact with signature that can be validated by the FIP before honouring the request. The procedure to verify consent signature is explained below

Sender Side:

  1. Serialize the consent to plain text
  2. A detached content signature is then generated for the data with sender's private key using RS256 algorithm and base64 encoding.
  3. e.g:

    eyJhbGciOiJSUzI1NiIsImtpZCI6IjQyNzE5MTNlLTdiOTMtNDlkZC05OTQ5LTFjNzZmZjVmYzVjZiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19.{"consentStart":"2019-12-06T11:39:57.153Z","consentExpiry":"2019-12-06T11:39:57.153Z","consentMode":"VIEW","fetchType":"ONETIME","frequency":{"unit":"HOUR","value":1.0},"purpose":{"code":"101","refUri":"https://api.rebit.org.in/aa/purpose/101.xml","text":"Wealth management service","category":{"type":"category type"}},"fidataRange":{"from":"2017-07-13T11:33:34.509Z","to":"2017-07-13T11:33:34.509Z"},"dataLife":{"unit":"DAY","value":0.0},"dataProvider":{"id":"DP1","type":"FIP"},"customer":{"id":"customer@finvu.in"},"dataConsumer":{"id":"DC1","type":"AA"}}.jG6_lRYLsODqnbtzm3qfzb_Oqb_ssBzvSeQ2DN7W9YU4x-BOeSwic3MDJ_djAqE-vgPG2efvza7Dz-3MMImqDpdVBHCorrbmU-cq4yqyXtfZDTqlpj2abDyAapoHug9Tt93Rqjy2aE7KV3HtkVNH8tBXaSjAs6MQLLfWFz2Y0LcyjHggUHaPzyGn8ouIg_fstSIcoiibSYaHHzQSRce0SkBsg1e27QsVDAVhMKJZuQaG615oxFwjPXkw_v9HH2RY8JYXynJhu5ik4opfJuKnoRyGVrX6jou6bHrEkri_tp_VW_pWaaqGLMyQX_WXbMhNNm-mVtALWLJGlBLI-nld-A

  4. The payload is encrypted with base64.
  5. e.g:

    eyJhbGciOiJSUzI1NiIsImtpZCI6IjQyNzE5MTNlLTdiOTMtNDlkZC05OTQ5LTFjNzZmZjVmYzVjZiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19.eyJjb25zZW50U3RhcnQiOiIyMDE5LTEyLTA2VDExOjM5OjU3LjE1M1oiLCJjb25zZW50RXhw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
        "txnid" :"0b811819-9044-4856-b0ee-8c88035f8858",
        "consentId" : "XXXX-XXXX-XXXX-XXXX",
        "status" : "ACTIVE",
        "createTimestamp" : "2018-12-06T11:39:57.153Z",
        "consent" : {
            "consentJWS" : " JWT_TOKEN "
        },
        "consentUse" : {
            "logUri" : "loguri string",
            "count" : 1.0,
            "lastUseDateTime" : "2018-12-06T11:39:57.153Z"
        }
    }

  8. The request is then sent to the receiver.

Receiving side:

  1. Extract the consentJWS from body of the HTTP post request
  2. Verify the detached signature and if successful extract the consent.
  3. Once extracted, the consent content of the JWS looks like this (formatted for readability):
    e.g:

    {"consentStart":"2019-12-06T11:39:57.153Z","consentExpiry":"2019-12-06T11:39:57.153Z","consentMode":"VIEW","fetchType":"ONETIME","frequency":{"unit":"HOUR","value":1.0},"purpose":{"code":"101","refUri":"https://api.rebit.org.in/aa/purpose/101.xml","text":"Wealth management service","category":{"type":"category type"}},"fidataRange":{"from":"2017-07-13T11:33:34.509Z","to":"2017-07-13T11:33:34.509Z"},"dataLife":{"unit":"DAY","value":0.0},"dataProvider":{"id":"DP1","type":"FIP"},"customer":{"id":"customer@finvu.in"},"dataConsumer":{"id":"DC1","type":"AA"}}



Verify Consent Signature






  • Membership
  • Contact Us

Copyright © 2020 DigiSahamati Foundation