Skip to content

Commit

Permalink
mgmt, add test sanitizer for FunctionApp (Azure#39665)
Browse files Browse the repository at this point in the history
* add sanitizer

* sanitizer for encryption key

* assets.json
  • Loading branch information
XiaofeiCao authored Apr 12, 2024
1 parent f5205c6 commit 2799669
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-appservice",
"Tag": "java/resourcemanager/azure-resourcemanager-appservice_6d9bee9aaa"
"Tag": "java/resourcemanager/azure-resourcemanager-appservice_91d3a06801"
}
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,14 @@ private void addSanitizers() {
// ContainerRegistry
new TestProxySanitizer("$..passwords[*].value", null, REDACTED_VALUE, TestProxySanitizerType.BODY_KEY),
// ContainerService
new TestProxySanitizer("$..secret", null, REDACTED_VALUE, TestProxySanitizerType.BODY_KEY)
));
new TestProxySanitizer("$..secret", null, REDACTED_VALUE, TestProxySanitizerType.BODY_KEY),
// AppService
new TestProxySanitizer("$.properties.siteConfig.machineKey.decryptionKey", null, REDACTED_VALUE, TestProxySanitizerType.BODY_KEY),
// Replace "AccountKey=<accountKey>;" with "AccountKey=REDACTED;"
new TestProxySanitizer("(?:AccountKey=)(?<accountKey>.*?)(?:;)", REDACTED_VALUE, TestProxySanitizerType.BODY_REGEX).setGroupForReplace("accountKey"),
new TestProxySanitizer("$.properties.WEBSITE_AUTH_ENCRYPTION_KEY", null, REDACTED_VALUE, TestProxySanitizerType.BODY_KEY),
new TestProxySanitizer("$.properties.DOCKER_REGISTRY_SERVER_PASSWORD", null, REDACTED_VALUE, TestProxySanitizerType.BODY_KEY)
));
sanitizers.addAll(this.sanitizers);
interceptorManager.addSanitizers(sanitizers);
}
Expand Down

0 comments on commit 2799669

Please sign in to comment.