[AAI] Request blocking enhancement for AAI 59/126859/3
authorSuresh Charan <suresh.charan@amdocs.com>
Mon, 31 Jan 2022 11:25:37 +0000 (06:25 -0500)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Wed, 23 Feb 2022 07:53:09 +0000 (07:53 +0000)
Enable configuration of HAProxy ACL to block incoming requests

Issue-ID: OOM-2920

Signed-off-by: Suresh Charan <suresh.charan@amdocs.com>
Change-Id: Icacaa7642f018b76b6c738b325c3d2a12702495e

kubernetes/aai/resources/config/haproxy/haproxy-pluggable-security.cfg
kubernetes/aai/resources/config/haproxy/haproxy.cfg
kubernetes/aai/values.yaml

index 9fa6d2e..6e7acef 100644 (file)
@@ -88,6 +88,15 @@ frontend IST_8443
         http-request set-header X-AAI-SSL-Client-ST             %{+Q}[ssl_c_s_dn(ST)]
         http-request set-header X-AAI-SSL-Client-C              %{+Q}[ssl_c_s_dn(C)]
         http-request set-header X-AAI-SSL-Client-O              %{+Q}[ssl_c_s_dn(O)]
+#######################################
+## Request blocking configuration ###
+#######################################
+        {{- if eq $.Values.haproxy.requestBlocking.enabled true }}
+        {{- range $custom_config := $.Values.haproxy.requestBlocking.customConfigs }}
+        {{ $custom_config }}
+        {{- end }}
+        {{- end }}
+
         reqadd X-Forwarded-Proto:\ https
         reqadd X-Forwarded-Port:\ 8443
 
index 1db4add..1accff9 100644 (file)
@@ -119,6 +119,15 @@ frontend IST_8443
         http-request set-header X-AAI-SSL-Client-ST             %{+Q}[ssl_c_s_dn(ST)]
         http-request set-header X-AAI-SSL-Client-C              %{+Q}[ssl_c_s_dn(C)]
         http-request set-header X-AAI-SSL-Client-O              %{+Q}[ssl_c_s_dn(O)]
+#######################################
+## Request blocking configuration ###
+#######################################
+        {{- if eq $.Values.haproxy.requestBlocking.enabled true }}
+        {{- range $custom_config := $.Values.haproxy.requestBlocking.customConfigs }}
+        {{ $custom_config }}
+        {{- end }}
+        {{- end }}
+
         reqadd X-Forwarded-Proto:\ https
         reqadd X-Forwarded-Port:\ 8443
 {{- end }}
index 42b0fa6..ff402dd 100644 (file)
@@ -349,6 +349,12 @@ nodeSelector: {}
 
 affinity: {}
 
+# HAProxy configuration to block HTTP requests to AAI based on configurable URL patterns
+haproxy:
+  requestBlocking:
+    enabled: false
+    customConfigs: []
+
 # probe configuration parameters
 liveness:
   initialDelaySeconds: 10