Upgrade 20.04, twistcli Status: 401 Unauthorized

Reply
Highlighted
L1 Bithead

Upgrade 20.04, twistcli Status: 401 Unauthorized

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?

 

Tags (3)

Accepted Solutions
L1 Bithead

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"}'

View solution in original post


All Replies
L1 Bithead

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"}'

View solution in original post

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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 Live Community as a whole!

The Live Community thanks you for your participation!