Created
August 19, 2020 01:16
-
-
Save iammoen/1ca497d58c9cb5b05085322979e95a5c to your computer and use it in GitHub Desktop.
tls-toolkit code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ if .Values.properties.clusterSecure }} | |
${NIFI_TOOLKIT_HOME}/bin/tls-toolkit.sh standalone -n "${FQDN}" \ | |
--clientCertDn "CN=${FQDN}, OU=NIFI" \ | |
--certificateAuthorityHostname ${FQDN} \ | |
--subjectAlternativeNames 'localhost{{- if .Values.properties.webProxyHost -}},{{ .Values.properties.webProxyHost }}{{- end -}}' \ | |
--outputDirectory "${NIFI_HOME}/conf/" \ | |
--isOverwrite | |
KEYSTORE_PASSWORD=`grep keystorePasswd ${NIFI_HOME}/conf/${FQDN}/nifi.properties | awk 'BEGIN { FS = "=" } ; { print $2 }'` | |
KEY_PASSWORD=`grep keyPasswd ${NIFI_HOME}/conf/${FQDN}/nifi.properties | awk 'BEGIN { FS = "=" } ; { print $2 }'` | |
TRUSTSTORE_PASSWORD=`grep truststorePasswd ${NIFI_HOME}/conf/${FQDN}/nifi.properties | awk 'BEGIN { FS = "=" } ; { print $2 }'` | |
mv ${NIFI_HOME}/conf/${FQDN}/*.jks ${NIFI_HOME}/conf/ | |
rm ${NIFI_HOME}/conf/${FQDN}/nifi.properties | |
prop_replace nifi.security.keystorePasswd ${KEYSTORE_PASSWORD} | |
prop_replace nifi.security.keyPasswd ${KEY_PASSWORD} | |
prop_replace nifi.security.truststorePasswd ${TRUSTSTORE_PASSWORD} | |
{{- end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment