lyft / confidant

Confidant: your secret keeper. https://lyft.github.io/confidant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webhook Event Connection Timeout

jrosco opened this issue · comments

commented

Environment:

Confidant version: 6.3.0
python-confidant-client py version: 2.1.0 (used with our webhook listener app secret-updater )

Issue:

When sending an event to a webhook endpoint (in this case secret-updater) we see this connection timeout in the Confidant logs

[confidant] WARNING:confidant.services.webhook:Failed to post webhook event. HTTPConnectionPool(host='secret-updater', port=80): Read timed out. (read timeout=3)

Looking at the file https://github.com/lyft/confidant/blob/6.3.0/confidant/services/webhook.py#L30 I can see it's using a timeout of 3 seconds in the POST response which corresponds the timeout shown in logs

 response = requests.post(
            webhook_url,
            auth=(username, password),
            headers=headers,
            data=json.dumps(event),
            timeout=3
        )

Could this be the issue regrading the timeouts when posting events to webhooks? and if so would it be possible to update and set this timeout value via configuration / variables.