mirror of
https://github.com/apache/nifi.git
synced 2025-03-01 06:59:08 +00:00
NIFI-4788 This closes #2427. Exposing nifi.web.proxy.host configuration for Docker containers.
Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
parent
364985fb41
commit
7c0ee014d3
@ -134,3 +134,6 @@ can be published to the host.
|
||||
| HTTPS Port | nifi.web.https.port | 8443 |
|
||||
| Remote Input Socket Port | nifi.remote.input.socket.port | 10000 |
|
||||
|
||||
=======
|
||||
**NOTE**: If mapping the HTTPS port specifying trusted hosts should be provided for the property _nifi.web.proxy.host_. This property can be specified to running instances
|
||||
via specifying an environment variable at container instantiation of _NIFI\_WEB\_PROXY\_HOST_.
|
||||
|
@ -52,6 +52,13 @@ prop_replace 'nifi.web.https.port' "${NIFI_WEB_HTTPS_PORT:-8443}"
|
||||
prop_replace 'nifi.web.https.host' "${NIFI_WEB_HTTPS_HOST:-$HOSTNAME}"
|
||||
prop_replace 'nifi.remote.input.secure' 'true'
|
||||
|
||||
# Check if the user has specified a nifi.web.proxy.host setting and handle appropriately
|
||||
if [ -z "${NIFI_WEB_PROXY_HOST}" ]; then
|
||||
echo 'NIFI_WEB_PROXY_HOST was not set but NiFi is configured to run in a secure mode. The NiFi UI may be inaccessible if using port mapping.'
|
||||
else
|
||||
prop_replace 'nifi.web.proxy.host' "${NIFI_WEB_PROXY_HOST}"
|
||||
fi
|
||||
|
||||
# Establish initial user and an associated admin identity
|
||||
sed -i -e 's|<property name="Initial User Identity 1"></property>|<property name="Initial User Identity 1">'"${INITIAL_ADMIN_IDENTITY}"'</property>|' ${NIFI_HOME}/conf/authorizers.xml
|
||||
sed -i -e 's|<property name="Initial Admin Identity"></property>|<property name="Initial Admin Identity">'"${INITIAL_ADMIN_IDENTITY}"'</property>|' ${NIFI_HOME}/conf/authorizers.xml
|
||||
|
@ -41,6 +41,11 @@ case ${AUTH} in
|
||||
. "${scripts_dir}/secure.sh"
|
||||
. "${scripts_dir}/update_login_providers.sh"
|
||||
;;
|
||||
*)
|
||||
if [ ! -z "${NIFI_WEB_PROXY_HOST}" ]; then
|
||||
echo 'NIFI_WEB_PROXY_HOST was set but NiFi is not configured to run in a secure mode. Will not update nifi.web.proxy.host.'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Continuously provide logs so that 'docker logs' can produce them
|
||||
|
Loading…
x
Reference in New Issue
Block a user