-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security: updated cert generation for root-ca/NiFi.
- Loading branch information
Showing
9 changed files
with
232 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# NiFi certificate vars, | ||
NIFI_TOOLKIT_VERSION="1.22.0" | ||
NIFI_CERTIFICATE_TIME_VAILIDITY_IN_DAYS=730 | ||
NIFI_SUBJ_LINE_CERTIFICATE_CN="C=UK/ST=UK/L=UK/O=cogstack/OU=cogstack/CN=cogstack" | ||
NIFI_SUBJ_LINE_CERTIFICATE_CN="CN=cogstack,OU=NIFI,C=UK,ST=UK,L=UK,O=cogstack" | ||
NIFI_KEY_PASSWORD=cogstackNifi |
This file contains 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
This file contains 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
Empty file.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,191 @@ | ||
user nginx; | ||
pid /var/run/nginx.pid; | ||
|
||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
## | ||
# Basic Settings | ||
## | ||
|
||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 8192; | ||
|
||
# Hide nginx version information. | ||
server_tokens off; | ||
|
||
server_name_in_redirect off; | ||
|
||
# Specify MIME types for files. | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
#upstream elasticsearch { | ||
# server elasticsearch-1:9200; | ||
#} | ||
|
||
#upstream kibana { | ||
# server kibana:5601; | ||
#} | ||
|
||
upstream NIFI { | ||
server NIFI:8443; | ||
} | ||
|
||
#server { | ||
# listen 9200; | ||
# server_name elasticsearch.local; | ||
|
||
# location / { | ||
# proxy_pass http://elasticsearch; | ||
# | ||
# proxy_set_header X-ProxyScheme http; | ||
# proxy_set_header X-ProxyHost nginx.docker.localhost; | ||
# proxy_set_header X-ProxyPort 9200; | ||
# proxy_set_header X-ProxyContextPath /; | ||
# } | ||
#} | ||
|
||
#server { | ||
# listen ${KIBANA_SERVER_OUTPUT_PORT}; | ||
# server_name kibana.local; | ||
|
||
# ssl_certificate /etc/nginx/es_certificates/elastic-stack-ca.crt.pem; | ||
# ssl_certificate_key /etc/nginx/es_certificates/elastic-stack-ca.key.pem; | ||
|
||
# | ||
# proxy_ssl_certificate /etc/nginx/es_certificates/${ELASTICSEARCH_VERSION}/elasticsearch/${NGINX_ES_NODE_SOURCE_INSTANCE_NAME}/${NGINX_ES_NODE_SOURCE_INSTANCE_NAME}.crt; | ||
# proxy_ssl_certificate_key /etc/nginx/es_certificates/${ELASTICSEARCH_VERSION}/elasticsearch/${NGINX_ES_NODE_SOURCE_INSTANCE_NAME}/${NGINX_ES_NODE_SOURCE_INSTANCE_NAME}.pem; | ||
|
||
# proxy_ssl_trusted_certificate /etc/nginx/es_certificates/${ELASTICSEARCH_VERSION}/elasticsearch/${NGINX_ES_NODE_SOURCE_INSTANCE_NAME}/${NGINX_ES_NODE_SOURCE_INSTANCE_NAME}.crt; | ||
# proxy_ssl_server_name on; | ||
|
||
# location / { | ||
# proxy_pass http://${NGINX_KIBANA_HOST}; | ||
# | ||
# proxy_set_header X-ProxyScheme https; | ||
# proxy_set_header X-ProxyHost nginx.docker.localhost; | ||
# proxy_set_header X-ProxyPort ${NGINX_KIBANA_PROXY_PORT}; | ||
# proxy_set_header X-ProxyContextPath /; | ||
# } | ||
#} | ||
|
||
#server { | ||
# listen 80; | ||
# listen [::]:80; | ||
# server_name nginx.local; | ||
# return 301 https://${DOLLAR}host${DOLLAR}request_uri; | ||
#} | ||
|
||
|
||
server { | ||
listen 8443 ssl; | ||
server_name nginx.local cogstack-nifi NIFI; | ||
ssl_certificate /etc/nginx/root-ca.pem; | ||
ssl_certificate_key /etc/nginx/root-ca.key; | ||
|
||
proxy_ssl_certificate /etc/nginx/nifi-cert.pem; | ||
proxy_ssl_certificate_key /etc/nginx/nifi-key.key; | ||
|
||
proxy_ssl_trusted_certificate /etc/nginx/nifi-cert.pem; | ||
proxy_ssl_server_name on; | ||
|
||
location / { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath /; | ||
proxy_set_header X-Forwarded-Context /; | ||
proxy_pass https://nifi; | ||
} | ||
|
||
location ^~ /nifi { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-Forwarded-Context /nifi; | ||
proxy_set_header X-ProxyContextPath /nifi; | ||
proxy_pass https://nifi; | ||
} | ||
|
||
location ^~ /nifi-api/ { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath ""; | ||
proxy_pass https://nifi/nifi-api/; | ||
} | ||
|
||
location ^~ /nifi-content-viewer/ { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath ""; | ||
proxy_pass https://nifi/nifi-content-viewer/; | ||
} | ||
|
||
location ^~ /nifi-registry-api/ { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath ""; | ||
proxy_pass https://nifi/nifi-registry-api/; | ||
} | ||
|
||
location ^~ /tenants { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath ""; | ||
proxy_pass https://nifi/tenants/; | ||
} | ||
|
||
location ^~ /controller { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath ""; | ||
proxy_pass https://nifi/controller/; | ||
} | ||
|
||
location ^~ /policies { | ||
proxy_set_header Host ${DOLLAR}host; | ||
proxy_set_header X-Real-IP ${DOLLER}remote_addr; | ||
proxy_set_header X-ProxyHost ${DOLLAR}proxy_host; | ||
proxy_set_header X-ProxyPort 8443; | ||
proxy_set_header X-Forwarded-For ${DOLLAR}proxy_add_x_forwarded_for; | ||
proxy_set_header X-ProxyScheme ${DOLLAR}scheme; | ||
proxy_set_header X-ProxyContextPath ""; | ||
proxy_pass https://nifi/policies/; | ||
} | ||
} | ||
} |