-
Notifications
You must be signed in to change notification settings - Fork 51
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
New feature to use commercial certs that are created and signed externally. #447
Comments
Hello, you can inject your cerficate in NiFi TrustStore using the initContainers:
{{- if and .Values.nifiCluster.rootca.configmap.name .Values.nifiCluster.rootca.configmap.key }}
- command:
- sh
- -c
- |
echo "$ROOT_CA_CERT" > /opt/nifi/nifi-current/conf/rootca.crt && \
cp -f ${JAVA_HOME}/lib/security/cacerts /opt/nifi/nifi-current/conf/cacerts_updated.jks && \
keytool -import -alias rootca -file /opt/nifi/nifi-current/conf/rootca.crt -storetype jks -keystore /opt/nifi/nifi-current/conf/cacerts_updated.jks -noprompt -storepass changeit
image: {{ .Values.nifiCluster.image }}
name: import-ca
volumeMounts:
- mountPath: /opt/nifi/nifi-current/conf
name: conf
env:
- name: ROOT_CA_CERT
valueFrom:
configMapKeyRef:
name: {{ .Values.nifiCluster.rootca.configmap.name }}
key: {{ .Values.nifiCluster.rootca.configmap.key }}
...
bootstrapProperties:
overrideConfigs: |
{{- if and .Values.nifiCluster.rootca.configmap.name .Values.nifiCluster.rootca.configmap.key }}
java.arg.truststore=-Djavax.net.ssl.trustStore=/opt/nifi/nifi-current/conf/cacerts_updated.jks
{{- end }} Or you can just mount your certificates as volume to the main container and use a
|
Thanks for this posting this solution here. It did not work for me and I might be missing some experience and/or background. Here are the challenges I encountered:
I share here what was my solution in case it can help others. I added a job and a PVC to ingest the certificate authority. Then mounted that on top of the actual cacerts file. (I am aware that this might not be the best practice). The job definition:
The PVC definition (example):
On the values.yaml files you will need to mount the volume like this:
And of course you should have a configMap with your ca data (example):
|
You can create the ...
nodeConfigGroups:
default_group:
...
storageConfigs:
- mountPath: /opt/nifi/nifi-current/conf
name: conf
reclaimPolicy: Delete
metadata:
labels:
my-label: my-value
annotations:
my-annotation: my-value
pvcSpec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: ssd-wait |
Is your feature request related to a problem?
The object listenersConfig.sslSecrets.tlsSecretName is used to create and sign certs as needed. But there is no provision to bypass automated cert creation and configure pre-created certs.
Describe the solution you'd like to see
We would like the operator to use and configure pre-created, signed certs. For example, if you have a wildcard cert from Verisign and you want Nifi to use it. We aren't interested in using self-signed certs or Cert Manager Issuers to create new certs. We would like to plug in an existing cert.
Describe alternatives you've considered
We could create a secret that contains the pre-created cert, mount it in Nifi, and override Nifi properties to point to the mounted pre-created cert. This solution should be documented if adopted. If would be nice if the operator did this for us.
Additional context
No response
The text was updated successfully, but these errors were encountered: