Skip to content

Commit 9295963

Browse files
committed
feat: add complete destination authentication support with consolidated OAuth2 flags
- Add support for all 8 Hookdeck authentication types: * Hookdeck Signature (default, explicit flag) * Bearer Token * Basic Auth * API Key (header/query) * Custom Signature (HMAC) * OAuth2 Client Credentials * OAuth2 Authorization Code * AWS Signature - Consolidate OAuth2 flags for simpler, consistent naming: * --destination-oauth2-auth-server (shared by both OAuth2 flows) * --destination-oauth2-client-id * --destination-oauth2-client-secret * --destination-oauth2-scopes (comma-separated) * --destination-oauth2-auth-type (Client Credentials only) * --destination-oauth2-refresh-token (Authorization Code only) - Add comprehensive test coverage: * 19 unit tests for auth config builder * 3 new acceptance tests for OAuth2 and AWS authentication * All tests verify auth configuration stored in destination JSON - Update documentation in REFERENCE.md with all auth options - All flags available in both connection create and upsert commands
1 parent 4a3a0f3 commit 9295963

File tree

6 files changed

+1118
-84
lines changed

6 files changed

+1118
-84
lines changed

REFERENCE.md

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,17 +1073,58 @@ hookdeck connection create \
10731073
- `--destination-description <string>` - Destination description
10741074
- `--destination-url <url>` - Destination URL (required for HTTP)
10751075
- `--destination-cli-path <path>` - CLI path (default: `/`)
1076-
- `--destination-bearer-token <token>` - Bearer token
1077-
- `--destination-api-key <key>` - API key
1078-
- `--destination-basic-auth-user <user>` - Basic auth username
1079-
- `--destination-basic-auth-pass <pass>` - Basic auth password
1080-
- `--destination-oauth-client-id <id>` - OAuth2 client ID
1081-
- `--destination-oauth-client-secret <secret>` - OAuth2 client secret
1082-
- `--destination-oauth-token-url <url>` - OAuth2 token URL
1083-
- `--destination-auth-method <method>` - Auth method
1076+
- `--destination-auth-method <method>` - Authentication method: `hookdeck`, `bearer`, `basic`, `api_key`, `custom_signature`, `oauth2_client_credentials`, `oauth2_authorization_code`, `aws`
10841077
- `--destination-rate-limit <number>` - Rate limit (requests per period)
10851078
- `--destination-rate-limit-period <period>` - Period: `second`, `minute`, `hour`, `day`, `month`, `year`
10861079

1080+
**Destination Authentication Options:**
1081+
1082+
*Hookdeck Signature (default):*
1083+
- `--destination-auth-method hookdeck` - Use Hookdeck signature authentication
1084+
1085+
*Bearer Token:*
1086+
- `--destination-auth-method bearer`
1087+
- `--destination-bearer-token <token>` - Bearer token
1088+
1089+
*Basic Authentication:*
1090+
- `--destination-auth-method basic`
1091+
- `--destination-basic-auth-user <user>` - Username
1092+
- `--destination-basic-auth-pass <pass>` - Password
1093+
1094+
*API Key:*
1095+
- `--destination-auth-method api_key`
1096+
- `--destination-api-key <key>` - API key
1097+
- `--destination-api-key-header <name>` - Key/header name
1098+
- `--destination-api-key-to <location>` - Location: `header` or `query` (default: `header`)
1099+
1100+
*Custom Signature (HMAC):*
1101+
- `--destination-auth-method custom_signature`
1102+
- `--destination-custom-signature-key <name>` - Key/header name
1103+
- `--destination-custom-signature-secret <secret>` - Signing secret
1104+
1105+
*OAuth2 Client Credentials:*
1106+
- `--destination-auth-method oauth2_client_credentials`
1107+
- `--destination-oauth2-auth-server <url>` - Authorization server URL
1108+
- `--destination-oauth2-client-id <id>` - Client ID
1109+
- `--destination-oauth2-client-secret <secret>` - Client secret
1110+
- `--destination-oauth2-scopes <scopes>` - Scopes (comma-separated, optional)
1111+
- `--destination-oauth2-auth-type <type>` - Auth type: `basic`, `bearer`, or `x-www-form-urlencoded` (default: `basic`)
1112+
1113+
*OAuth2 Authorization Code:*
1114+
- `--destination-auth-method oauth2_authorization_code`
1115+
- `--destination-oauth2-auth-server <url>` - Authorization server URL
1116+
- `--destination-oauth2-client-id <id>` - Client ID
1117+
- `--destination-oauth2-client-secret <secret>` - Client secret
1118+
- `--destination-oauth2-refresh-token <token>` - Refresh token
1119+
- `--destination-oauth2-scopes <scopes>` - Scopes (comma-separated, optional)
1120+
1121+
*AWS Signature:*
1122+
- `--destination-auth-method aws`
1123+
- `--destination-aws-access-key-id <id>` - AWS access key ID
1124+
- `--destination-aws-secret-access-key <key>` - AWS secret access key
1125+
- `--destination-aws-region <region>` - AWS region
1126+
- `--destination-aws-service <service>` - AWS service name
1127+
10871128
**Rules - Retry:**
10881129
- `--rule-retry-strategy <strategy>` - Strategy: `linear`, `exponential`
10891130
- `--rule-retry-count <number>` - Number of retry attempts (1-20)

0 commit comments

Comments
 (0)