Prisma Cloud Compute Container Defender- App Embedded Manually Installed Defenders not seeing

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

Prisma Cloud Compute Container Defender- App Embedded Manually Installed Defenders not seeing

L0 Member
  • If you recreate  Dokcerfile from the twistlock console you must not change DEFENDER_TYPE env different from "appEmbedded". If you do that your twistlock-console gets defender type error. You can not see any defender host at Manage > Defenders > Defenders: Deployed 
Sample Dockerfile
# Use the official Python image from the Docker Hub
FROM python:3.9-slim

# Set the working directory in the container
WORKDIR /app

# Copy the server.py file into the container at /app
COPY . /app/

# Expose port 8888
EXPOSE 8888

# Run the server.py script
# Original ENTRTPOINT
#ENTRYPOINT ["python", "main.py"]
 
ADD twistlock_defender_app_embedded.tar.gz /defender_data
ENV DEFENDER_TYPE="appEmbedded"
ENV DEFENDER_APP_ID="MyWebApp"
ENV FILESYSTEM_MONITORING="true"
# log arg is not working in app-embedded defender
#ENV LOG_PROD="true"
#twistlock-console Cluster IP
ENV WS_ADDRESS="wss://<twistlock-console-dns-or-IP>:8084"
ENV DATA_FOLDER="/defender_data"
ENV INSTALL_BUNDLE="eyJzZ****"
ENV FIPS_ENABLED="false"

# Run the server.py new script
ENTRYPOINT ["/defender_data/defender", "app-embedded", "python", "main.py"]
 
  • To resolve this issue you can use Prisma Cloud Compute API. 
 
curl -k -H 'Content-Type: application/json' -H "Authorization: Bearer eyJ****" -X GET https://<twistlock-console-dns-or-IP>:8083/api/v1/defenders
 
Response:
{"hostname":"MyWebApp:c18f6a1b-ddcd-5d33-fce5-036f87b73e83","version":"32.05.124","lastModified":"2024-09-19T12:26:08.499Z","type":"yourWrongDefenderTypeValue","category":"","connected":true
 
  • Delete Defender from Prisma cloud Compute Console
curl -k -H 'Content-Type: application/json' -H "Authorization: Bearer eyJhb****" -X DELETE https://<twistlock-console-dns-or-IP>:8083/api/v1/defenders/MyWebApp:c18f6a1b-ddcd-5d33-fce5-036f87b73e83
 
  •  And last stop and remove the container, image that has wrong ENV value and rebuild your app embedded container again.
Regards
Fahri
 
 
0 REPLIES 0
  • 340 Views
  • 0 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!