-
Notifications
You must be signed in to change notification settings - Fork 72
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
Test: Verify if configmaps are encrypted #1996
base: main
Are you sure you want to change the base?
Conversation
2b64438
to
2057fc3
Compare
2057fc3
to
bec200b
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.
lgtm
@HashNuke can you give me a feedback for this one please? :) |
@@ -83,4 +83,16 @@ describe "Platform" do | |||
$?.success?.should be_true | |||
(/PASSED: No Helm Tiller containers are running/ =~ response_s).should_not be_nil | |||
end | |||
|
|||
it "'verify_configmaps_encryption' should pass if encryption is enabled in etcd", tags: ["platform:security"] do |
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.
the idea of spec test in this repo is to run complete test cases by command-line, so I'd suggest to follow it also with this newly added test.
Description
By default in kubernetes system, encrypting of data inside object like configmaps is not enabled, so data in etcd are available for potential attacker.
Encrypting of configmaps is possible in newer versions of kubernetes. When this configuration is done, all newly created configmaps has encrypted data in etcd key-value store.
This testcase creates new sonfigmap with random suffix (to avoid confilct). Then we will use similar command in etcd pod to verify if encryption is working:
ETCDCTL_API=3 etcdctl \ --cacert=/etc/kubernetes/pki/etcd/ca.crt \ --cert=/etc/kubernetes/pki/etcd/server.crt \ --key=/etc/kubernetes/pki/etcd/server.key \ get /registry/configmaps/default/my-configmap | hexdump -C
Issues:
Refs: #1994
How has this been tested:
Types of changes:
Checklist:
Documentation
Code Review
Issue