David Van Couvering (DVC) - eBay
03/08/2022, 10:42 PM[pact-broker-86f7555f4b-xsvp5] 22:31:58 I [security] -- Could not detect any credentials in cookies or headers
This appears to happen when we submit a pact publish or a can-i-deploy from the Pact Maven plugin.
Is there a way for us to debug whether or not Pact Maven is picking up the token from the environment? We set it in the environment, but perhaps we didn't set it correctly.
What's weird is the pact publish succeeds, but can-i-deploy fails:
[ERROR] Failed to execute goal au.com.dius.pact.provider:maven:4.2.13:can-i-deploy (default-cli) on project storefrontxs-svc: Can you deploy? Computer says no �\_(?)_/� Request to path '/matrix?q[][pacticipant]=storefrontxs-svc&latestby=cvp&q[][version]=11c8924&latest=true&tag=master&ignore[][pacticipant]=fdbkexp' failed with response 'HTTP/1.1 401 Unauthorized' -> [Help 1]
When we run can-i-deploy locally it works fine.
When I pass that path into the HAL browser it works fine.
It's just a problem on Jenkins, but we can't figure out what the problem isDavid Van Couvering (DVC) - eBay
03/08/2022, 10:44 PMcan-i-deploy
command being received in the broker logs - just the pact publish and the pact verification and the webhooks firingDavid Van Couvering (DVC) - eBay
03/08/2022, 10:48 PM22:47:31 WARNING: Invalid cookie header: "set-cookie: rack.session=eyJzZXNzaW9uX2lkIjoiOGY2OTcxMDkxZGFlZjc2ZjIyZWZmNDQ2MzFiMWVhNzAxZTFlNjRjYzZkNDE3ZjU2M2QxYjdiMDYxZDk5YTVmYSIsImNzcmYiOiJXZDdNcGRVVHlFcTQ2UDdNUFhYa2ZyVjMwUDVVL0wxTW9FZGQ5SmsxVW1vPSJ9--6ffdcd699ed83f60a0983d47002d0cc3971b8230; domain=<http://pactflow.qa.ebay.com|pactflow.qa.ebay.com>; path=/; expires=Tue, 15 Mar 2022 22:49:00 GMT; HttpOnly". Invalid 'expires' attribute: Tue, 15 Mar 2022 22:49:00 GMT
22:47:31 Mar 08, 2022 10:47:31 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
22:47:31 WARNING: Invalid cookie header: "set-cookie: rack.session=eyJzZXNzaW9uX2lkIjoiOGY2OTcxMDkxZGFlZjc2ZjIyZWZmNDQ2MzFiMWVhNzAxZTFlNjRjYzZkNDE3ZjU2M2QxYjdiMDYxZDk5YTVmYSIsImNzcmYiOiJXZDdNcGRVVHlFcTQ2UDdNUFhYa2ZyVjMwUDVVL0wxTW9FZGQ5SmsxVW1vPSJ9--6ffdcd699ed83f60a0983d47002d0cc3971b8230; domain=<http://pactflow.qa.ebay.com|pactflow.qa.ebay.com>; path=/; expires=Tue, 15 Mar 2022 22:49:00 GMT; HttpOnly". Invalid 'expires' attribute: Tue, 15 Mar 2022 22:49:00 GMT
uglyog
uglyog
-X
command parameterDavid Van Couvering (DVC) - eBay
03/08/2022, 10:53 PMuglyog
David Van Couvering (DVC) - eBay
03/08/2022, 10:54 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 10:57 PM/opt/maven/maven-3.3.9/bin/mvn -f storefrontxs-svc/pom.xml -Dpactbroker.toTag=master -Dpactbroker.pacticipant=storefrontxs-svc -Dpactbroker.pacticipantVersion=11c8924 -Dpactbroker.url=${pactbroker.url} -Dpact.consumer.tags=mmukhsikaroyan/master/STRFRNT-2443 -Dignore=fdbkexp -U pact:can-i-deploy -B
But the token is set as an environment variable, so it won't show up in the call to the mo joDavid Van Couvering (DVC) - eBay
03/08/2022, 10:59 PM22:55:54 [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
22:55:54 <configuration>
22:55:54 <ignore>${ignore}</ignore>
22:55:54 <latest default-value="">${latest}</latest>
22:55:54 <pactBrokerAuthenticationScheme default-value="basic">bearer</pactBrokerAuthenticationScheme>
22:55:54 <pactBrokerInsecureTLS default-value="false">${pactBrokerInsecureTLS}</pactBrokerInsecureTLS>
22:55:54 <pactBrokerPassword>${pact.broker.password}</pactBrokerPassword>
22:55:54 <pactBrokerServerId>${pact.broker.serverId}</pactBrokerServerId>
22:55:54 <pactBrokerToken>${pactbroker.auth.token}</pactBrokerToken>
22:55:54 <pactBrokerUrl><https://pactflow.qa.ebay.com></pactBrokerUrl>
22:55:54 <pactBrokerUsername>${pact.broker.username}</pactBrokerUsername>
22:55:54 <pacticipant>storefrontxs-svc</pacticipant>
22:55:54 <pacticipantVersion>11c8924</pacticipantVersion>
22:55:54 <retriesWhenUnknown default-value="0">15</retriesWhenUnknown>
22:55:54 <retryInterval default-value="10">30</retryInterval>
22:55:54 <settings default-value="${settings}"/>
22:55:54 <to default-value="">master</to>
22:55:54 </configuration>
uglyog
pactbroker.auth.token
is the JVM system property that needs to be set with the token from the environmentDavid Van Couvering (DVC) - eBay
03/08/2022, 11:04 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:05 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:06 PMuglyog
David Van Couvering (DVC) - eBay
03/08/2022, 11:26 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:26 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:26 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:39 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:39 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:40 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:40 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:42 PMDavid Van Couvering (DVC) - eBay
03/08/2022, 11:43 PM<!-- pact broker -->
<pactbroker.url><https://pactflow.qa.ebay.com></pactbroker.url>
<pactbroker.auth.token>BBoKzIDUWtQp4w05DQgkdQ</pactbroker.auth.token>
<pact.git.version>${git.commit.id.abbrev}</pact.git.version>
<pact.tag>${git.branch}</pact.tag>
David Van Couvering (DVC) - eBay
03/08/2022, 11:43 PM<configuration>
<systemPropertyVariables>
<pact.verifier.publishResults>false</pact.verifier.publishResults>
<pactbroker.url>${pactbroker.url}</pactbroker.url>
<pactBrokerAuthenticationScheme>bearer</pactBrokerAuthenticationScheme>
<pactBrokerToken>${pactbroker.auth.token}</pactBrokerToken>
David Van Couvering (DVC) - eBay
03/08/2022, 11:44 PM-Dpactbroker.auth.token=<token>
on the command lineuglyog
David Van Couvering (DVC) - eBay
03/09/2022, 12:03 AMuglyog
andrewhiles
03/14/2022, 6:41 PMDavid Van Couvering (DVC) - eBay
03/14/2022, 9:50 PMDavid Van Couvering (DVC) - eBay
03/14/2022, 9:58 PM