Skip to content

Commit

Permalink
Add path rewrite to radar_gateway
Browse files Browse the repository at this point in the history
Nginx decodes the uri before passing it to the backend server. This is dangerous because it can allow for XSS attacks. Grizzly servers have a bug where they send the decoded uri as part of error messages (see Graylog2/graylog2-server#3171). To prevent this, we need to re-encode the uri ($request_uri is the original encoded request) before passing it to the Grizzly server.
  • Loading branch information
pvannierop committed Apr 11, 2024
1 parent 71859d3 commit a9919fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions etc/radar-gateway/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ingress:
annotations:
# Nginx decodes the uri before passing it to the backend server. This is dangerous because it can allow for XSS
# attacks. Grizzly servers have a bug where they send the decoded uri as part of error messages (see
# https://github.com/Graylog2/graylog2-server/issues/3171). To prevent this, we need to re-encode the uri
# ($request_uri is the original encoded request) before passing it to the Grizzly server.
nginx.ingress.kubernetes.io/configuration-snippet: |
rewrite ^ $request_uri;
1 change: 1 addition & 0 deletions helmfile.d/20-ingestion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ releases:
timeout: {{ add .Values.base_timeout .Values.radar_gateway._extra_timeout }}
<<: *logFailedRelease
values:
- "../etc/radar-gateway/values.yaml"
- {{ .Values.radar_gateway | toYaml | indent 8 | trim }}
- {{ .Values.confluent_cloud | toYaml | indent 8 | trim }}
set:
Expand Down

0 comments on commit a9919fe

Please sign in to comment.