-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: don't mount SA token when automountServiceAccountToken: false
. Fixes #12848
#13820
Conversation
59d99a6
to
05609d7
Compare
automountServiceAccountToken: false
. Fixes #12848
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.
Regarding the tests here and from #10945, a resource
template should correctly fail if automountServiceAccountToken: false
since, well, there is no SA token for it to use
05609d7
to
6c8400a
Compare
automountServiceAccountToken: false
. Fixes #12848
I've fixed the tests from #10945 to demonstrate that it is possible to explicitly mount a token to container and script template workflows even if I believe argo-workflows/workflow/controller/operator.go Line 3453 in 25bbb71
|
6c8400a
to
6de843d
Compare
Ah nice, I wasn't sure if
I saw that, but I don't think that test is very functional / necessary. Basically you're manually mounting the token instead of
Regarding the PR title, my change was intentional. The PR title should summarize what the PR does, not what the issue is. The PR title and issue title should not be equivalent, as they are now. |
…with automountServiceAccountToken: false. Fixes argoproj#12848 Signed-off-by: Minyi Zhong <[email protected]>
6de843d
to
fbebb72
Compare
Yep agreed. Done.
Ooops sorry about that. I unintentionally reverted your change when I was fixing up a typo. I've changed it back now. |
automountServiceAccountToken: false
. Fixes #12848
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.
LGTM, thanks for taking a look and fixing this!
…ixes #12848 (#13820) Signed-off-by: Minyi Zhong <[email protected]> Co-authored-by: Minyi Zhong <[email protected]>
…ixes #12848 (#13820) Signed-off-by: Minyi Zhong <[email protected]> Co-authored-by: Minyi Zhong <[email protected]>
Fixes #12848
Motivation
#10945 introduced a regression as it is mounting a serviceaccount token on the main container when
automountServiceAccountToken: false
.The security docs say
#10937 was not a bug. It is possible to explicitly mount a token to container and script template workflows even if
automountServiceAccountToken: false
so the code change was not needed.Modifications
automountServiceAccountToken: false
. Fixes #10937 #10945resource
template withautomountServiceAccountToken: false
andexecutor.serviceAccountName
setVerification
Tests passed