Skip to content

Commit

Permalink
Merge branch 'main' into mtoff/query-string-consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoffl01 authored Sep 18, 2024
2 parents 21c9593 + 39044ff commit ef36810
Show file tree
Hide file tree
Showing 32 changed files with 671 additions and 199 deletions.
4 changes: 3 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from utils.tools import logger
from utils.scripts.junit_report import junit_modifyreport
from utils._context.library_version import LibraryVersion
from utils._decorators import released
from utils._decorators import released, configure as configure_decorators
from utils.properties_serialization import SetupProperties

# Monkey patch JSON-report plugin to avoid noise in report
Expand Down Expand Up @@ -103,6 +103,8 @@ def pytest_configure(config):
config.option.json_report_file = f"{context.scenario.host_log_folder}/report.json"
config.option.xmlpath = f"{context.scenario.host_log_folder}/reportJunit.xml"

configure_decorators(config)


# Called at the very begening
def pytest_sessionstart(session):
Expand Down
31 changes: 31 additions & 0 deletions docs/scenarios/parametric.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,37 @@ docker image rm <library>-test-library
The Python implementation of the interface `app/python`, when run, provides a specification of the API when run.
See the steps below in the HTTP section to run the Python server and view the specification.

## Updating protos

In order to update the `parametric/protos`, these steps must be followed.

1. Create a virtual environment and activate it:
```bash
python3.12 -m venv .venv && source .venv/bin/activate
```

2. Install the required dependencies:
```bash
pip install -r requirements.txt
```

3. Install `grpcio-tools` (make sure grpcaio is the same version):
```bash
pip install grpcio-tools==1.60.1
```

4. Change directory to `utils/parametric`:
```console
cd utils/parametric
```

5. Run the script to generate the proto files:
```bash
./generate_protos.sh
```

Then you should have updated proto files. This script will generate weird files, you can ignore/delete these.

## Implementation

### Shared Interface
Expand Down
17 changes: 17 additions & 0 deletions docs/weblog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -678,3 +678,20 @@ Examples:
### \[GET\] /set_cookie

This endpoint get a `name` and a `value` form the query string, and adds a header `Set-Cookie` with `{name}={value}` as header value in the HTTP response

### \[GET\] /session/new

This endpoint is the initial endpoint used to test session fingerprints, consequently it must initialize a new session and the web client should be able to deal with the persistence mechanism (e.g. cookies).

Examples:
- `GET`: `/session/new`

### \[GET\] /session/user

Once a session has been established, a new call to `/session/user` must be made in order to generate a session fingerprint with the session id provided by the web client (e.g. cookie) and the user id provided as a parameter.

Query parameters required in the `GET` method:
- `sdk_user`: user id used in the WAF login event triggered during the execution of the request.

Examples:
- `GET`: `/session/user?sdk_user=sdkUser`
2 changes: 2 additions & 0 deletions manifests/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature
Test_Config_ClientTagQueryString_Empty: missing_feature (test can not capture span with the expected http.url tag)
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
3 changes: 3 additions & 0 deletions manifests/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ tests/:
test_fingerprinting.py:
Test_Fingerprinting_Endpoint: missing_feature
Test_Fingerprinting_Header_And_Network: missing_feature
Test_Fingerprinting_Session: missing_feature
test_identify.py:
Test_Basic: v2.7.0
test_ip_blocking_full_denylist.py:
Expand Down Expand Up @@ -367,6 +368,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (configuration DNE)
Test_Config_ClientTagQueryString_Empty: v2.53.0
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
3 changes: 3 additions & 0 deletions manifests/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ tests/:
test_fingerprinting.py:
Test_Fingerprinting_Endpoint: missing_feature
Test_Fingerprinting_Header_And_Network: missing_feature
Test_Fingerprinting_Session: missing_feature
test_identify.py:
Test_Basic: v1.37.0
test_ip_blocking_full_denylist.py:
Expand Down Expand Up @@ -487,6 +488,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (supports DD_TRACE_HTTP_URL_QUERY_STRING_DISABLED)
Test_Config_ClientTagQueryString_Empty: v1.60.0
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.67.0
Expand Down
3 changes: 3 additions & 0 deletions manifests/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,7 @@ tests/:
Test_Fingerprinting_Header_And_Network:
'*': v1.39.0
spring-boot-3-native: irrelevant (GraalVM. Tracing support only)
Test_Fingerprinting_Session: missing_feature
test_identify.py:
Test_Basic: missing_feature
test_ip_blocking_full_denylist.py:
Expand Down Expand Up @@ -1237,6 +1238,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (endpoints return 404, but in theory should work)
Test_Config_ClientTagQueryString_Empty: missing_feature (incorrect default value)
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.39.0
Expand Down
3 changes: 3 additions & 0 deletions manifests/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ tests/:
test_fingerprinting.py:
Test_Fingerprinting_Endpoint: missing_feature
Test_Fingerprinting_Header_And_Network: missing_feature
Test_Fingerprinting_Session: missing_feature
test_identify.py:
Test_Basic: v2.4.0
test_ip_blocking_full_denylist.py:
Expand Down Expand Up @@ -562,6 +563,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (adding query string to http.url is not supported)
Test_Config_ClientTagQueryString_Empty: missing_feature (removes query strings by default)
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
3 changes: 3 additions & 0 deletions manifests/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ tests/:
test_fingerprinting.py:
Test_Fingerprinting_Endpoint: missing_feature
Test_Fingerprinting_Header_And_Network: missing_feature
Test_Fingerprinting_Session: missing_feature
test_identify.py:
Test_Basic: v0.85.0
test_logs.py:
Expand Down Expand Up @@ -318,6 +319,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (supports dd_trace_http_url_query_param_allowed instead)
Test_Config_ClientTagQueryString_Empty: v1.2.0
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: v1.3.0 # Unknown initial version
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
3 changes: 3 additions & 0 deletions manifests/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ tests/:
test_fingerprinting.py:
Test_Fingerprinting_Endpoint: v2.11.0.dev
Test_Fingerprinting_Header_And_Network: v2.11.0.dev
Test_Fingerprinting_Session: missing_feature (missing endpoint)
test_identify.py:
Test_Basic: v1.5.0rc1.dev
test_ip_blocking_full_denylist.py:
Expand Down Expand Up @@ -760,6 +761,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature (supports DD_HTPP_CLIENT_TAGS_QUERY_STRING instead)
Test_Config_ClientTagQueryString_Empty: v2.12.0
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
5 changes: 5 additions & 0 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ tests/:
test_fingerprinting.py:
Test_Fingerprinting_Endpoint: missing_feature
Test_Fingerprinting_Header_And_Network: missing_feature
Test_Fingerprinting_Session: missing_feature
test_identify.py:
Test_Basic: v1.0.0
test_ip_blocking_full_denylist.py:
Expand Down Expand Up @@ -332,6 +333,8 @@ tests/:
Test_Config_TraceEnabled: missing_feature
Test_Config_TraceLogDirectory: missing_feature
Test_Config_UnifiedServiceTagging: missing_feature
test_crashtracking.py:
Test_Crashtracking: v2.3.0
test_dynamic_configuration.py:
TestDynamicConfigHeaderTags: bug (To be confirmed, theorical version is v2.0.0)
TestDynamicConfigSamplingRules: v2.0.0
Expand Down Expand Up @@ -388,6 +391,8 @@ tests/:
test_config_consistency.py:
Test_Config_ClientTagQueryString_Configured: missing_feature
Test_Config_ClientTagQueryString_Empty: missing_feature (removes query string by default)
Test_Config_HttpClientErrorStatuses_Default: missing_feature
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_HttpServerErrorStatuses_Default: missing_feature
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature
Expand Down
Loading

0 comments on commit ef36810

Please sign in to comment.