Skip to content

Conversation

@caroline-ttd
Copy link
Contributor

Correct the time drift once a day

Test:

  1. Manually set the time drift for 30 seconds
Screenshot 2026-01-15 at 4 17 30 PM 2. Correct the drift Screenshot 2026-01-15 at 4 21 52 PM

fi
}

start_time_sync_loop() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this is a bit complex.

Why not something much simpler like

sync_enclave_time() {
  curl -s -f -x socks5h://127.0.0.1:3305 "${TIME_SYNC_URL}" | xargs -I{} date -u -s "{}"
}

Trust the parent instance clock without the condition ?


start_time_sync_loop() {
while true; do
sleep "${TIME_SYNC_INTERVAL_SECONDS}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest using cron. Python sleep is process based, if process crashes (this process running, isn't a requirement for our enclave), it stops.

Using cron on systemd timer would be better IMO

name: nmap-ncat
state: latest

- name: Install chrony for time sync
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if we need this. This AMI is the parent instance which already has time sync configured with AWS time server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants