-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WAF] dedicated rules #567
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anton-sidelnikov
requested review from
Aloento,
vladimirvshivkov and
Polina-Gubina
August 21, 2023 15:08
Aloento
approved these changes
Aug 21, 2023
artem-lifshits
approved these changes
Aug 21, 2023
vladimirvshivkov
approved these changes
Aug 21, 2023
Build succeeded. ✔️ otc-golangci-lint SUCCESS in 2m 26s |
5 tasks
artem-lifshits
pushed a commit
that referenced
this pull request
Jan 11, 2024
[WAF] dedicated rules What this PR does / why we need it Adds WAFD rules api Which issue this PR fixes Special notes for your reviewer === RUN TestWafPremiumBlacklistRuleWorkflow rule_test.go:17: Failed to create rule: error_code: WAF.00022001 , error_msg: Resource not found --- SKIP: TestWafPremiumBlacklistRuleWorkflow (0.00s) Test ignored. === RUN TestWafPremiumCcRuleWorkflow rule_test.go:141: Attempting to Create WAF Premium cc rule rule_test.go:153: Attempting to List WAF Premium cc rule rule_test.go:160: Attempting to Update WAF Premium cc rule: 60149b9845834efc9b5742be57554720 rule_test.go:174: Attempting to Get WAF Premium cc rule: 60149b9845834efc9b5742be57554720 rule_test.go:148: Attempting to delete WAF Premium cc rule: 60149b9845834efc9b5742be57554720 rule_test.go:150: Deleted WAF Premium cc rule: 60149b9845834efc9b5742be57554720 rule_test.go:125: Attempting to delete WAF Premium policy: ce856e8eed894fc2a0623fc21693bbd0 rule_test.go:127: Deleted WAF Premium policy: ce856e8eed894fc2a0623fc21693bbd0 --- PASS: TestWafPremiumCcRuleWorkflow (3.93s) === RUN TestWafPremiumCustomRuleWorkflow rule_test.go:182: Failed to create rule: error message: {error_code: WAF.00021017, error_msg: Incorrect rule configuration --- SKIP: TestWafPremiumCustomRuleWorkflow (0.00s) Test ignored. === RUN TestWafPremiumAntiCrawlerRuleWorkflow rule_test.go:287: Attempting to Create WAF Premium anti crawler rule rule_test.go:298: Attempting to List WAF Premium anti crawler rule rule_test.go:305: Attempting to Update WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60 rule_test.go:313: Attempting to Get WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60 rule_test.go:293: Attempting to delete WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60 rule_test.go:295: Deleted WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60 rule_test.go:275: Attempting to delete WAF Premium policy: 415456b053104ed8a085a2303cc67608 rule_test.go:277: Deleted WAF Premium policy: 415456b053104ed8a085a2303cc67608 --- PASS: TestWafPremiumAntiCrawlerRuleWorkflow (3.89s) === RUN TestWafPremiumDataMaskingRuleWorkflow rule_test.go:351: Attempting to Create WAF Premium privacy rule rule_test.go:363: Attempting to List WAF Premium privacy rule rule_test.go:370: Attempting to Update WAF Premium privacy rule: 7f5c2025d01f47ef9764962e534c3f5f rule_test.go:379: Attempting to Get WAF Premium privacy rule: 93c09448617a485dbaa9e0fed61c01ba rule_test.go:358: Attempting to delete WAF Premium privacy rule: 93c09448617a485dbaa9e0fed61c01ba rule_test.go:360: Deleted WAF Premium privacy rule: 93c09448617a485dbaa9e0fed61c01ba rule_test.go:340: Attempting to delete WAF Premium policy: 7f5c2025d01f47ef9764962e534c3f5f rule_test.go:342: Deleted WAF Premium policy: 7f5c2025d01f47ef9764962e534c3f5f --- PASS: TestWafPremiumDataMaskingRuleWorkflow (3.80s) === RUN TestWafPremiumKnownAttackRuleWorkflow rule_test.go:416: Attempting to Create WAF Premium known attack source rule rule_test.go:429: Attempting to List WAF Premium known attack source rule rule_test.go:436: Attempting to Update WAF Premium known attack source rule: e984c18cd88041ad9503f7851e1adf25 rule_test.go:443: Attempting to Get WAF Premium known attack source rule: dadc78c389be42cca2e5330d46debe82 rule_test.go:424: Attempting to delete WAF Premium known attack source rule: dadc78c389be42cca2e5330d46debe82 rule_test.go:426: Deleted WAF Premium known attack source rule: dadc78c389be42cca2e5330d46debe82 rule_test.go:406: Attempting to delete WAF Premium policy: e984c18cd88041ad9503f7851e1adf25 rule_test.go:408: Deleted WAF Premium policy: e984c18cd88041ad9503f7851e1adf25 --- PASS: TestWafPremiumKnownAttackRuleWorkflow (3.66s) === RUN TestWafPremiumWebTamperRuleWorkflow rule_test.go:478: Attempting to Create WAF Premium anti tamper rule rule_test.go:491: Attempting to List WAF Premium anti tamper rule rule_test.go:498: Attempting to Update WAF Premium anti tamper rule: 669e738f13c844a495f54b23ccfdc1f7 rule_test.go:502: Attempting to Get WAF Premium anti tamper rule: 4191d5ecd5e3409186d288f546e7fdb7 rule_test.go:486: Attempting to delete WAF Premium anti tamper rule: 4191d5ecd5e3409186d288f546e7fdb7 rule_test.go:488: Deleted WAF Premium anti tamper rule: 4191d5ecd5e3409186d288f546e7fdb7 rule_test.go:469: Attempting to delete WAF Premium policy: 669e738f13c844a495f54b23ccfdc1f7 rule_test.go:471: Deleted WAF Premium policy: 669e738f13c844a495f54b23ccfdc1f7 --- PASS: TestWafPremiumWebTamperRuleWorkflow (3.63s) === RUN TestWafPremiumInformationLeakageProtectionRuleWorkflow rule_test.go:538: Attempting to Create WAF Premium information leakage protection rule rule_test.go:552: Attempting to List WAF Premium information leakage protection rule rule_test.go:559: Attempting to Update WAF Premium information leakage protection rule: 951094289dd8466b84dbf1e016c2c8ef rule_test.go:568: Attempting to Get WAF Premium information leakage protection rule: 637e35a45e3d4ef28b5444189de4feb6 rule_test.go:547: Attempting to delete WAF Premium information leakage protection rule: 637e35a45e3d4ef28b5444189de4feb6 rule_test.go:549: Deleted WAF Premium information leakage protection rule: 637e35a45e3d4ef28b5444189de4feb6 rule_test.go:528: Attempting to delete WAF Premium policy: 951094289dd8466b84dbf1e016c2c8ef rule_test.go:530: Deleted WAF Premium policy: 951094289dd8466b84dbf1e016c2c8ef --- PASS: TestWafPremiumInformationLeakageProtectionRuleWorkflow (3.59s) === RUN TestWafPremiumAlarmMaskingRuleWorkflow rule_test.go:577: Failed to create rule: error message: {error_code: WAF.00021017, error_msg: Incorrect rule configuration --- SKIP: TestWafPremiumAlarmMaskingRuleWorkflow (0.00s) Test ignored. === RUN TestWafPremiumGeoIpRuleWorkflow rule_test.go:678: Attempting to Create WAF Premium geo ip rule rule_test.go:692: Attempting to List WAF Premium geo ip rule rule_test.go:699: Attempting to Update WAF Premium geo ip rule: 891b825adf44467bb5b19203f7cd3849 rule_test.go:708: Attempting to Get WAF Premium geo ip rule: 04ef0d139980481e859befcdcd73c1bf rule_test.go:687: Attempting to delete WAF Premium geo ip rule: 04ef0d139980481e859befcdcd73c1bf rule_test.go:689: Deleted WAF Premium geo ip rule: 04ef0d139980481e859befcdcd73c1bf rule_test.go:668: Attempting to delete WAF Premium policy: 891b825adf44467bb5b19203f7cd3849 rule_test.go:670: Deleted WAF Premium policy: 891b825adf44467bb5b19203f7cd3849 --- PASS: TestWafPremiumGeoIpRuleWorkflow (3.73s) === RUN TestWafPremiumRefTableWorkflow rule_test.go:718: Deletion not working --- SKIP: TestWafPremiumRefTableWorkflow (0.00s) Test ignored. PASS Process finished with the exit code 0 Reviewed-by: Aloento Reviewed-by: Artem Lifshits Reviewed-by: Vladimir Vshivkov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Adds WAFD rules api
Which issue this PR fixes
Special notes for your reviewer
=== RUN TestWafPremiumBlacklistRuleWorkflow
rule_test.go:17: Failed to create rule: error_code: WAF.00022001 , error_msg: Resource not found
--- SKIP: TestWafPremiumBlacklistRuleWorkflow (0.00s)
Test ignored.
=== RUN TestWafPremiumCcRuleWorkflow
rule_test.go:141: Attempting to Create WAF Premium cc rule
rule_test.go:153: Attempting to List WAF Premium cc rule
rule_test.go:160: Attempting to Update WAF Premium cc rule: 60149b9845834efc9b5742be57554720
rule_test.go:174: Attempting to Get WAF Premium cc rule: 60149b9845834efc9b5742be57554720
rule_test.go:148: Attempting to delete WAF Premium cc rule: 60149b9845834efc9b5742be57554720
rule_test.go:150: Deleted WAF Premium cc rule: 60149b9845834efc9b5742be57554720
rule_test.go:125: Attempting to delete WAF Premium policy: ce856e8eed894fc2a0623fc21693bbd0
rule_test.go:127: Deleted WAF Premium policy: ce856e8eed894fc2a0623fc21693bbd0
--- PASS: TestWafPremiumCcRuleWorkflow (3.93s)
=== RUN TestWafPremiumCustomRuleWorkflow
rule_test.go:182: Failed to create rule: error message: {error_code: WAF.00021017, error_msg: Incorrect rule configuration
--- SKIP: TestWafPremiumCustomRuleWorkflow (0.00s)
Test ignored.
=== RUN TestWafPremiumAntiCrawlerRuleWorkflow
rule_test.go:287: Attempting to Create WAF Premium anti crawler rule
rule_test.go:298: Attempting to List WAF Premium anti crawler rule
rule_test.go:305: Attempting to Update WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60
rule_test.go:313: Attempting to Get WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60
rule_test.go:293: Attempting to delete WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60
rule_test.go:295: Deleted WAF Premium anti crawler rule: 48e85815e51c4535af2307ce16b2eb60
rule_test.go:275: Attempting to delete WAF Premium policy: 415456b053104ed8a085a2303cc67608
rule_test.go:277: Deleted WAF Premium policy: 415456b053104ed8a085a2303cc67608
--- PASS: TestWafPremiumAntiCrawlerRuleWorkflow (3.89s)
=== RUN TestWafPremiumDataMaskingRuleWorkflow
rule_test.go:351: Attempting to Create WAF Premium privacy rule
rule_test.go:363: Attempting to List WAF Premium privacy rule
rule_test.go:370: Attempting to Update WAF Premium privacy rule: 7f5c2025d01f47ef9764962e534c3f5f
rule_test.go:379: Attempting to Get WAF Premium privacy rule: 93c09448617a485dbaa9e0fed61c01ba
rule_test.go:358: Attempting to delete WAF Premium privacy rule: 93c09448617a485dbaa9e0fed61c01ba
rule_test.go:360: Deleted WAF Premium privacy rule: 93c09448617a485dbaa9e0fed61c01ba
rule_test.go:340: Attempting to delete WAF Premium policy: 7f5c2025d01f47ef9764962e534c3f5f
rule_test.go:342: Deleted WAF Premium policy: 7f5c2025d01f47ef9764962e534c3f5f
--- PASS: TestWafPremiumDataMaskingRuleWorkflow (3.80s)
=== RUN TestWafPremiumKnownAttackRuleWorkflow
rule_test.go:416: Attempting to Create WAF Premium known attack source rule
rule_test.go:429: Attempting to List WAF Premium known attack source rule
rule_test.go:436: Attempting to Update WAF Premium known attack source rule: e984c18cd88041ad9503f7851e1adf25
rule_test.go:443: Attempting to Get WAF Premium known attack source rule: dadc78c389be42cca2e5330d46debe82
rule_test.go:424: Attempting to delete WAF Premium known attack source rule: dadc78c389be42cca2e5330d46debe82
rule_test.go:426: Deleted WAF Premium known attack source rule: dadc78c389be42cca2e5330d46debe82
rule_test.go:406: Attempting to delete WAF Premium policy: e984c18cd88041ad9503f7851e1adf25
rule_test.go:408: Deleted WAF Premium policy: e984c18cd88041ad9503f7851e1adf25
--- PASS: TestWafPremiumKnownAttackRuleWorkflow (3.66s)
=== RUN TestWafPremiumWebTamperRuleWorkflow
rule_test.go:478: Attempting to Create WAF Premium anti tamper rule
rule_test.go:491: Attempting to List WAF Premium anti tamper rule
rule_test.go:498: Attempting to Update WAF Premium anti tamper rule: 669e738f13c844a495f54b23ccfdc1f7
rule_test.go:502: Attempting to Get WAF Premium anti tamper rule: 4191d5ecd5e3409186d288f546e7fdb7
rule_test.go:486: Attempting to delete WAF Premium anti tamper rule: 4191d5ecd5e3409186d288f546e7fdb7
rule_test.go:488: Deleted WAF Premium anti tamper rule: 4191d5ecd5e3409186d288f546e7fdb7
rule_test.go:469: Attempting to delete WAF Premium policy: 669e738f13c844a495f54b23ccfdc1f7
rule_test.go:471: Deleted WAF Premium policy: 669e738f13c844a495f54b23ccfdc1f7
--- PASS: TestWafPremiumWebTamperRuleWorkflow (3.63s)
=== RUN TestWafPremiumInformationLeakageProtectionRuleWorkflow
rule_test.go:538: Attempting to Create WAF Premium information leakage protection rule
rule_test.go:552: Attempting to List WAF Premium information leakage protection rule
rule_test.go:559: Attempting to Update WAF Premium information leakage protection rule: 951094289dd8466b84dbf1e016c2c8ef
rule_test.go:568: Attempting to Get WAF Premium information leakage protection rule: 637e35a45e3d4ef28b5444189de4feb6
rule_test.go:547: Attempting to delete WAF Premium information leakage protection rule: 637e35a45e3d4ef28b5444189de4feb6
rule_test.go:549: Deleted WAF Premium information leakage protection rule: 637e35a45e3d4ef28b5444189de4feb6
rule_test.go:528: Attempting to delete WAF Premium policy: 951094289dd8466b84dbf1e016c2c8ef
rule_test.go:530: Deleted WAF Premium policy: 951094289dd8466b84dbf1e016c2c8ef
--- PASS: TestWafPremiumInformationLeakageProtectionRuleWorkflow (3.59s)
=== RUN TestWafPremiumAlarmMaskingRuleWorkflow
rule_test.go:577: Failed to create rule: error message: {error_code: WAF.00021017, error_msg: Incorrect rule configuration
--- SKIP: TestWafPremiumAlarmMaskingRuleWorkflow (0.00s)
Test ignored.
=== RUN TestWafPremiumGeoIpRuleWorkflow
rule_test.go:678: Attempting to Create WAF Premium geo ip rule
rule_test.go:692: Attempting to List WAF Premium geo ip rule
rule_test.go:699: Attempting to Update WAF Premium geo ip rule: 891b825adf44467bb5b19203f7cd3849
rule_test.go:708: Attempting to Get WAF Premium geo ip rule: 04ef0d139980481e859befcdcd73c1bf
rule_test.go:687: Attempting to delete WAF Premium geo ip rule: 04ef0d139980481e859befcdcd73c1bf
rule_test.go:689: Deleted WAF Premium geo ip rule: 04ef0d139980481e859befcdcd73c1bf
rule_test.go:668: Attempting to delete WAF Premium policy: 891b825adf44467bb5b19203f7cd3849
rule_test.go:670: Deleted WAF Premium policy: 891b825adf44467bb5b19203f7cd3849
--- PASS: TestWafPremiumGeoIpRuleWorkflow (3.73s)
=== RUN TestWafPremiumRefTableWorkflow
rule_test.go:718: Deletion not working
--- SKIP: TestWafPremiumRefTableWorkflow (0.00s)
Test ignored.
PASS
Process finished with the exit code 0