Skip to content
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 4 commits into from
Aug 22, 2023
Merged

[WAF] dedicated rules #567

merged 4 commits into from
Aug 22, 2023

Conversation

anton-sidelnikov
Copy link
Member

@anton-sidelnikov anton-sidelnikov commented Aug 18, 2023

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

@anton-sidelnikov anton-sidelnikov self-assigned this Aug 18, 2023
@anton-sidelnikov anton-sidelnikov added the gate Merge PR label Aug 22, 2023
@otc-zuul
Copy link
Contributor

otc-zuul bot commented Aug 22, 2023

Build succeeded.
https://zuul.otc-service.com/t/eco/buildset/848b27266a3f48fa8c56f60079ec9898

✔️ otc-golangci-lint SUCCESS in 2m 26s
✔️ golang-make-vet SUCCESS in 2m 49s
✔️ golang-make-test SUCCESS in 3m 14s
✔️ golang-make-functional SUCCESS in 7m 43s

@otc-zuul otc-zuul bot merged commit bc6e3b1 into devel Aug 22, 2023
2 checks passed
@otc-zuul otc-zuul bot deleted the wafd-rules branch August 22, 2023 09:39
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
Labels
gate Merge PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants