Skip to content

Commit

Permalink
Add support for sensitive data detection in iRule
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hain committed Oct 31, 2024
1 parent 9c5e349 commit 3e5c030
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 205 deletions.
Binary file modified diagrams/api-detection-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ clickhouse client -nm <<-EOSQL
accesses UInt64,
auth_headers_seen UInt64,
auth_errors UInt64,
sensitive_headers_seen UInt64,
sensitive_payload_seen UInt64,
ssn_seen UInt64,
dob_seen UInt64,
creditcard_seen UInt64,
email_seen UInt64,
)
ENGINE = MergeTree
ORDER BY (accesses, Timestamp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ clickhouse client <<-EOSQL
Timestamp DateTime,
path String CODEC(ZSTD(1)),
hasAuthorization Bool,
hasSensitiveHeaders Bool,
hasSensitivePayload Bool,
httpv LowCardinality(String) CODEC(ZSTD(1)),
reqCType LowCardinality(String) CODEC(ZSTD(1)),
resCType LowCardinality(String) CODEC(ZSTD(1)),
host LowCardinality(String) CODEC(ZSTD(1)),
hostname LowCardinality(String) CODEC(ZSTD(1)),
method LowCardinality(String) CODEC(ZSTD(1)),
sensitiveDataTypes LowCardinality(String) CODEC(ZSTD(1)),
statusCode UInt16,
)
ENGINE = MergeTree
Expand All @@ -57,6 +60,9 @@ clickhouse client <<-EOSQL
path(LogAttributes['uri']) AS path,
LogAttributes['host'] AS host,
LogAttributes['hasAuthorization'] AS hasAuthorization,
LogAttributes['sensitiveInHeaders'] AS hasSensitiveHeaders,
LogAttributes['sensitiveInPayload'] AS hasSensitivePayload,
LogAttributes['sensitiveDataTypes'] AS sensitiveDataTypes,
LogAttributes['method'] AS method,
LogAttributes['statusCode'] AS statusCode,
LogAttributes['reqCType'] AS reqCType,
Expand Down
44 changes: 0 additions & 44 deletions services/clickhouse/schema/access_log.schema

This file was deleted.

15 changes: 0 additions & 15 deletions services/clickhouse/schema/api_endpoints.schema

This file was deleted.

20 changes: 0 additions & 20 deletions services/clickhouse/schema/otel_null_log.schema

This file was deleted.

40 changes: 0 additions & 40 deletions services/clickhouse/schema/view.schema

This file was deleted.

Loading

0 comments on commit 3e5c030

Please sign in to comment.