Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

AWS Signature Version 4 (SigV4)

Introduction

AWS Signature Version 4 (SigV4) is the request-signing protocol used by Amazon Web Services. Patchworks supports SigV4 authentication in the connector builder, so you can build connectors for AWS services - such as API Gateway, S3, Lambda function URLs, SQS, and OpenSearch - or for any third-party API that implements SigV4 signing.

Unlike basic or token-based authentication, your secret key is never sent with a request. Instead, every request carries a unique cryptographic signature derived from it - Patchworks computes this signature for you, automatically, on every request.

How it works

Each time a flow makes a request via a SigV4 connector, Patchworks signs that request in four steps:

Step
What happens

๐Ÿงพ 1. Canonical request

The HTTP method, path, query string, headers, and a hash of the payload are assembled into a standardised (canonical) form.

๐Ÿ”ค 2. String to sign

The canonical request is hashed and combined with the algorithm, a timestamp, and the credential scope (date / region / service).

๐Ÿ”‘ 3. Signing key

A one-time signing key is derived from your secret access key via a chain of HMAC operations: date โ†’ region โ†’ service โ†’ aws4_request.

โœ๏ธ 4. Sign & send

The signature is calculated and added to the request's Authorization header, along with your access key ID and the list of signed headers.

What you need

To configure SigV4 authentication for a connector, have the following AWS credentials and settings to hand:

Field
Summary

Access key ID

The public identifier for your IAM user or role (e.g. AKIA...).

Secret access key

The private key used to derive request signatures. Stored encrypted by Patchworks and never transmitted.

Region

The AWS region of the target service (e.g. eu-west-1). Must match the endpoint you're calling.

Service

The AWS service code used in the credential scope (e.g. execute-api for API Gateway, s3 for S3).

๐Ÿ’ก We recommend creating a dedicated IAM user for your Patchworks connector, scoped with least-privilege permissions for just the actions your integration needs. See the AWS SigV4 documentation for background on the signing process.

User experience of SigV4 authentication

When a Patchworks user adds an instance of a connector built with SigV4 authentication, they're simply prompted for the credentials above - all signing happens behind the scenes on every request, with nothing to refresh or rotate manually.

Troubleshooting

Error from AWS
Likely cause

SignatureDoesNotMatch

Secret access key is incorrect, or the service/region values don't match the endpoint being called.

InvalidClientTokenId

The access key ID doesn't exist or has been deactivated in IAM.

Signature expired

Clock skew - the request timestamp fell outside AWS's 15-minute validity window.

AccessDenied (403)

Credentials are valid but the IAM policy doesn't permit the requested action.

Last updated

Was this helpful?