-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add identity to task execution metadata #5105
Add identity to task execution metadata #5105
Conversation
Signed-off-by: noahjax <[email protected]>
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5105 +/- ##
==========================================
+ Coverage 58.49% 59.11% +0.61%
==========================================
Files 627 645 +18
Lines 54155 55576 +1421
==========================================
+ Hits 31680 32854 +1174
- Misses 19942 20129 +187
- Partials 2533 2593 +60
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: noahjax <[email protected]>
@noahjax just curious, so you are going to use OAuth2TokenRequest in the agent not My PR is going to pass the actual secret value to the agent because we save the secret in AWS/GCP secret manager, and only the propeller has permission to read it. |
@pingsutw For my use case I actually only need the |
Signed-off-by: noahjax <[email protected]>
12f5703
to
d2f9e0f
Compare
cc @ddl-ebrown @noahjax we can merge it, right |
Yeah go for it |
Congrats on merging your first pull request! 🎉 |
Signed-off-by: noahjax <[email protected]>
return admin.TaskExecutionMetadata{ | ||
TaskExecutionId: &taskExecutionID, | ||
Namespace: taskExecutionMetadata.GetNamespace(), | ||
Labels: taskExecutionMetadata.GetLabels(), | ||
Annotations: taskExecutionMetadata.GetAnnotations(), | ||
K8SServiceAccount: taskExecutionMetadata.GetK8sServiceAccount(), | ||
EnvironmentVariables: taskExecutionMetadata.GetEnvironmentVariables(), | ||
Identity: taskExecutionMetadata.GetSecurityContext().RunAs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this implementation is actually incomplete based on our needs. When scheduling a job, this identity is actually the IdpId for the flytepropeller, not the user that scheduled the workflow
Ultimately we want to capture both values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @pingsutw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ddl-ebrown would you create another PR to address it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I can do that -- just need to know what we want to capture in the IDL and how we should name it
Why are the changes needed?
For our specific use case it is critical to be able to determine the identity for the subject who launches a task. It seems like other information on the security context could also be more generally useful, so I included that in addition to the critical
execution_identity
field as part of this PR.What changes were proposed in this pull request?
Add
identity
toTaskExecutionMetadata
. In conjunction with flyteorg/flytekit#2282, this change will make identity available to flyte agents.How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
#3936
Docs link