Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Authentication

auth: lists one or more alternatives. Each has an id (unique in the connector), a kind, and kind-specific settings. Users pick an alternative when they create a credential; the credential kind is <connector id>/<auth id>, for example slack/oauth2.

auth:
  - id: bot_token
    kind: bearer
    display_name: Bot token
    description: A bot token from your app's OAuth & Permissions page.
    fields:                                  # optional; each kind has standard fields
      - { name: token, display_name: Bot token, secret: true, required: true }
    test:                                    # optional; used by "Test credential"
      request: { method: POST, path: /auth.test }
      success_when: "{{ response.body.ok }}"

Credential fields

When fields: is omitted, the kind’s standard fields are used (listed per kind below). Declare fields: to rename them, add help text, or add extra values such as an account subdomain.

Field keyMeaning
nameKey used in templates as credential.<name>
display_name, descriptionForm label and help text
secretEncrypted at rest, write-only through the API, redacted everywhere
requiredForm validation
defaultPrefilled value (never for secrets)

Any field can be used in templates, including base_url:

base_url: "https://{{ credential.subdomain }}.example-helpdesk.com/api/v2"
auth:
  - id: api_token
    kind: basic
    value: "{{ credential.email }}/token:{{ credential.api_token }}"
    fields:
      - { name: subdomain, display_name: Subdomain, required: true }
      - { name: email, display_name: Email, required: true }
      - { name: api_token, display_name: API token, secret: true, required: true }

Credential values are resolved per request and never written to execution data or logs.

Test requests

test.request runs with the credential when the user clicks Test credential or runs tappet credentials test. The test passes when the response status is below 400 and, if given, test.success_when is truthy. Choose a cheap, read-only endpoint (“who am I”).

Kinds

none

No authentication. Useful as an alternative for public endpoints.

api_key

Standard field: api_key (or the name given by field:).

- id: api_key
  kind: api_key
  in: header          # header | query | cookie
  name: X-Api-Key     # header, query parameter or cookie name
  prefix: ""          # e.g. "Token " or "ApiKey "

value: replaces the credential value with a template, for keys built from several fields.

bearer

Standard field: token. Sends Authorization: Bearer <token>. token_prefix changes Bearer.

basic

Standard fields: username, password. Sends HTTP Basic authentication. value: can build the user:password pair from other fields.

oauth2_auth_code

Authorization code flow, for APIs where users sign in and grant access.

- id: oauth2
  kind: oauth2_auth_code
  authorize_url: https://example.com/oauth/authorize
  token_url: https://example.com/oauth/token
  scopes: [read, write]
  scope_separator: " "             # default " "
  pkce: true                       # S256 code challenge
  extra_authorize_params: { access_type: offline, prompt: consent }
  client_auth: header              # header (HTTP Basic) | body
  token_placement: header          # header | query
  token_param: access_token        # query parameter name when token_placement: query
  token_prefix: Bearer

Standard fields: client_id, client_secret. Users bring their own OAuth app and paste the redirect URI shown on the credential page (<TAPPET_PUBLIC_URL>/api/v1/oauth2/callback). The vault stores the tokens, refreshes them ahead of expiry, coordinates refreshes so concurrent executions trigger exactly one refresh, persists rotated refresh tokens atomically, and marks the credential needs_reauth when the provider answers invalid_grant.

oauth2_client_credentials

Machine-to-machine tokens. Same settings as above minus authorize_url, pkce and the authorize parameters. Standard fields: client_id, client_secret.

oauth2_password

Legacy resource-owner password grant, only for APIs that require it. Standard fields: client_id, client_secret (optional), username, password.

jwt_service_account

Service-account JWT bearer flow, as used by Google Cloud APIs.

- id: service_account
  kind: jwt_service_account
  token_url: https://oauth2.googleapis.com/token
  audience: https://oauth2.googleapis.com/token
  scopes: [https://www.googleapis.com/auth/spreadsheets]
  subject_field: subject           # credential field with the user to impersonate

Standard fields: client_email, private_key (PEM, secret), and the optional impersonation subject.

aws_sigv4

AWS Signature Version 4.

- id: iam
  kind: aws_sigv4
  service: sqs
  region: "{{ credential.region }}"

Standard fields: access_key_id, secret_access_key, session_token (optional), region.

oauth1_hmac_sha1

OAuth 1.0a request signing with HMAC-SHA1. Standard fields: consumer_key, consumer_secret, token, token_secret.

hmac_header

Custom request signing: a canonical string is built from a template, signed, and sent in a header.

- id: signed
  kind: hmac_header
  name: X-Signature                 # header carrying the signature
  algorithm: sha256                 # sha1 | sha256 | sha512
  encoding: hex                     # hex | base64
  canonical: "{{ request.method }}\n{{ request.path }}\n{{ timestamp }}\n{{ request.body_sha256 }}"
  extra_headers:
    X-Timestamp: "{{ timestamp }}"
    X-Key-Id: "{{ credential.key_id }}"
  fields:
    - { name: key_id, display_name: Key ID, required: true }
    - { name: secret, display_name: Signing secret, secret: true, required: true }

The canonical template sees request (method, path, query, body hash), credential, timestamp and nonce.

custom_native

A named Rust signer for schemes that cannot be described with the options above.

- id: signed
  kind: custom_native
  signer: acme_v3_signature
  fields:
    - { name: key_id, display_name: Key ID, required: true }
    - { name: private_key, display_name: Private key, secret: true, required: true }

See Native hooks.

Using a different alternative for one request

A request (or step) can set auth: to another alternative’s ID, or to none. Use none for pre-signed upload URLs so the credential is never sent to a third-party host.