-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
refactor: use argocd-git-ask-pass to pass git credentials to git/kustomize #8516
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8516 +/- ##
==========================================
+ Coverage 42.32% 42.40% +0.07%
==========================================
Files 176 177 +1
Lines 22822 22936 +114
==========================================
+ Hits 9660 9726 +66
- Misses 11784 11824 +40
- Partials 1378 1386 +8
Continue to review full report at Codecov.
|
1cb6ee4
to
4b7c97a
Compare
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.
Oops, didn't mean to approve yet. :-)
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.
belt-and-braces - unset the env when forking kustomize process
…omize Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
52926c8
to
1a0a509
Compare
…ucture Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
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.
Added optional nitpicks, but LGTM!
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
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 @alexmt
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.
Took a close look and it looks solid. Great work!
…omize (argoproj#8516) refactor: use argocd-git-ask-pass to pass git credentials to git/kustomize (argoproj#8516) Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
Is this something that should be available to sidecar plugins too? I have a sidecar plugin for Tanka, that uses jsonnet-bundler to pull dependencies from private repos. I have the I understand that this feature is done to prevent potential credential hijacking, but I don't quite understand what about the new feature broke my workaround, and whether I can now leverage this functionality in my custom sidecar, or if I have to find an alternative. (I can open a new issue to track this if you prefer.) |
@patoarvizu can you open an issue? I'll have to go back and look at the PR to see what was missed. But in theory it shouldn't be too difficult to let the sidecar use the credentials service. |
@crenshaw-dev Will do! |
…omize (argoproj#8516) refactor: use argocd-git-ask-pass to pass git credentials to git/kustomize (argoproj#8516) Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com> Signed-off-by: wojtekidd <wojtek.cichon@protonmail.com>
Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com
In order to provide git credentials to Kustomize Argo CD sets
GIT_ASKPASS=git-ask-pass.sh
env variable so that git clone callgit-ask-pass.sh
for credentials. Thegit-ask-pass.sh
needs to get credentials somewhere so we also setGIT_USERNAME
andGIT_PASSWORD
env variables. The problem is thatGIT_USERNAME
andGIT_PASSWORD
also available to kustomize and user can leverage kustomize config map generator to just print env variables.Fix:
I think we agreed that it is not safe to have any secret in env variable or file, because one way or another almost all config tools provide a way to read file/env variable. But we can assume config management tool does not allow user to run any custom binary. So proposing following solution:
argocd-git-ask-pass
binary and new, localhost-only endpoint in repo-server