Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions libdd-data-pipeline/src/agent_info/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,23 +408,43 @@ mod single_threaded_tests {
},
"remove_stack_traces": false,
"redis": {
"enabled": true,
"remove_all_args": false
"Enabled": true,
"RemoveAllArgs": false
},
"memcached": {
"enabled": true,
"keep_command": false
"Enabled": true,
"KeepCommand": false
}
}
},
"peer_tags": ["db.hostname","http.host","aws.s3.bucket"]
"peer_tags": ["db.hostname","http.host","aws.s3.bucket"],
"obfuscation_version": 1,
"filter_tags": {
"reject": [
"appsec.events.system_tests_appsec_event.value:tf-reject-exact"
],
"require": [
"appsec.events.system_tests_appsec_event.value:tf-require-exact"
]
},
"filter_tags_regex": {
"reject": [
"appsec.events.system_tests_appsec_event.value:tf-reject-regex-.*"
],
"require": [
"appsec.events.system_tests_appsec_event.value:tf-require-regex-.*"
]
},
"ignore_resources": [
".*(stats-unique|StatsUniqueHandler).*"
]
}"#;

fn calculate_hash(json: &str) -> String {
format!("{:x}", Sha256::digest(json.as_bytes()))
}

const TEST_INFO_HASH: &str = "cce54bf6e7d1bf38088a3ec809bfeec160bc52d37f70bd6b581ce3c2f7be5a65";
const TEST_INFO_HASH: &str = "d0f6dde2c1ef3b7b776a58162d42574346e23f4677c3fafb440f5c7ca83a8a28";

#[cfg_attr(miri, ignore)]
#[tokio::test]
Expand Down
7 changes: 7 additions & 0 deletions libdd-data-pipeline/src/agent_info/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,21 @@ pub struct HttpObfuscationConfig {

#[allow(missing_docs)]
#[derive(Clone, Serialize, Deserialize, Default, Debug, PartialEq)]
#[serde(rename_all = "PascalCase")]
Comment thread
Eldolfin marked this conversation as resolved.
Outdated
pub struct RedisObfuscationConfig {
// Agent sent pascal case fields here in versions <7.79.0
#[serde(alias = "Enabled")]
pub enabled: bool,
#[serde(alias = "RemoveAllArgs")]
pub remove_all_args: bool,
}

#[allow(missing_docs)]
#[derive(Clone, Serialize, Deserialize, Default, Debug, PartialEq)]
pub struct MemcachedObfuscationConfig {
// Agent sent pascal case fields here in versions <7.79.0
#[serde(alias = "Enabled")]
pub enabled: bool,
#[serde(alias = "KeepCommand")]
pub keep_command: bool,
}
Loading