AWS STS getFederationToken的主要用例是什么?

发布于 2025-01-17 12:59:26 字数 704 浏览 3 评论 0原文

参考这篇文章,有 5 个 API使用 STS 检索凭据:

  1. AssumeRole
  2. AssumeRoleWithWebIdentity
  3. AssumeRoleWithSAML
  4. GetFederationToken
  5. GetSessionToken

AssumeRole 对于使用 IAM 角色集中管理权限非常有用。 Web 身份和 SAML 联合也很简单。 GetSessionToken 对于保护敏感 IAM 用户和保护来自不安全位置的连接非常有用,尤其是使用 MFA。我过去也用过这个。

但是,与 AssumeRole 相比,GetFederationToken 的主要用途是什么?这篇文章似乎表明,关键的区别在于它允许更长的有效期。这真的是这个 API 的主要目的吗?为什么为了延长有效期而使用不同的 API 至关重要?

Referring to this article, there are 5 APIs to retrieve credentials using STS:

  1. AssumeRole
  2. AssumeRoleWithWebIdentity
  3. AssumeRoleWithSAML
  4. GetFederationToken
  5. GetSessionToken

AssumeRole is useful for managing permissions centrally using IAM roles. Web identity and SAML federation are also straightforward. GetSessionToken is useful to protect sensitive IAM users and to protect connections from insecure locations, especially using MFA. I have also used this in the past.

However, what is the main purpose for GetFederationToken, in comparison to AssumeRole? The article seems to suggest the key difference is that it allows for a substantially longer expiration. Is this really the primary purpose of this API? Why is it crucial to have a different API just for longer expiration?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

昵称有卵用 2025-01-24 12:59:26

除到期外,asherole getfederationtoken 之间也有一些区别。

asherole显然需要在策略中发挥作用。 getFederationtoken由IAM用户的凭据调用,并且不涉及角色。 getFederatikentokengetsessionToken更相似,但在会话策略支持下。同样,对结果临时凭证的限制也不同,请参见

getFederationToken的用例:在没有角色时,会从IAM用户使用IAM用户创建临时凭据。

There are a few difference between AssumeRole and GetFederationToken apart from expiration.

AssumeRole obviously requires a role with policies. GetFederationToken is called by the credentials of an IAM user, and it doesn't involve roles. GetFederationToken is more similar to GetSessionToken but with session policy support. Also the restrictions on resulting temporary credentials are different, see here.

Use case for GetFederationToken: creating temporary credentials from IAM user with session policy when there is no role to assume.

清晨说晚安 2025-01-24 12:59:26

GetFeDerationToken可以更好地适用于与外部系统认证的用户打交道的方案,并且您不会直接管理这些外部帐户。 Auderolewithwebidentity更适合您直接管理的帐户/身份提供商。

GetFederationToken is better for scenarios where you're dealing with users authenticated by external systems, and you're not managing those external accounts directly. AssumeRoleWithWebIdentity is better for accounts/identity providers you manage directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文