-
Notifications
You must be signed in to change notification settings - Fork 266
How to enforce SSL/TLS everywhere through this operator? #309
Comments
Thanks for your question! The operator has no first class support for SSL/TLS. If you have successfully configured it through |
Thanks @functicons, good to know! I'll be happy to share what myself and a colleague at IBM have at the moment, currently trying to submit a job to the Job Manager (by port-forwarding and doing a normal flink run) and seeing problems though, so while it may be secure* it's not so useful yet without good docs
|
@Sparkx120, a colleague at IBM, has suggested this would be an improvement to the CR instead of needing to specify all of the options as well, worth mentioning here I think:
|
Just in terms of simplicity. I find specifying something as enabled as tls: {} rather than tls:
enabled: true Is cleaner and easier to add. Then if someone wants access to additional configuration they open up the section. So tls:
existingTlsSecret: secret-name
renewal:
dnsNames:
etc.. The same can be done with Additionally, when referencing a secret, there is a Kubernetes standard. tlsSecret:
secretName: my-secret
or
tlsKey:
secretName: my-secret
key: tls.key
tlsCert:
secretName: my-secret
key: tls.crt |
You don't always want to work with kubernetes secrets for this, you can use a vault for the certificate/passphrase.
and the needed flink configuration. I think issue #383 is important, but I'm not sure the "tls" config is required here, maybe an example for a cluster with SSL can be enough. |
Great feedback and suggestions, so...
I actually tried this approach, but the environment I am working in is OpenShift with OLM, and the way I coded this init container approach caused problems (since I was modifying things at runtime for my own deployment spec, managed by OLM) I've updated one of my posts above just to mention what I eventually got working - making the secret upfront and mounting it in through a volume, with the needed Flink configuration.
Absolutely, having a maintained set of examples, using our existing CR definitions, would be really helpful. |
I agree, supporting multiple ways of configuring TLS is important. One such way can be configuring to use and work with https://cert-manager.io/ which is becoming a popular way of managing certificates in Kubernetes. But it is by no means the only or necessarily always the "best" way. For me what would be nice is first class support for enabling and configuring TLS in a user friendly way. such that for example I could specify |
This is important because any k8s user knowing the clusterIP will be able to submit the job from any other container within the same k8s cluster namespace, even though we could suppress using ingress authentication for the flink webUI. Do you have any suggestion for this? |
Hey everyone, I've been trying this operator successfully on OpenShift after making a few small changes and applying a workaround #288 in to use Flink 1.11.
Now I'd like to check that I can use SSL/TLS everywhere as per https://ci.apache.org/projects/flink/flink-docs-stable/ops/security-ssl.html. I had a look through https://github.com/GoogleCloudPlatform/flink-on-k8s-operator/blob/3352bf51c0d3167ba87a626cf5d6ef37753b8c57/docs/crd_v1alpha1.md and I noticed there's
useTLS
for the Ingress endpoint (I assume for external access, so perhaps securing the Flink UI?) but I don't see anything for internal communications.Is it possible to achieve this through the operator and if so, how? I don't see it is as a supported feature on the main readme but I am thinking it would be done through an override in here for the FlinkCluster CR
I'm wondering if anyone's done this before, I'll have a try anyway and see what happens, but couldn't find any documentation on this for the operator itself (lemme know if I've missed something please) and hence my curiosity in the event it's something not yet available.
Thanks!
Update, you can do it - make the keystore/truststore etc upfront first and then create a secret + mount it in. I don't care for any of these values being known (just testing on my laptop)
I made the files upfront and have them in a secret with the following format:
The text was updated successfully, but these errors were encountered: