Process for Signing requests with StarSign
1
Calculate hash of HTTP Request Body
The digest algoritm to use is version specific. As of version 1 it is SHA256. The hash of the body are computed and compared “as-sent” and “as-recieved” which means there are no canonicalization of the body. Encoding must be UTF-8.
2
Build signature payload
The payload is the string to be signed. It uses URL Encoding as representation with all values percent encoded. See payload specification. Example payload:
3
Compute HMAC signature
Compute the HMAC hash of the payload using the Client Secret.
4
Format Authorization header
Format the Authorization header. Base58 encode the HMAC hash and the payload using the BTC alphabet. The HeaderKey is version specific, as of version 1 it is
starsign1.5
Set Authorization header to request and send it
Signature Payload Parameters
The signature payload is metadata that gets signed and sent with the signature hash.Key ID identifies the key used to sign the request.
HMAC algoritm constant is version specific, as of version 1 it is
StarSignV1-HMAC-SHA256.Method of the request.
URL Path of the request with any leading slash trimmed. Example
v1.ParamidionService/DescribeParameterQuery string of the request.
Hash digest value of the HTTP body. The digest algoritm is version
specific, as of version 1 it is SHA256.
Nonce must be at least 16 bytes and at most the same length as the client
secret. Requests that reuse a previous nonce are denied.
Time of signing the request. Time format is ISO 8601 (20060102T150405Z).
Celestra Space offers APIs that supercharge your space software, unlocking the potential for truly captivating outcomes. Create your account today!