Approving A Whitelisted Address
Basic Description
This endpoint is used to approve a _whitelisted address Request _ in Taurus-PROTECT.
This endpoint would accept a POST Request with a JSON payload, including the generated ECDSA Signature of the array of all the hashes within the metadata of each whitelisted address Request that needs to be signed.
Prerequisites
Required Roles
Certain API endpoints require that the user has a specific role in order to access them. Roles are used to restrict access to certain functionality within the system and ensure that only authorized users are able to perform specific actions.
Here is the list of required Roles for this particular endpoint:
- WhitelistedAddressApprover
- TPUser
To find out more about roles, please refer to the following page in the Taurus User Guides.
Required Input Parameters
Certain API endpoints require specific input parameters. Here is the list of Required Input Parameters for this particular endpoint:
- signature: the computed ECDSA signature for one or more whitelisted address IDs, encoded in Base64.
- whitelistedAddressIds: one or more whitelisted address IDs to be approved.
Preconditions
It is important to note the correct ECDSA Signature needs to have been properly generated and the relevant Whitelisted Address Request(s) need to pre-exist on the system for the approval process to go through successfully.
ECDSA Signature
An ECDSA signature allows a user to publish a public key and then create a signature of some data with their private key, such that anyone can verify that the signature was created by the owner of this public key. To find out more about the computation and encoding of the appropriate ECDSA signature, please refer to the following page.
Signature Example
You can find a basic example in Bash on how to generate an ECDSA Signature.
Signature Result
A successful final output of the above script might look like this:
This result is what you eventually need to add within the JSON Body of the below Request.
Call Example
You can find a basic example in cURL below.
Please note that you will need to update the BASEURL and the APITOKEN for the command to function.
In this example, we use the computed ECDSA signature, encoded in Base64, to sign the Request with ID 443.
This piece of code sends a POST request to https://your-protect-instance.example.comapi/rest/v1/whiteslists/addresses/approve with the JSON string in the request body including the relevant ECDSA signature, encoded in Base64, and the list of whitelistedAddressIds.
Call Result
A successful response for the POST call to approve a address whitelisting request might look like this:
Taurus-PROTECT responds with a JSON object containing the number of approved whitelisted address request details.