Hey,
Over the past 6 months sig-cli and security team are constantly involved in fixing security related
issues with kubectl cp. This process involves myself, Jordan Liggitt, Tim Allclair and a couple of
other people needed to manage it, and then release updates in all supported versions of kubectl.
At the same time, we are carefully reviewing several pull requests wanting to extend current cp
support to handle more edge cases (one of the recent is adding support for colon [1], or preserving
file mode [2]). I can link to several other similar PRs, but the point is that each and every single
one of them requires significant effort during review (due to the history with this many security fixes
we are extra careful) and yet almost majority expands the vector of possible security threats to
cp command.
From my experience (and others helping addressing those issues) over the past few months we've
learned that each one of those security bugs requires us to drop some kind of those edge case,
which then returns as a PR from a different side.
The risk of continuing to maintain the cp command is that we are unable to provide a command that
is both useful and secure. The costs associated with that work are significant amounts of time,
and energy consumed to maintain, review, and fix/handle security issues.
If there was no alternative to provide this functionality, those costs/risks might be worthwhile,
but there are alternative approaches that would provide the same function, see [3].
Directing users to an approach like that would be safer, provide more features, and require less
maintenance and security-release effort. It would also work with older releases of kubectl, so users
could switch to that approach today.
For those reasons, we would like to request an exception [4] from the deprecation process, and be
allowed to completely remove kubectl cp command from release 1.16 onward. The maturity of kubectl
allows users to use other commands, (see examples in [3] mentioned above) to address the gap
caused by this removal. Additionally, with the kubectl's plugins mechanism [5] we allow the community
to create their own versions of the same command and deliver that instead of the built-in.
I'm curious of your opinions,
Maciej Szulik
SIG-CLI lead
[1] https://github.com/kubernetes/kubernetes/pull/78622
[2] https://github.com/kubernetes/kubernetes/pull/73053
[3] https://gist.github.com/tallclair/9217e2694b5fdf27b55d6bd1fda01b53
[4] https://kubernetes.io/docs/reference/using-api/deprecation-policy/#exceptions
[5] https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/
You received this message because you are subscribed to the Google Groups "kubernetes-sig-cli" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-cli/MN2PR21MB12466750C44E5BE8E58CE436DBA10%40MN2PR21MB1246.namprd21.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-cli/MN2PR21MB12464FABEBFC1EC5710A87FEDBA10%40MN2PR21MB1246.namprd21.prod.outlook.com.
+SIG-usability
I think everyone would be wise to consider why Docker was so successful when much of the pieces that it was built from had been in market a long time. A big part of their success was their devotion to developing a truly useful command line tool that met the needs of a broad group of users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-cli/MN2PR21MB12464FABEBFC1EC5710A87FEDBA10%40MN2PR21MB1246.namprd21.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAKCBhs41r63PEBieT44d2t1RCcVF9%2BQcivFKrhgnScRoo%3DNRGw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CADtktAV3QZOo%3Dmq7x6sMqPZRjMLJifgNhS1%3D4xnohMZ0ioRtyA%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "kubernetes-sig-release" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-re...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-release/CAFQm5yR0%3DCD2eB8-c%2BYyMQphPP0Seqq%3DZ2F3YyYGywCtcf_Tdw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/MN2PR21MB1246BE639FAA83C8157FF006DBA00%40MN2PR21MB1246.namprd21.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAHROWxSkjvqmzakbHHGtQtM4nbh1Pvk7_5VGvNp3e31eB1nu9w%40mail.gmail.com.
No policy can cover every possible situation. This policy is a living document, and will evolve over time. In practice, there will be situations that do not fit neatly into this policy, or for which this policy becomes a serious impediment. Such situations should be discussed with SIGs and project leaders to find the best solutions for those specific cases, always bearing in mind that Kubernetes is committed to being a stable system that, as much as possible, never breaks users. Exceptions will always be announced in all relevant release notes.
There was a lot of points brought up in this thread that I'd like to answer.1. Apologies for the light grey - I must have messed up something when copying between gdoc and gmail :(2. We've spent significant amount of time arguing back and forth how much effort we can invest into fixing incomingCVEs vs how much time we can spent into moving kubectl forward. We need to maintain a healthy balance betweenthe two and "sacrificing" one full-time engineer just to fix cp command seems quite wasteful. Not to mention the factthat we don't have that many staffing to properly test and ensure working Windows support, for example.3. It's true we miss sufficient data about command usage, but that's where [1] should help us identifying gap in thelong term. In the short term, data provided by Gareth show that kubectl cp is at the 0.6% usage across all the commandsscraped from github, with exec being almost 7x more popular.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CALFFA0PPX%3DV_CJNCFcipseNBnz1TOvQ3XN872mh%3Dn%2BF6Ah5h4A%40mail.gmail.com.
6. From the above discussion I'm reading that majority is in favour of removing cp command, with the caveat thatit will happen in 1.17, with deprecation it in 1.16, using the exception process from the deprecation document [2]and KEP to outline all pros and cons. In the mean time cp should return to k/k repository and be expanded withadditional warning about its inherent flaws.
No policy can cover every possible situation. This policy is a living document, and will evolve over time. In practice, there will be situations that do not fit neatly into this policy, or for which this policy becomes a serious impediment. Such situations should be discussed with SIGs and project leaders to find the best solutions for those specific cases, always bearing in mind that Kubernetes is committed to being a stable system that, as much as possible, never breaks users. Exceptions will always be announced in all relevant release notes.
I have problems with how `kubectl cp` is implemented, but the problems
that it solves seem to be real. Do we really need the totality of
what `kubectl cp` does, or can we lock that down further to enable
other implementations?
For example: If the primary use case is "extract a core file or log
files", could we teach CRI to copy a file out of a running pod, so we
don't need `tar` in the container image?
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAO_Rewbw9eEn_%2B4HycUjUEzZyx%3D8ak-XrLGdQ0MpS%2B-XWhmOYA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-architecture/CAOZRXm9fEHAEg-%2B%2BcciFuaPC8sBZfxK4FrfSgRS%2BjOC9S5BfSw%40mail.gmail.com.
I've opened a KEP to discuss the future of kubectl cp: https://github.com/kubernetes/enhancements/pull/1248I recently joined a team where I have the pleasure of contributing more to k8s, and in particular kubectl. I'm looking forward to continuing this discussion.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-cli/MN2PR21MB12461077428BAE74FB25F2FDDBB90%40MN2PR21MB1246.namprd21.prod.outlook.com.
--
--
You received this message because you are subscribed to the Google Groups "kubernetes-sig-cli" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-sig-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-sig-cli/CADCwYQezVMfGuWEhiq%3DTnizSmsTDu1xeHVC5Dnf-_1LnitZrfw%40mail.gmail.com.