Closes #1434 These config options were likely a copy/paste error from other target types. Refer to https://github.com/minio/minio/blob/master/internal/event/target/webhook.go#L64-L73 for the correct list. This update matches that code.
7.6 KiB
Webhook Service Notification Settings
minio
Table of Contents
This page documents settings for configuring an Webhook service as a
target for Bucket Notifications <minio-bucket-notifications>.
See minio-bucket-notifications-publish-webhook for a
tutorial on using these settings.
Multiple Webhook Service Targets
You can specify multiple Webhook service endpoints by appending a
unique identifier _ID for each set of related Webhook
settings on to the top level key. For example, the following commands
set two distinct Webhook service endpoints as PRIMARY and
SECONDARY respectively:
Environment Variables
export MINIO_NOTIFY_WEBHOOK_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_WEBHOOK_ENDPOINT_PRIMARY="https://webhook1.example.net"
export MINIO_NOTIFY_WEBHOOK_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_WEBHOOK_ENDPOINT_SECONDARY="https://webhook1.example.net"
Configuration Settings
mc admin config set notify_webhook:primary \
endpoint="https://webhook1.example.net"
[ARGUMENT=VALUE ...]
mc admin config set notify_webhook:secondary \
endpoint="https://webhook2.example.net
[ARGUMENT=VALUE ...]
Settings
Enable
Required
Environment Variable
MINIO_NOTIFY_WEBHOOK_ENABLE
Specify on to enable publishing bucket notifications to
a Webhook service endpoint.
Defaults to off.
Configuration Setting
notify_webhook
The top-level configuration key for defining an Webhook service
endpoint for use with MinIO bucket notifications <minio-bucket-notifications>.
Use mc admin config set to set or update an Webhook
service endpoint. The ~notify_webhook.endpoint argument is
required for each target. Specify additional optional arguments
as a whitespace (" ")-delimited list.
mc admin config set notify_webhook \
endpoint="https://webhook.example.net"
[ARGUMENT="VALUE"] ... \
Endpoint
Required
Environment Variable
MINIO_NOTIFY_WEBHOOK_ENDPOINT
Configuration Setting
notify_webhook endpoint
Specify the URL for the webhook service.
Auth Token
Required
Environment Variable
MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN
An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.
To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.
For example, for a Bearer token, prepend Bearer:
export MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_myendpoint="Bearer 1a2b3c4f5e"
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
export MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_xyz="ServiceXYZ 1a2b3c4f5e"
Consult the documentation for the desired service for more details.
Configuration Setting
notify_webhook auth_token
An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.
To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.
For example, for a Bearer token, prepend Bearer:
mc admin config set myminio notify_webhook \
endpoint="https://webhook-1.example.net" \
auth_token="Bearer 1a2b3c4f5e"
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
mc admin config set myminio notify_webhook \
endpoint="https://webhook-1.example.net" \
auth_token="ServiceXYZ 1a2b3c4f5e"
Consult the documentation for the desired service for more details.
RELEASE.2023-06-23T20-26-00Z
MinIO redacts this value when returned as part of mc admin config get.
Queue Directory
Optional
Environment Variable
MINIO_NOTIFY_WEBHOOK_QUEUE_DIR
Configuration Setting
notify_webhook queue_dir
Specify the directory path to enable MinIO's persistent event store
for undelivered messages, such as /opt/minio/events.
MinIO stores undelivered events in the specified store while the webhook service is offline and replays the stored events when connectivity resumes.
Queue Limit
Optional
Environment Variable
MINIO_NOTIFY_WEBHOOK_QUEUE_LIMIT
Configuration Setting
notify_webhook queue_limit
Specify the maximum limit for undelivered messages. Defaults to
100000.
Client Certificate
Optional
Environment Variable
MINIO_NOTIFY_WEBHOOK_CLIENT_CERT
Configuration Setting
notify_webhook client_cert
Specify the path to the client certificate to use for performing mTLS authentication to the webhook service.
Client Key
Optional
Environment Variable
MINIO_NOTIFY_WEBHOOK_CLIENT_KEY
Configuration Setting
notify_webhook client_key
Specify the path to the client private key to use for performing mTLS authentication to the webhook service.