Kill switch for gramine container #1941
Replies: 2 comments 6 replies
-
The example that you showed sends a termination signal to the program (to itself actually) after 1 minute. So what you really want is not a generic "if condition is successful", but just execution with a timeout? You may want to do smth like this: https://stackoverflow.com/questions/687948/how-to-run-a-command-with-a-timeout-so-that-it-is-killed-if-it-exceeds-the-timeo Where the "program to execute" is your |
Beta Was this translation helpful? Give feedback.
-
Yes, by the way, Gramine only reacts to the SIGTERM signal. This is done for security reasons (no other signals can be propagates from the outside world into Gramine). |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm working on a project that uses Gramine to wrap around applications and provide confidential computing.
Applications vary in terms of
I have a requirement where the graminized container should only run if a condition is successful eg. the time of execution is bellow x seconds. As I see it there are two ways to implement this requirement I can
adapt the code to wrap execution inside a "keep-alive" mechanism: ie. all apps are spawned from this mechanism and terminated if the condition fails. This is very maintenance intensive and does not work if children processes detach from the the execution (as is the case for exec or command & type calls).
propagate the equivalent to "Host injected malicious signal" from a thread inside the container, ie. when initializing the container I can start a program that waits 1 minute and terminates the container.
My question is if I can leverage any kill signal for this use case?
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions