I'm trying to secure Nifi in a Kubernetes cluster, behind a Traefik proxy. Both are running as services in K8S. Traefik is secured with a public certificate. I want it to redirect calls to nifi, while securing the communication between Traefik (as an Ingress Controller) and the backend pods : Nifi.
Looks like the secure confiuration should lire in my Ingress YAML descriptor. Looks like I should issue a CA root to generate Nifi self signed certificate and load this CA Root in Traefik so it can validate the certificate sent by Nifi while handshaking with it.
But... I can't figure out 1) if this is the good approach, 2) how I can generate my stores (trust, ...) for NiFi using a CA Root, 3) how I should setup my YAML (insecureSkipVerify
seems not to be supported, ...)
By advance, thanks for you help.
Cheers,
Olivier
I had the same problem and could solve it with the
insecureSkipVerify
flag.The problem with traefik is, that NiFi gets the request from traefik and sends it's self signed certificate back to traefik for hand shaking. Traefik doesn't accept it, thus the handshake fails, leading to a
bad_certificate
exception in NiFi (has loglevelDEBUG
, so you have to change thelogback.xml
file).So one solution could be to add your self signed certificate to traefik, which is not possible at the moment, see this (currently) open issue.
Another solution, without 'insecuring' your existing traefik would be to add an
nginx
between traefik and NiFi. So traefik talkHTTP
with nginx, which talksHTTPS
with NiFi (this will be the next thing I'm trying).Or you can set the
insecureSkipVerify
flag within traefik like I did in thisdaemonset.yaml
:The
insecureSkipVerify
flag is changed withinspec.containers.args
.Hope that helps!