diff --git a/utils/build/docker/php/apache-mod/entrypoint.sh b/utils/build/docker/php/apache-mod/entrypoint.sh index 60a43ba589..d1cc449420 100755 --- a/utils/build/docker/php/apache-mod/entrypoint.sh +++ b/utils/build/docker/php/apache-mod/entrypoint.sh @@ -9,7 +9,7 @@ fi chmod a+rx /root rm -f /tmp/ddappsec.lock -LOGS_PHP=(/tmp/appsec.log /tmp/helper.log /tmp/php_error.log /tmp/sidecar.log) +LOGS_PHP=(/tmp/appsec.log /tmp/helper.log /tmp/php_error.log /tmp/sidecar.log /tmp/tracer.log) touch "${LOGS_PHP[@]}" chown www-data:www-data "${LOGS_PHP[@]}" diff --git a/utils/build/docker/php/apache-mod/php.conf b/utils/build/docker/php/apache-mod/php.conf index c549850275..2eb1bb7cd6 100644 --- a/utils/build/docker/php/apache-mod/php.conf +++ b/utils/build/docker/php/apache-mod/php.conf @@ -12,6 +12,8 @@ RewriteRule "^/make_distant_call$" "/make_distant_call/" RewriteRule "^/custom_event$" "/custom_event/" RewriteRule "^/users$" "/users/" + RewriteRule "^/requestdownstream$" "/requestdownstream/" + RewriteRule "^/returnheaders$" "/returnheaders/" RewriteRule "^/user_login_failure_event$" "/user_login_failure_event/" RewriteRule "^/user_login_success_event$" "/user_login_success_event/" RewriteRule "^/dbm$" "/dbm/" diff --git a/utils/build/docker/php/common/php.ini b/utils/build/docker/php/common/php.ini index 753b43474a..5429e85fb1 100644 --- a/utils/build/docker/php/common/php.ini +++ b/utils/build/docker/php/common/php.ini @@ -16,7 +16,6 @@ display_errors=0 datadog.appsec.log_file=/tmp/appsec.log datadog.appsec.log_level=debug -datadog.appsec.rules_path=/etc/dd-appsec/recommended.json ; will be overridden datadog.appsec.helper_path=/usr/local/lib/libddappsec-helper.so datadog.appsec.helper_socket_path=/tmp/ddappsec.sock @@ -31,3 +30,6 @@ datadog.remote_config_poll_interval=500 datadog.remote_config_enabled=1 datadog.experimental_api_security_enabled=1 datadog.api_security_request_sample_rate=1 + +datadog.trace.log_file=/tmp/tracer.log +datadog.trace.log_level=debug \ No newline at end of file diff --git a/utils/build/docker/php/common/requestdownstream.php b/utils/build/docker/php/common/requestdownstream.php new file mode 100644 index 0000000000..2ccf6241cd --- /dev/null +++ b/utils/build/docker/php/common/requestdownstream.php @@ -0,0 +1,9 @@ + $value) + { + if (substr($name, 0, 5) == 'HTTP_') + { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))); + $headers[$key] = $value; + } + } + return $headers; +} + +echo json_encode(getHeadersFormatted()); diff --git a/utils/build/docker/php/php-fpm/entrypoint.sh b/utils/build/docker/php/php-fpm/entrypoint.sh index 21a97e854f..d61821c38f 100755 --- a/utils/build/docker/php/php-fpm/entrypoint.sh +++ b/utils/build/docker/php/php-fpm/entrypoint.sh @@ -9,7 +9,7 @@ fi chmod a+rx /root rm -f /tmp/ddappsec.lock -LOGS_PHP=(/tmp/appsec.log /tmp/helper.log /tmp/php_error.log) +LOGS_PHP=(/tmp/appsec.log /tmp/helper.log /tmp/php_error.log /tmp/tracer.log) touch "${LOGS_PHP[@]}" chown www-data:www-data "${LOGS_PHP[@]}" diff --git a/utils/build/docker/php/php-fpm/php-fpm.conf b/utils/build/docker/php/php-fpm/php-fpm.conf index 7dda4d28b5..1a0f159f23 100644 --- a/utils/build/docker/php/php-fpm/php-fpm.conf +++ b/utils/build/docker/php/php-fpm/php-fpm.conf @@ -18,6 +18,8 @@ RewriteRule "^/make_distant_call$" "/make_distant_call/" RewriteRule "^/custom_event$" "/custom_event/" RewriteRule "^/users$" "/users/" + RewriteRule "^/requestdownstream$" "/requestdownstream/" + RewriteRule "^/returnheaders$" "/returnheaders/" RewriteRule "^/user_login_failure_event$" "/user_login_failure_event/" RewriteRule "^/user_login_success_event$" "/user_login_success_event/" RewriteRule "^/dbm$" "/dbm/"