在 AWS 上的哪里存储多个访问令牌?

Where to store multiple access tokens on AWS?

我正在开发一个 Slack 应用程序,它必须为每个使用该应用程序的客户存储访问令牌(例如 1000 个使用它的团队 = 1000 个令牌)。 Token 使应用程序可以访问客户工作区的 Slack API,并且每天都会被频繁使用。

应用程序将 运行 在 AWS 上,使用 Lambda 和 DynamoDB。

安全存储这些访问令牌的最佳做法是什么?

对于这种情况,我找不到任何严格的建议。最初考虑将 DynamoDB 中的那些放在专用的 table 中,但现在考虑是否应该为该用例使用其他 AWS 服务。我检查过 Secrets Manager,但看起来是一个相当昂贵的选项,不确定它是否适用于我的场景。

感谢任何建议。

我可能会为此目的使用专用的 DynamoDB table。至少,我会将其配置为使用 KMS CMK 到 encrypt the data at-rest, and also restrict access to the table through fairly granular IAM permissions in your AWS account. If you also wanted to encrypt each value separately you could look into client-side encryption.

您对 Secrets Manager 成本的调查结果很好。您还可以查看 Systems Manager Parameter Store as an alternative that is generally cheaper than Secrets Manager. Secrets Manager does have the added security of being able to set an IAM resource policy 秘密本身。

最终由您决定您的解决方案需要多安全,以及您愿意为此付出多少。您甚至可以启动 AWS HSM 来加密这些值,但这会增加相当多的成本。