【问题标题】:How can I white list slack web-hooks domain in PCF ASG's?如何将 PCF ASG 中的 slack webhooks 域列入白名单?
【发布时间】:2019-10-09 19:21:39
【问题描述】:

我正在使用一个关键的云代工厂来托管我的应用程序。我需要将应用程序安全组(ASG)中的 slack-webhooks URL IP 列入白名单。目前,我已经硬编码了 3 个 IP。

 {
    "description": "Slack-ip-1",
    "destination": "13.226.19.152",
    "protocol": "tcp",
    "ports": "443"
  },
  {
    "description": "Slack-ip-2",
    "destination": "13.249.130.154",
    "protocol": "tcp",
    "ports": "443"
  },
  {
    "description": "Slack-ip-3",
    "destination": "13.227.32.151",
    "protocol": "tcp",
    "ports": "443"
  }

但 Slack 使用 AWS,这些 IP 很可能会频繁更改。我可以将 hooks.slack.com 之类的域列入白名单,而不是硬编码的 ips?

【问题讨论】:

    标签: cloud-foundry


    【解决方案1】:

    很遗憾,没有。应用程序安全组向下转换为 iptables 规则和using domain names instead of IP addresses there is not recommended (for security and performance reasons)

    我认为您最好的选择是拥有一个定期(可能每天)运行的 cron 脚本,该脚本运行 dighost 并解析 hooks.slack.com 以获取 IP 地址。如果这些变化,您可以向自己发送警报,可能通过 slack :),因此可以提醒您更新您的 ASG,或者您可以从脚本自动更新您的 ASG。看你想要多漂亮。

    希望有帮助!

    【讨论】:

    • 0.0.0.0-255.255.255.255 怎么样?
    • 你可以去解锁所有的路线,这是一个好点。 AWS 发布了他们所有 IP 空间的列表,我相信就是这样 -> docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html。您必须将其转换为 ASG 规则,然后 Slack 是否更改也没关系。随之而来的缺点是您的应用程序现在可以与 AWS 上的任何东西进行通信,这是相当多的东西。
    • 我不为 Slack 或 AWS 工作,所以我不能给你一个明确的答案,但你说的在逻辑上是有道理的。
    猜你喜欢
    • 2021-03-12
    • 1970-01-01
    • 2023-01-11
    • 2020-04-08
    • 2016-09-13
    • 2018-12-24
    • 2017-10-27
    • 1970-01-01
    • 2020-12-01
    相关资源
    最近更新 更多