QOps-SetWebhookSecret

Sets, or generates, the shared secret the Portal's CI webhook requires in the X-Webhook-Secret header. Until a secret is set, POST /api/v2/webhooks answers 401 to every request.

New in version 3.0.12

Syntax

QOps-SetWebhookSecret [Value]

Parameters meaning:

Value installs the secret you give it. Omit it and QOps generates a 256-bit secret and shows it once — the recommended form, because a secret a person chooses is the one that ends up guessable. Rotating the secret needs no reinstall.

The secret is printed to the console only. It is deliberately kept out of the QOps log file and out of the Portal's web interface.

Examples

QOps-SetWebhookSecret

Generates a new secret and prints it once.

QOps-SetWebhookSecret "your-secret-value"