05-05-2020 11:57 AM - last edited on 02-07-2022 03:23 PM by jforsythe
Given upgrade Prisma Cloud SaaS from 19.11 to 20.04
And Administrator role
And old API key deactivated
And new API key created
And new twistlock binary downloaded to workstation
When I invoke twistcli images scan --token $token --details --address https://us-east1.cloud.twistlock.com/us-1-111574323 iarcgisserver:latest
Then it replies Status: 401 Unauthorized
GET https://us-east1.cloud.twistlock.com/us-1-111574323/api/v1/version failed.
Error:
However, Given the same criteria above
When I invoke curl --request GET --url https://us-east1.cloud.twistlock.com/us-1-111574323/api/v1/version --header 'accept: application/json; charset=UTF-8' --header "x-redlock-auth: $token"
Then it replies "20.04.163"
What am I doing wrong?
05-06-2020 11:47 AM - edited 05-08-2020 12:07 PM
Can I recognize this problem and its solution?
twistlock apis SUCCEED to authorize with prisma cloud token
curl --request POST \
--url https://api.prismacloud.io/login \
--header 'accept: application/json; charset=UTF-8' \
--header 'content-type: application/json; charset=UTF-8' \
--data '{"username":"ur_key","password":"ur_secret","customerName":"ur_mnemonic"}'
twistcli FAIL to authorize with prisma cloud token, you must use a twistlock token.
curl -sk https://us-east1.cloud.twistlock.com/us-1-111574323/api/v1/authenticate -H 'Content-Type: application/json' -d '{"username":"ur_key","password":"ur_secret"}'
05-06-2020 11:47 AM - edited 05-08-2020 12:07 PM
Can I recognize this problem and its solution?
twistlock apis SUCCEED to authorize with prisma cloud token
curl --request POST \
--url https://api.prismacloud.io/login \
--header 'accept: application/json; charset=UTF-8' \
--header 'content-type: application/json; charset=UTF-8' \
--data '{"username":"ur_key","password":"ur_secret","customerName":"ur_mnemonic"}'
twistcli FAIL to authorize with prisma cloud token, you must use a twistlock token.
curl -sk https://us-east1.cloud.twistlock.com/us-1-111574323/api/v1/authenticate -H 'Content-Type: application/json' -d '{"username":"ur_key","password":"ur_secret"}'
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!