Storing TLS objects as Kubernetes secrets and Distributing them to Pravega pods as files #166
Labels
kind/feature
New feature
priority/P0
Data loss/corruption, catastrophic failure, security, functionality lost, permanent damage
Background:
Kubernetes supports an option to store and distribute sensitive data to containers, via the Secrets object. You first create a secret object (using
kubectcl
, yaml, etc.), and then pass the entries to the containers in the form of either environment variables or files in a volume. See an example in action, here.When deploying a Pravega cluster with TLS enabled for Controllers and Segment Store pods, admins need to be able to distribute externally created TLS material to the containers/pods. Such material includes:
Kubernetes Secret object fits the bill rather nicely, both for keeping the TLS material safe and for distributing it to the pods. Currently, Pravega operator does not support using Secrets (It supports ConfigMap though, which is quite similar to the Secret object).
Requirement:
The ask is to build support for creating Kubernetes Secret objects and distributing them to Pravega containers through volumes. The admin shall provide definitions for one or more secret objects in the Pravega cluster definition file. Pravega operator, which consumes the definition file, shall automatically create those secret objects and expose the entries in the objects as files on the volume with specified mount-paths. This example in Kubernetes documentation illustrates its working.
More Details:
Here's roughly how things should roughly work:
pravega.yaml
for example), the admin specifies the name and entries of the secret objects created in step 1. They also specify the mount-path of the secret object (such as/etc/secret-volume
). Alternatively, we can fix the name of the objects and entries, so this step will not be needed. That'll limit the flexibility in introducing new secrets but still meet the current requirements.The admin uses TLS file paths relative to the mount-path in the pravega cluster definition file to specify JVM system properties for the Pravega pod as shown below:
The JVM system properties passed to the container will now automatically resolve file paths in volumes created for the secret (for example:
... -Dcontroller.auth.tlsCertFile: "/etc/secret-volume/controller01.pem" -Dcontroller.auth.tlsKeyFile: "/etc/secret-volume/controller01.key.pem ..."
).In effect, the admin is able to inject externally created TLS files into Pravega pods in a safe and secure manner.
The text was updated successfully, but these errors were encountered: