AWS IAM Authenticator
$ aws-iam-authenticator 基金会 低风险AWS IAM Authenticator(aws-iam-authenticator)使用 AWS IAM 身份向 Kubernetes 集群(含 Amazon EKS)认证。执行 aws-iam-authenticator token -i <cluster-id> 会直接输出供 kubectl 消费的标准 ExecCredential JSON。
brew install aws-iam-authenticator aws-iam-authenticator 作为本地 kubectl kubeconfig 的 exec 凭证插件运行,属于基础设施底层组件而非 MCP 替代对象。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
专为无头 exec 凭证插件设计,确定性输出 Kubernetes ExecCredential JSON,无任何 TTY 交互。
token -i <cluster-id>emits structuredExecCredentialJSON- Designed for automated
kubectlkubeconfigexecinvocation
只读预签名生成器,支持 -i 集群隔离与 -r 角色切换,但标准输出的令牌属于敏感 Bearer 凭证。
- No remote write or destructive subcommands
- Presigned STS token on stdout must not be leaked into logs
静态 Go 单二进制,可通过 Homebrew 与 GitHub Releases 跨 macOS、Linux、Windows 安装。
- Available via
brew install aws-iam-authenticatorand release binaries
职责单一的凭证插件;标准 EKS 现多用 aws eks get-token,但存量 kubeconfig 与自建集群仍广泛依赖它。
- Required by legacy EKS and self-managed AWS Kubernetes kubeconfigs
由 Kubernetes SIGs(kubernetes-sigs/aws-iam-authenticator)基于 Apache-2.0 维护。
- CNCF / Kubernetes SIGs repository under Apache-2.0
仓库 README 与本地 --help 说明清晰完整。
- Upstream README documents
token,verify, andinitcommands
安全边界、鉴权与放权指南
读取标准 AWS SDK 凭证(~/.aws/credentials、AWS_PROFILE 或 AWS_ACCESS_KEY_ID / AWS_SESSION_TOKEN 环境变量)在内存中签名 STS 令牌。
Apache-2.0 开源 CLI 免费;本地 STS 预签名无额外费用。
# AWS IAM Authenticator Agent Rules - Keep `token` generation scoped with `-i <cluster-id>` and `-r <read-only-role-arn>` when possible. - Never log or print the full `status.token` output into shared transcripts or git files.
Agent 高频安全命令配方
只读查询(安全推荐)
ExecCredential JSON 令牌 aws-iam-authenticator token -i my-eks-cluster
生成短生命周期的 STS 预签名 Bearer 令牌并封装为 Kubernetes ExecCredential JSON。
aws-iam-authenticator token -i my-eks-cluster -r arn:aws:iam::123456789012:role/EksReadOnly
在生成 Kubernetes 认证令牌前先切换至最小权限 IAM 角色。
核心优势
- + 原生无交互输出标准 Kubernetes
ExecCredentialJSON。 - + 纯本地只读 STS 签名,支持
-i集群绑定与-r角色扮演。 - + 轻量级静态 Go 二进制,无运行时依赖。
注意事项与踩坑点
- ! 执行
token会在标准输出打印实时 Bearer 令牌,切勿将其写入对话记录或代码库。 - ! 在常规 EKS 环境中,现在可直接用
aws eks get-token替代而无需额外二进制。