Secure API Calls Flow
Every OCEN participant may be an API Provider or an API Client. In these roles:
- API Clients need an access token to present to the API Provider to authorize the calls.
- API Provider need access to the public key of token issuing OCEN Auth Component to validate the access token presented by an API client.
- Upon identifying the caller using the access token, API Provider need access to the public key of the API Client to verify the integrity of the digitally signed request sent by the API Client.
- Along similar lines to (3), API Client, while receiving the response to their requests, also need access to the API Provider’s public key to verify the digitally signed response from the API Provider.
Following is a sample interaction between a Lender and a Loan Agent(LA), following the security guidelines mentioned here:
- LA obtains an access token from Auth Component by calling the GenerateAccessToken API
- LA fetches the endpoint location of the lender by caling the GetNetworkParticipantDetails API.
- LA calls the lender, attaches its access token to
Authorization
header & attaches bodySignature
header as well. - Lender determines the ParticipantID of the LA from the access token
- Lender fetches the public key of the LA, by caling the GetNetworkParticipantDetails API
- Lender verifies the Signature header in the LA's request and proceeds to process the request
When the Lender responds back to LA, its includes own access token and response body Signature
header attached as done by LA in steps 1-3. Similarly upon receiving the same from the Lender, LA fetches the public key of the Lender, verifies if the request is valid as done by Lender in Steps 4-5.