The webhook integration is implemented but there's a webhook secret mismatch between the data pipeline and the website.
✅ Model registration in MLflow works
✅ Webhook is sent to https://hokus.ai/api/webhooks/model-registration
✅ Website endpoint exists and validates signatures
✅ Correct header name: x-mlflow-signature
❌ Signature validation fails - Status 401: "Invalid signature"
The website is configured with a different WEBHOOK_SECRET than what we're using in the data pipeline.
WEBHOOK_URL=https://hokus.ai/api/webhooks/model-registration
WEBHOOK_SECRET=test_webhook_secret_for_developmentThe website needs to have the exact same webhook secret:
WEBHOOK_SECRET=test_webhook_secret_for_development- Data Pipeline generates signature:
signature = hmac.new(
webhook_secret.encode('utf-8'),
payload_json.encode('utf-8'),
hashlib.sha256
).hexdigest()- Sends with header:
x-mlflow-signature: sha256=<signature>
- Website validates:
const expectedSignature = 'sha256=' + crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(payloadString, 'utf8')
.digest('hex');
if (signature !== expectedSignature) {
return res.status(401).json({ error: 'Invalid signature' });
}The website team should update their environment variable to:
WEBHOOK_SECRET=test_webhook_secret_for_development
If the website is using a different secret for security reasons:
- Website team shares their actual
WEBHOOK_SECRET - We update our
.envfile with the correct secret - Both sides use the same secret
Temporarily disable signature validation on the website for testing, but this is insecure for production.
Once the secrets match, test with:
python test_webhook_notification.pyExpected successful response:
{
"success": true,
"message": "Model registration webhook received",
"token_id": "LSCOR",
"status": "REGISTERED"
}- User calls
register_tokenized_model() - Model registers in MLflow
- Webhook sent to website with signature
- Website validates signature ✅
- Website updates token status from DRAFT to REGISTERED
- Token shows as REGISTERED on https://hokus.ai/explore-models/
{
"event_type": "model_registered",
"timestamp": "2025-08-21T14:53:19.671490",
"token_id": "LSCOR",
"model_name": "Sales lead scoring model",
"model_version": "4",
"mlflow_run_id": "abc123",
"metric_name": "accuracy",
"baseline_value": 0.933,
"status": "REGISTERED",
"tags": {
"author": "GTM Backend Team",
"version": "1.0.0",
"dataset": "Kaggle B2B Sales"
}
}Website team: Please verify and update your WEBHOOK_SECRET environment variable to match ours, or share the correct secret with us.