Add new option for query parameters
Query parameters in their initial incarnation will likely have security
consequences. For example, requesting ServiceRoot with expand depth 999
would likely run most BMCs out of memory. This isn't a good reason to
keep those features out of master, as there are a number of services
(webui-vue for example) that would like to test against them, and
identify the weaknesses.
The goal with this option is to allow users to test, so we can determine
things like the max depth we should support, which query params have
security consequences and how to mitigate them, and other testing. The
end goal would be for this option to be enabled by default. If it's
removed entirely would depend on the impacts of supporting query params
and is something we will have to discuss at a later date.
Tested:
Code compiles. Use of this option is added in next patchset in series.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I93ff31c938e4be2d92eb07b59a3288f8bacde2ac
diff --git a/meson.build b/meson.build
index 8e6e83a..cd90a0c 100644
--- a/meson.build
+++ b/meson.build
@@ -312,6 +312,8 @@
conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
xss_enabled = get_option('insecure-disable-xss')
conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
+enable_redfish_query = get_option('insecure-enable-redfish-query')
+conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
conf_data.set('HTTPS_PORT', get_option('https_port'))
configure_file(input: 'bmcweb_config.h.in',