Skip to content

Commit

Permalink
Avoid installing python3-toml by hardcoding agent ID
Browse files Browse the repository at this point in the history
Hardcode the agent id into the payload script to avoid the need for
installing python3-toml into the agent container.

Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
  • Loading branch information
ansasaki committed Aug 15, 2023
1 parent 97a3033 commit 959f93e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import sys
import json
import toml

json_file = sys.argv[1]
with open(json_file, 'r') as f:
Expand All @@ -12,10 +11,10 @@
if input_json.get("type", "") != "revocation":
sys.exit(0)

my_uuid = "d432fbb3-d2f1-4a97-9ef7-75bd81c00000"

event_uuid = input_json.get("agent_id", "event_uuid")
event_ip = input_json.get("ip", "event_ip")
with open("/etc/keylime/agent.conf", "r") as f:
my_uuid = toml.load(f)["agent"]["uuid"].strip('\"')

print("A node in the network has been compromised:", event_ip)
print("my UUID: %s, event UUID: %s" % (my_uuid, event_uuid))
Expand Down

0 comments on commit 959f93e

Please sign in to comment.