Skip to content
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

CIS Compliance for kubeadm #683

Closed
jaxxstorm opened this issue Jan 30, 2018 · 19 comments
Closed

CIS Compliance for kubeadm #683

jaxxstorm opened this issue Jan 30, 2018 · 19 comments
Assignees
Labels
area/security area/test kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone

Comments

@jaxxstorm
Copy link

Is this a BUG REPORT or FEATURE REQUEST?

FEATURE REQUEST:

I'd like to start working on some of the default configuration that kubeadm generates for the manifest files. Currently, the defaults aren't especially secure.

The CIS benchmarks for kubernetes are publicly available, and a lot of the issues with a kubeadm generated cluster can be fixed by updating the default configurations here: https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/phases/controlplane/manifests.go

Some of these configuration options require a bit more work than others to enable, but some (like audit log configuration) are very simple to get started with.

Any thoughts welcomed.

@fabriziopandini
Copy link
Member

@jaxxstorm AFAIK audit will be fixed on 1.10 as well as etcd ca.

However this is a really interesting benchmark, and IMO it will be great if you can transform this issue into a checklist of actionable items.

PS. this could be also a relevant topic for kubeadm office hours meetings

@timothysc
Copy link
Member

/assign @liztio

@timothysc timothysc added this to the v1.11 milestone Apr 6, 2018
@timothysc timothysc added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 6, 2018
@timothysc timothysc added priority/backlog Higher priority than priority/awaiting-more-evidence. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Apr 26, 2018
@timothysc timothysc removed this from the v1.11 milestone Apr 26, 2018
@timothysc timothysc added this to the v1.12 milestone Jul 3, 2018
@timothysc timothysc added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 3, 2018
@timothysc timothysc removed this from the v1.12 milestone Aug 9, 2018
@timothysc timothysc added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Aug 9, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 7, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 7, 2018
@jaxxstorm
Copy link
Author

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 7, 2018
@neolit123
Copy link
Member

@jaxxstorm
kubeadm is passing the k8s conformance tests.
https://k8s-testgrid.appspot.com/sig-testing-kind#conformance,%20master%20(dev)

so my question here would be why isn't CIS compliance as part of conformance tests and what does the CNCF thinks about that?

cc @spiffxp

the CIS benchmarks for kubernetes are publicly available

i cannot seem to find a link for this.

if we end up with CIS related conformance tests failing for kubeadm, actions will be taken.
until then, please enumerate items in manifests.go that you think are problematic and we can discuss them.

@neolit123
Copy link
Member

^ cc @raesene

@luxas
Copy link
Member

luxas commented Dec 8, 2018

I'm gonna own/track this work for v1.14.
kube-bench hasn't updated their benchmarks since v1.11, I'll get in touch with the maintainers.
I've ran the v1.11 benchmarks on a local kubeadm cluster, and it looks pretty good.
We'll do some minor changes, and patch some false negatives in the CIS spec itself.

i cannot seem to find a link for this.

https://github.com/aquasecurity/kube-bench/tree/master/cfg

so my question here would be why isn't CIS compliance as part of conformance tests and what does the CNCF thinks about that?

The CIS benchmark would be additive to conformance. In other words, you can be conformant k8s without passing all the benchmarks, but once you do, you'll comply with this extra "profile". The profiles works on k8s conformance isn't fully proposed/finished yet.

I'll put together a list of actionable items, in fact, I have a rough draft of this locally in my computer.
cc @lizrice FYI

@luxas luxas self-assigned this Dec 8, 2018
@luxas luxas added this to the v1.14 milestone Dec 8, 2018
@luxas luxas added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Dec 8, 2018
@neolit123 neolit123 added this to the Next milestone Feb 3, 2019
@neolit123 neolit123 added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. labels Feb 3, 2019
@timothysc timothysc modified the milestones: Next, v1.16 May 3, 2019
@neolit123
Copy link
Member

/assign @yastij

@neolit123 neolit123 added area/test and removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 6, 2019
@neolit123
Copy link
Member

spoke with @yastij on zoom and we might get this enabled in testgrid/prow in the near future.

@fabriziopandini
Copy link
Member

@neolit123 @yastij I'm happy to help in setting up test machinery (hopefully re-using kinder)

@neolit123 neolit123 added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Jul 2, 2019
@neolit123
Copy link
Member

added P0 prio as per the 1.16 planning.

@neolit123 neolit123 modified the milestones: v1.16, v1.17 Aug 29, 2019
@neolit123 neolit123 added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Sep 9, 2019
@neolit123 neolit123 modified the milestones: v1.17, v1.18 Nov 9, 2019
@neolit123
Copy link
Member

in 2019 the topic of CIS compliance was brought in the kubeadm office hours discussing some technical aspects, proposing changes to the benchmark itself. we are not aware if any changes were made in kube-bench since then.

in 2019 during a steering committee meeting, there was a discussion whether CIS is officially approved as a k8s-wide method of security benchmark. the present members at the time did not confirm that.

closing in favor of:
#1649

where kubeadm can provide a guide of documenting how to create a CIS compliant cluster.
but if different versions of kubeadm require different guides, this might be a bit too difficult for the kubeadm developers to maintain, so contributions are welcome.

/close

@k8s-ci-robot
Copy link
Contributor

@neolit123: Closing this issue.

In response to this:

in 2019 the topic of CIS compliance was brought in the kubeadm office hours discussing some technical aspects, proposing changes to the benchmark itself. we are not aware if any changes were made in kube-bench since then.

in 2019 during a steering committee meeting, there was a discussion whether CIS is officially approved as a k8s-wide method of security benchmark. the present members at the time did not confirm that.

closing in favor of:
#1649

where kubeadm can provide a guide of documenting how to create a CIS compliant cluster.
but if different versions of kubeadm require different guides, this might be a bit too difficult for the kubeadm developers to maintain, so contributions are welcome.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/security area/test kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests