Siim Mardus
08/14/2024, 11:47 AMpact-broker create-webhook <http://www.google.com|www.google.com> -X POST --broker-base-url=https://<our-broker-url> --contract-content-changed --broker-username=<username> --broker-password=<password> --verbose
2- curl/postman
curl --location --request POST 'https://<our-broker-url>/webhooks/consumer/<consumer-name>' \
--header 'Authorization: Basic <encoded username:password>'
Both options eventually give me 401 unauthorized. I have double-checked the credentials and they are good. IDK what I am doing wrong here and the issues found online about 401 issues mostly suggest using tokens instead of basic auth, which we do not have as we're using the self-hosted broker. Another issue I found simply said "already fixed" π
Siim Mardus
08/14/2024, 11:52 AMYousaf Nabi (pactflow.io)
--data?Siim Mardus
08/14/2024, 11:54 AMSiim Mardus
08/14/2024, 11:58 AM--data="{'foo': 'bar'}" to the CLI command, but no luck, still 401Yousaf Nabi (pactflow.io)
pact-broker create-webhook <http://www.google.com|www.google.com> -X POST --broker-base-url=<http://localhost:9292> --contract-content-changed --verbose
returns
Error creating webhook. response status=400 body={"errors":{"request.url":["is not a valid URL eg. <http://example.org>"]}}Yousaf Nabi (pactflow.io)
pact-broker create-webhook <https://www.google.com> -X POST --broker-base-url=<http://localhost:9292> --contract-content-changed --verbose
returns
Webhook "POST <http://www.google.com|www.google.com>" createdSiim Mardus
08/14/2024, 12:00 PMpact-broker create-webhook <https://www.google.com> -X POST --broker-base-url=https://<broker_url> --contract-content-changed --broker-username=user --broker-password=pass --verbose
Error creating webhook. response status=401Yousaf Nabi (pactflow.io)
Siim Mardus
08/14/2024, 12:01 PMpact-broker version
1.75.3Siim Mardus
08/14/2024, 12:03 PMYousaf Nabi (pactflow.io)
pact-broker create-webhook <https://www.google.com> -X POST --broker-base-url=<http://localhost:9292> --contract-content-changed --verbose --broker-username test --broker-password testSiim Mardus
08/14/2024, 12:06 PMYousaf Nabi (pactflow.io)
docker-compose up in https://github.com/pact-foundation/pact-broker-docker
after adding these env vars in in the pact-broker service
PACT_BROKER_BASIC_AUTH_USERNAME: test
PACT_BROKER_BASIC_AUTH_PASSWORD: test
is there any other infra set up between your broker at all?
is the webhooks endpoint say blocked as at reverse proxy layer?Siim Mardus
08/14/2024, 12:08 PMYousaf Nabi (pactflow.io)
contract_requiring_verification_published event over the contract_content_changed
https://docs.pact.io/pact_broker/webhooks#the-contract-requiring-verification-published-eventSiim Mardus
08/14/2024, 12:11 PMYousaf Nabi (pactflow.io)
Siim Mardus
08/14/2024, 12:16 PMSiim Mardus
08/14/2024, 12:16 PMSiim Mardus
08/14/2024, 12:46 PMpact-broker versionSiim Mardus
08/14/2024, 1:01 PMkr#wREWre$wqRtT&wqe
I had somehow turned into
kr%23wREWre%24wqRtT%26wqe
And I had no idea what I was doing wrong and kept pasting the wrong password πYousaf Nabi (pactflow.io)