Authenticating with Hawk
Sign requests with Hawk credentials.
Overview
Hawk is an HTTP authentication scheme in which each request carries a MAC of its method, URL, host, port and timestamp, keyed with a secret that the client and server share. The secret itself never goes over the network.
Relay signs each request when it sends it and puts the result in an Authorization: Hawk … header. To use it, open the Auth tab of a request, folder, collection or workspace, click the auth type menu and choose Hawk.
Enter your credentials
Fill in the Credentials card:
- Key ID: The credentials' identifier, sent as
id. - Key: The shared secret.
- Algorithm: SHA-256 (the default) or SHA-1. Use the algorithm the server expects for these credentials.
- Include a payload hash: Sign the request's body and content type as well, and send the hash as
hash. Turn it on when the server requires payload validation.
Relay needs a key ID and a key to sign. If one is missing, the request isn't sent and the response inspector says so.
Adjust advanced options
Click Advanced to show the optional settings:
- Ext: Application data to send and sign as
ext. - App: For delegated credentials, the application ID, sent as
app. - Delegated By: For delegated credentials, sent as
dlg. - Timestamp and Nonce: Fixed values to use. Leave them empty to have Relay generate them for each request.
If the request has its own Authorization header in the Headers tab, Relay doesn't add a Hawk header.
See Also
- Inheriting authentication: Set authentication once on a workspace, collection or folder and let requests inherit it.
- Signing requests with AWS Signature: Sign requests to AWS services with Signature Version 4.
- Keeping secrets on your Mac: Keep tokens and passwords out of shared workspace files.