twistcli app-embedded embed command format for EKS containers on Fargate?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

twistcli app-embedded embed command format for EKS containers on Fargate?

L3 Networker

Most of my API and twistcli commands work but I cannot get an app-embedded defender to be returned…. I have tried these two commands returns the same error…

declare -x PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR="https://us-east1.cloud.twistlock.com/us-1-XXXXXXXX"

declare -x PRISMA_CLOUD_COMPUTE_SVC_ADDR="us-east1.cloud.twistlock.com"

declare -x PRISMA_CONSOLE="https://us-east1.cloud.twistlock.com/us-1-XXXXXXXX"

$ twistcli app-embedded embed --app-id app-id1230 --data-folder /tmp --output-file defender.zip --console-host ${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR}   --user ${PRISMA_ADMIN_USER}   --password ${PRISMA_SECRET} Dockerfile

Get "https://127.0.0.1:8083/api/v22.06/authenticate/identity-redirect-url?type=prismaCloud": dial tcp 127.0.0.1:8083: connect: connection refused

 

 

I checked the versions and they match…

$ curl -k   -H "Authorization: Bearer $token"   -H 'Content-Type: application/json'   -X GET   ${PRISMA_CONSOLE}/api/v1/version

"22.06.228"

 

$ twistcli --version

twistcli version 22.06.228

 

I can ping and authenticate with the compute console SUCCESSfully…

$ curl -k -s -o /dev/null -w "%{http_code}\n" -X GET https://us-east1.cloud.twistlock.com/us-1-XXXXXXXX/api/v1/_ping

200

 

$ curl -k \

> -H "Content-Type: application/json" \

> -X POST \

> -d \

> "{

>  \"username\":\"${PRISMA_KEY_ID}\",

>  \"password\":\"${PRISMA_SECRET}\"

> }" \

> ${PRISMA_CONSOLE}/api/v1/authenticate

{"token":"..secret"}

 

Can you reply with the command to generate app embedded defender zip file given a Dockerfile?

Tommy Hunt AWS-CSA, Java-CEA, PMP, SAFe Program Consultant
thunt@citrusoft.org
https://www.citrusoft.org
1 accepted solution

Accepted Solutions

L3 Networker

So...

"twistcli app-embedded embed" requires both --address and --console-host parameters.

 

declare -x PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR="https://us-east1.cloud.twistlock.com/us-1-XXXXXXXX"
declare -x PRISMA_CLOUD_COMPUTE_SVC_ADDR="us-east1.cloud.twistlock.com"

twistcli app-embedded embed \
--address ${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR} \
--app-id APP-2781-simple-eks-task \
--console-host ${PRISMA_CLOUD_COMPUTE_SVC_ADDR} \
--data-folder "/tmp" \
--output-file embedded_defender.zip \
--user $PRISMA_KEY_ID -p $PRISMA_SECRET Dockerfile

Tommy Hunt AWS-CSA, Java-CEA, PMP, SAFe Program Consultant
thunt@citrusoft.org
https://www.citrusoft.org

View solution in original post

1 REPLY 1

L3 Networker

So...

"twistcli app-embedded embed" requires both --address and --console-host parameters.

 

declare -x PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR="https://us-east1.cloud.twistlock.com/us-1-XXXXXXXX"
declare -x PRISMA_CLOUD_COMPUTE_SVC_ADDR="us-east1.cloud.twistlock.com"

twistcli app-embedded embed \
--address ${PRISMA_CLOUD_COMPUTE_CONSOLE_API_ADDR} \
--app-id APP-2781-simple-eks-task \
--console-host ${PRISMA_CLOUD_COMPUTE_SVC_ADDR} \
--data-folder "/tmp" \
--output-file embedded_defender.zip \
--user $PRISMA_KEY_ID -p $PRISMA_SECRET Dockerfile

Tommy Hunt AWS-CSA, Java-CEA, PMP, SAFe Program Consultant
thunt@citrusoft.org
https://www.citrusoft.org
  • 1 accepted solution
  • 2254 Views
  • 1 replies
  • 0 Likes
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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!