1
0

nitro-enclaves-vsock-proxy.service

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/aws-nitro-enclaves-cli?expand=0&rev=5
This commit is contained in:
Olaf Hering 2021-11-23 15:16:53 +00:00 committed by Git OBS Bridge
parent 2949309811
commit 351a2ce1f8

View File

@ -37,3 +37,19 @@
die_on(chdir("/rootfs") != 0, "chdir /rootfs"); die_on(chdir("/rootfs") != 0, "chdir /rootfs");
die_on(chroot("/rootfs") != 0, "chroot /rootfs"); die_on(chroot("/rootfs") != 0, "chroot /rootfs");
--- a/vsock_proxy/service/nitro-enclaves-vsock-proxy.service
+++ b/vsock_proxy/service/nitro-enclaves-vsock-proxy.service
@@ -8,11 +8,12 @@ Type=simple
StandardOutput=journal
StandardError=journal
SyslogIdentifier=vsock-proxy
+Environment=VSOCK_PROXY_YAML=/etc/nitro_enclaves/vsock-proxy.yaml
ExecStart=/bin/bash -ce "TOKEN=$(curl --silent -X PUT \"http://169.254.169.254/latest/api/token\" -H \"X-aws-ec2-metadata-token-ttl-seconds: 21600\") ; \
REGION=$(curl --silent -H \"X-aws-ec2-metadata-token: $TOKEN\" http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region) ; \
[ -z \"$REGION\" ] && REGION=$(curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region) ; \
exec /usr/bin/vsock-proxy 8000 kms.$${REGION}.amazonaws.com 443 \
- --config /etc/nitro_enclaves/vsock-proxy.yaml"
+ --config $VSOCK_PROXY_YAML"
Restart=always
TimeoutSec=0