AlanB
10/09/2023, 10:27 AMpactfoundation/pact-broker docker image.
I've supplied credentials to:
PACT_BROKER_BASIC_AUTH_USERNAME
PACT_BROKER_BASIC_AUTH_PASSWORD
and I have also set PACT_BROKER_ALLOW_PUBLIC_READ=true
The credentials appear to work fine when making calls like: create-or-update-pacticipant.
But I also wanted to test what happens if we try to delete a pacticpant (or even a pact) using the pact broker API (Hal) browser. And the creds don't work.
I used the same credentials specified in the ENV vars above. Are those the creds I should be using? Or something else?
(I also tried my pact broker admin user and standard user, with no success).
There doesn't seem to be any mention of what creds to use in the documentation, when using the UI and when BASIC_AUTH variables have been supplied.
Appreciate any help and advice.
Thanks, AlanMatt (pactflow.io / pact-js / pact-go)
(I also tried my pact broker admin user and standard user, with no success).what are these, exactly?
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
AlanB
10/10/2023, 9:00 AMAlanB
10/10/2023, 9:01 AM-e PACT_BROKER_BASIC_AUTH_USERNAME=pactwriter -e PACT_BROKER_BASIC_AUTH_PASSWORD=mywritepassword
The creds do not work through the web UI.AlanB
10/10/2023, 9:08 AMsudo docker run --name pactbroker --restart unless-stopped --link pactbroker-db:postgres -e PACT_BROKER_DATABASE_USERNAME=pactbrokeruser -e PACT_BROKER_DATABASE_PASSWORD=TheUserPassword -e PACT_BROKER_DATABASE_HOST=postgres -e PACT_BROKER_DATABASE_NAME=pactbroker -e PACT_BROKER_BASIC_AUTH_USERNAME=pactwriter -e PACT_BROKER_BASIC_AUTH_PASSWORD=mywritepassword -e PACT_BROKER_ALLOW_PUBLIC_READ=true -d -p 9292:9292 pactfoundation/pact-brokerAlanB
10/10/2023, 9:13 AMpactwriter credentials.
Result, returned to the logon dialog.
Please let me know if I'm doing this incorrectly.Matt (pactflow.io / pact-js / pact-go)
pactwriter and mywritepasswordAlanB
10/10/2023, 12:34 PMMatt (pactflow.io / pact-js / pact-go)
DELETE etc.)
3. If the API call works, then a series of steps in the UIAlanB
10/10/2023, 12:45 PMAlanB
10/18/2023, 2:23 PMsudo docker run --name pactbroker --restart unless-stopped --link pactbroker-db:postgres -e PACT_BROKER_DATABASE_USERNAME=pactbrokeruser -e PACT_BROKER_DATABASE_PASSWORD=TheUserPassword -e PACT_BROKER_DATABASE_HOST=postgres -e PACT_BROKER_DATABASE_NAME=pactbroker -e PACT_BROKER_BASIC_AUTH_USERNAME=pactwriter -e PACT_BROKER_BASIC_AUTH_PASSWORD=mywritepassword -e PACT_BROKER_ALLOW_PUBLIC_READ=true -d -p 9292:9292 pactfoundation/pact-broker
As you can see a very simple setup.
I've not performed any direct API calls.
I've tested by calling docker run --rm pactfoundation/pact-cli pact-broker... type commands. Which are successful when supplying the credentials.
So for example I used the type of command above to create a dummy pacticipant.
Then using the UI, I went to the pacticipant that I had just created, and performed a Non-Get request (see pic).
You then get prompted for credentials, and authentication seems fail (no error shown). You just get returned to the credentials prompt.AlanB
10/31/2023, 3:44 PMMatt (pactflow.io / pact-js / pact-go)
AlanB
11/01/2023, 12:41 PMMatt (pactflow.io / pact-js / pact-go)
AlanB
11/15/2023, 10:43 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)