0

当我使用 sns 服务触发托管策略时,消息以不可读的格式传递。

default.htmlc7n-mailer

policies:
  - name: policyname-groups
    resource: security-group
    description: |
      Remove any rule from a security group that allows open ports ingress
      and notify the user who added the violating rule.
    filters:
     - type: ingress
       Cidr:
        value_type: cidr
        op: eq
        value: "0.0.0.0/0"
    mode:
       role: arn:aws:iam::92*****:role/Custodian
       schedule: 'cron(00/10 14 * * ? *)'
       type: periodic
    actions:
     - type: notify
       template: default.html
       priority_header: 1
       subject: " Created-[custodian {{ account }} - {{ region }}]"
       violation_desc: |
         " Which Had Rules Open To The World:"
       action_desc: |
         "taken"
         "Taken: The Violating Security Group Rule Needs to be Removed As It
         Violates Our Company's Cloud Policy. Please Refer To The Cloud FAQ."
       to:
         - mailid@domain.com
       transport:
         type: sns
         region: regionname
         topic: topicname
4

1 回答 1

0

c7n-mailer 用于实际传递、查找地址和格式化消息以进行传递。

https://cloudcustodian.io/docs/tools/c7n-mailer.html

于 2019-09-12T18:34:58.950 回答