AWS SigV4 Proxy
Overview
Why use the AWS SigV4 integration?
- Reuse the Tenklo proxy to call AWS APIs (S3, CloudWatch, etc.) without storing customer credentials.
- Two modes for obtaining temporary credentials:
- Built-in AWS STS — Tenklo calls AWS STS
AssumeRoledirectly using your AWS credentials. No external service needed. - Custom STS endpoint — You host your own STS-style service that exchanges a customer IAM Role ARN + ExternalId for temporary AWS credentials.
- Built-in AWS STS — Tenklo calls AWS STS
Access requirements
Built-in AWS STS mode
| Pre-Requisites | Status | Comment |
|---|---|---|
| AWS account with IAM permissions | ✅ Required | Your AWS Access Key ID and Secret Access Key are stored securely in Tenklo's encrypted secrets column. |
| Customer AWS account | ✅ Required | Your customer creates an IAM role that trusts your AWS account with the ExternalId Tenklo generates (or that you pre-seed). |
| Custom STS endpoint | ❌ Not required | Tenklo calls AWS STS directly. |
Custom STS endpoint mode
| Pre-Requisites | Status | Comment |
|---|---|---|
| AWS account with IAM permissions | ✅ Required | Needed to host the STS endpoint and to register a trusted role in your own account. |
| Customer AWS account | ✅ Required | Your customer creates an IAM role that trusts your STS role with the ExternalId. |
| Custom STS endpoint | ✅ Required | Hosted by you (Docker container or similar). You expose the URL + auth in Tenklo integration settings. |
Setup guide
Tenklo supports two STS modes. Choose the one that fits your setup.
Option A: Built-in AWS STS (recommended)
Tenklo calls AWS STS AssumeRole directly — no external service to host.
Create an AWS SigV4 integration in Tenklo
- From the Integrations page, add the AWS SigV4 Proxy template.
- In Settings → General, locate the AWS SigV4 configuration card.
- Select Built-in AWS STS as the STS mode.
- Enter the AWS service identifier you plan to call (for example
s3). - (Optional) Provide a default AWS region. End customers can override this during Connect.
- Enter your AWS Access Key ID and AWS Secret Access Key. These credentials are used to call
sts:AssumeRoleon behalf of your customers. They are stored in Tenklo’s encrypted secrets column and never exposed in the integration config. - Click Save.
Onboard customers in your own application
Before opening Tenklo Connect, surface setup instructions (CloudFormation templates, manual IAM steps, etc.) in your own onboarding flow. Generate the ExternalId, show it to the customer so they can paste it into their IAM trust policy, and collect the resulting IAM Role ARN. Pre-seed the ExternalId into the Connect session so the value the customer sees in Connect matches what they configured.
Collect Role ARN & optional region during Connect
- Create a Connect session, pre-filling
external_id(and optionallyrole_arn/region) viaintegrations_config_defaults(see Pre-populating credential values). - The Connect UI shows the pre-seeded External ID read-only so the customer can confirm it matches their trust policy.
- When the end customer submits the form, Tenklo calls AWS STS
AssumeRolewith your credentials, tests the result viaGetCallerIdentity, and stores a refreshable SigV4 credential.
Call POST /proxy (or the SDK equivalents) exactly like other Tenklo connections. The proxy automatically refreshes temporary credentials through AWS STS and signs each request with SigV4 before forwarding it to AWS.
Option B: Custom STS endpoint
You host your own STS-style service that exchanges credentials on behalf of customers.
Host or configure your STS endpoint
Deploy the SigV4 STS helper service (Docker or any HTTPS service) in your infrastructure. It must accept a JSON payload that includes role_arn, external_id, region, and service, assume the requested role, and return temporary AWS credentials (see STS endpoint contract). Secure the endpoint using either an API key header or HTTP basic auth so Tenklo can authenticate the call.
Create an AWS SigV4 integration in Tenklo
- From the Integrations page, add the AWS SigV4 Proxy template.
- In Settings → General, locate the AWS SigV4 configuration card.
- Select Custom STS Endpoint as the STS mode.
- Enter the AWS service identifier you plan to call (for example
s3). - (Optional) Provide a default AWS region. End customers can override this during Connect.
- Supply the STS endpoint URL and choose how Tenklo should authenticate (API key header or basic auth).
- Click Save to persist these settings.
Onboard customers in your own application
Before opening Tenklo Connect, surface setup instructions in your own onboarding flow. Generate the ExternalId, show it to the customer so they can paste it into their IAM trust policy, and collect the resulting IAM Role ARN. Pre-seed the ExternalId into the Connect session so the value the customer sees in Connect matches what they configured.
Collect Role ARN & optional region during Connect
- Create a Connect session, pre-filling
external_id(and optionallyrole_arn/region) viaintegrations_config_defaults(see Pre-populating credential values). - The Connect UI shows the pre-seeded External ID read-only so the customer can confirm it matches their trust policy.
- When the end customer submits the form, Tenklo calls your STS endpoint with the Role ARN + ExternalId, tests the credentials via
GetCallerIdentity, and stores a refreshable SigV4 credential.
Call POST /proxy (or the SDK equivalents) exactly like other Tenklo connections. The proxy automatically refreshes temporary credentials through your STS endpoint and signs each request with SigV4 before forwarding it to AWS.
STS endpoint contract (custom mode only)
AssumeRole API directly and handles the request/response automatically.The STS endpoint is customer-owned. Tenklo simply POSTs a JSON payload and expects temporary credentials in return.
{
"role_arn": "arn:aws:iam::123456789012:role/NangoAccessRole",
"external_id": "1bdff5dc-1b49-4f1c-9880-4402f8cad9cb",
"region": "us-east-1",
"service": "s3"
}{
"accessKeyId": "<TEMP ACCESS KEY>",
"secretAccessKey": "<TEMP SECRET>",
"sessionToken": "<SESSION TOKEN>",
"expiresAt": "2025-01-31T17:28:00Z"
}- You may wrap the response inside a
credentialsobject; the helper accepts either shape. expiresAt/expires_at/expirationare interchangeable. Numeric values are treated as Unix seconds. If omitted, Tenklo assumes one hour.
Pre-populating credential values
You can pre-seed external_id, role_arn, or region per Connect session via integrations_config_defaults. Pre-seeding the ExternalId is the recommended pattern: mint it in your onboarding flow, show it to the customer alongside their IAM trust-policy instructions, then pass the same value into Connect so the customer sees a matching read-only value.
const { data } = await nango.createConnectSession({
end_user: { id: 'user-123' },
integrations_config_defaults: {
'aws-sigv4': {
connection_config: {
external_id: '1bdff5dc-1b49-4f1c-9880-4402f8cad9cb',
role_arn: 'arn:aws:iam::123456789012:role/NangoAccessRole',
region: 'us-west-2'
}
}
}
});On reconnect flows the previously stored ExternalId is reused.
Useful links
- AWS Signature Version 4 signing process
- AWS STS AssumeRole documentation
- AWS IAM best practices for ExternalId