@cryptotaxi247 / netdata-1 / commits / 97d3cfb4b

Regenerate integrations docs (#21106)

Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com>

Netdata bot committed Oct 6, 2025 at 20:35 UTC 97d3cfb4b832d00d7d36f97003fb5eb34b6e4bfa
1 file changed +3 -55
integrations/cloud-notifications/integrations/webhook.md
+3 -55
@@ -41,6 +41,9 @@ endmeta-->
41 - Mutual TLS (recommended): Default authentication mechanism used if no other method is selected
42 - Basic: The client sends a request with an Authorization header that includes a base64-encoded string in the format **username:password**.
43 - Bearer: The client sends a request with an Authorization header that includes a **bearer token**.
44 + - **Verification**
45 + - Token: The Token from the latest **Test notification** received on the webhook endpoint.
46 + - Click on the **Test** button to receive a notification. Token will be embedded in the payload.
47
48 ### Webhook service
49
@@ -195,61 +198,6 @@ In basic authorization, the client sends a request with an Authorization header
198 ##### Bearer token authentication
199
200 In bearer token authentication, the client sends a request with an Authorization header that includes a bearer token. The server then uses this token to authenticate the client. Bearer tokens are typically generated by an authentication service, and are passed to the client after a successful authentication. If this method is selected, the user can set the token to be used for connecting to the destination service.
198 -
199 -##### Challenge secret
200 -
201 -To validate that you have ownership of the web application that will receive the webhook events, Netdata is using a challenge response check mechanism.
202 -
203 -This mechanism works as follows:
204 -
205 -- The challenge secret parameter that you provide is a shared secret between only you and Netdata.
206 -- On your request for creating a new Webhook integration, Netdata will make a GET request to the URL of the webhook, adding a query parameter `crc_token`, consisting of a random string.
207 -- You will receive this request on your application and it must construct an encrypted response, consisting of a base64-encoded HMAC SHA-256 hash created from the crc_token and the shared secret. The response will be in the format:
208 -
209 - ```json
210 - {
211 - "response_token": "sha256=9GKoHJYmcHIkhD+C182QWN79YBd+D+Vkj4snmZrfNi4="
212 - }
213 - ```
214 -
215 -- Netdata will compare your application's response with the hash that it will generate using the challenge secret, and if they are the same, the integration creation will succeed.
216 -
217 -Netdata does this validation every time you update your integration configuration.
218 -
219 -- Response requirements:
220 - - A base64 encoded HMAC SHA-256 hash created from the crc_token and the shared secret.
221 - - Valid response_token and JSON format.
222 - - Latency less than 5 seconds.
223 - - 200 HTTP response code.
224 -
225 -**Example response token generation in Python:**
226 -
227 -Here you can see how to define a handler for a Flask application in python 3:
228 -
229 -```python
230 -import base64
231 -import hashlib
232 -import hmac
233 -import json
234 -
235 -key ='YOUR_CHALLENGE_SECRET'
236 -
237 -@app.route('/webhooks/netdata')
238 -def webhook_challenge():
239 -token = request.args.get('crc_token').encode('ascii')
240 -
241 -# creates HMAC SHA-256 hash from incomming token and your consumer secret
242 -sha256_hash_digest = hmac.new(key.encode(),
243 - msg=token,
244 - digestmod=hashlib.sha256).digest()
245 -
246 -# construct response data with base64 encoded hash
247 -response = {
248 - 'response_token': 'sha256=' + base64.b64encode(sha256_hash_digest).decode('ascii')
249 -}
250 -
251 -# returns properly formatted json response
252 -return json.dumps(response)
201 ```
202
203