Secrets in HTTP

Store authentication credentials as secrets for HTTP destination nodes.

Store authentication credentials as secrets for HTTP destination nodes.

Bearer Token Authentication

Store an API token as a secret and use it in the Authorization header.

Secret to create:

Secret NameDescription
api-bearer-tokenYour API bearer token

HTTP Destination Node:

- name: http_destination
  type: http_output
  endpoint: https://api.example.com/logs
  headers:
    Authorization: 'Bearer {{ SECRET api-bearer-token }}'

Basic Authentication

Store username and password as secrets for HTTP Basic Authentication.

Secrets to create:

Secret NameDescription
http-usernameThe username
http-passwordThe password

HTTP Destination Node:

- name: http_destination
  type: http_output
  endpoint: https://api.example.com/logs
  basic_auth:
    username: '{{ SECRET http-username }}'
    password: '{{ SECRET http-password }}'

Custom Headers

You can reference secrets in any custom header value.

Secrets to create:

Secret NameDescription
api-keyYour API key
client-secretYour client secret

HTTP Destination with Custom Headers:

- name: http_destination
  type: http_output
  endpoint: https://api.example.com/logs
  headers:
    X-API-Key: '{{ SECRET api-key }}'
    X-Client-Secret: '{{ SECRET client-secret }}'

See Also