- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
12-02-2022 01:36 PM
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?
12-04-2022 07:00 AM
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
12-04-2022 07:00 AM
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
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!