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

[PR #962/9230c698 backport][stable-2] wafv2_web_acl: prevent exception when element is not a dict #991

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Mar 15, 2022

This is a backport of PR #962 as merged into main (9230c69).

SUMMARY

the geo_match_statement statement paremeter country_codes is a list and will fail the current implementation

  File "/tmp/ansible_community.aws.wafv2_web_acl_payload_8xvwtxvw/ansible_community.aws.wafv2_web_acl_payload.zip/ansible_collections/community/aws/plugins/module_utils/wafv2.py", line 52, in wafv2_snake_dict_to_camel_dict
AttributeError: 'str' object has no attribute 'keys'
rules:
    - name: block-germany
      priority: 0
      action:
        block: {}
      visibility_config:
        sampled_requests_enabled: yes
        cloud_watch_metrics_enabled: yes
        metric_name: block-germany
      statement:
        geo_match_statement:
          country_codes:
             - DE
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/module_utils/wafv2.py

ADDITIONAL INFORMATION

wafv2_web_acl: prevent exception when element is not a dict

SUMMARY
the geo_match_statement statement paremeter country_codes is a list and will fail the current implementation
  File "/tmp/ansible_community.aws.wafv2_web_acl_payload_8xvwtxvw/ansible_community.aws.wafv2_web_acl_payload.zip/ansible_collections/community/aws/plugins/module_utils/wafv2.py", line 52, in wafv2_snake_dict_to_camel_dict
AttributeError: 'str' object has no attribute 'keys'

rules:
    - name: block-germany
      priority: 0
      action:
        block: {}
      visibility_config:
        sampled_requests_enabled: yes
        cloud_watch_metrics_enabled: yes
        metric_name: block-germany
      statement:
        geo_match_statement:
          country_codes:
             - DE
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
plugins/module_utils/wafv2.py
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 9230c69)
@markuman markuman added the mergeit Merge the PR (SoftwareFactory) label Mar 15, 2022
@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review integration tests/integration new_contributor Help guide this first time contributor tests tests traceback labels Mar 15, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit ffbf199 into stable-2 Mar 15, 2022
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-2/9230c6986eea7f041796cb21640c7fd28bc24c4d/pr-962 branch March 15, 2022 09:35
abikouo pushed a commit to abikouo/community.aws that referenced this pull request Oct 24, 2023
Add cloudtrail_info module

Signed-off-by: GomathiselviS gomathiselvi@gmail.com
SUMMARY


New module cloudtrail_info.py to gather AWS cloudtrail details. Details gathered using
list_trails()
describe_trails()
get_trail_status()
list_tags()

ISSUE TYPE


New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION



Integration tests will be added to the cloudtrail module , after it gets promoted from community.aws to amazon.aws.

Reviewed-by: Gonéri Le Bouder <goneri@lebouder.net>
Reviewed-by: Mark Chappell <None>
Reviewed-by: GomathiselviS <None>
Reviewed-by: Alina Buzachis <None>
Reviewed-by: Jill R <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review integration tests/integration mergeit Merge the PR (SoftwareFactory) new_contributor Help guide this first time contributor tests tests traceback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants