<#5655 [BUG] Wrong execution identity when "Recove...
# flyte-github
c
#5655 [BUG] Wrong execution identity when "Recovering" stopped executions Issue created by ddl-rliu ### Describe the bug When user A "recovers" via Flyteconsole UI an execution belonging to user B, it launches with user B's execution identity. This can have negative security implications. See "Additional context to reproduce". ### Expected behavior When user A recovers user B’s execution, it does not successfully launch with user B's execution identity. (as this can have negative security implications) Open question: What is the expected behavior? Should the recover fail? Or should it succeed, but it is launched with user A's execution identity? (or, is this intentional?) ### Additional context to reproduce #### Steps to reproduce Pre-requisite: • Be logged in as a user A, and view an aborted execution launched by a user B Expected behavior: • When user A recovers user B’s execution, it does not successfully launch with user B's execution identity. (as this can have negative security implications) Actual behavior: 1. As user A, trigger a recover of user B’s execution (This can be done in Flyteconsole UI) 2. Check and see that the execution succeeds and is launched with user B's execution identity. (See Execution Identity for details) #### Execution Identity You can use a tool like
grpcui
to query
ListExecutions
grpcurl -plaintext -H "<user A token>" -d '{ "id": { "project": "66ac1f956fd5b26a885904ce", "domain": "development" }, "limit": 5, "sortBy": { "key": "created_at" } }' localhost:9089 flyteidl.service.AdminService.ListExecutions Then select the execution from the response, and view the execution identity at
response.executions[0].spec.security_context.run_as.execution_identity
### Relaunch The above all applies to the
RelaunchExecution
grpc endpoint as well, however this endpoint does not appear to be exposed via the UI so it is a less immediate concern. #### Relaunch via gRPC You can use a tool like
grpcurl
to query
RelaunchExecution
grpcurl -plaintext -H "<user A token>" -d '{ "id": { "project": "66ac1f956fd5b26a885904ce", "domain": "development", "name": "easily-ruling-crappie-aeps" } }' localhost:9089 flyteidl.service.AdminService.RelaunchExecution (note that this endpoint is not exposed via e.g. the Flyte UI) ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte