CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

AWS IAM Authenticator

$ aws-iam-authenticator 基金会 低风险
Kubernetes SIGs · 云原生与基础设施 · Apache-2.0 · macos / linux / windows

AWS IAM Authenticator(aws-iam-authenticator)使用 AWS IAM 身份向 Kubernetes 集群(含 Amazon EKS)认证。执行 aws-iam-authenticator token -i <cluster-id> 会直接输出供 kubectl 消费的标准 ExecCredential JSON。

FCRS-1.0 综合评分
84 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install aws-iam-authenticator
CLI vs MCP 选型建议 仅 CLI 可用

aws-iam-authenticator 作为本地 kubectl kubeconfig 的 exec 凭证插件运行,属于基础设施底层组件而非 MCP 替代对象。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 21 / 25

专为无头 exec 凭证插件设计,确定性输出 Kubernetes ExecCredential JSON,无任何 TTY 交互。

  • token -i <cluster-id> emits structured ExecCredential JSON
  • Designed for automated kubectl kubeconfig exec invocation
安全与权限边界 22 / 25

只读预签名生成器,支持 -i 集群隔离与 -r 角色切换,但标准输出的令牌属于敏感 Bearer 凭证。

  • No remote write or destructive subcommands
  • Presigned STS token on stdout must not be leaked into logs
安装与运行摩擦 14 / 15

静态 Go 单二进制,可通过 Homebrew 与 GitHub Releases 跨 macOS、Linux、Windows 安装。

  • Available via brew install aws-iam-authenticator and release binaries
能力覆盖与边际价值 11 / 15

职责单一的凭证插件;标准 EKS 现多用 aws eks get-token,但存量 kubeconfig 与自建集群仍广泛依赖它。

  • Required by legacy EKS and self-managed AWS Kubernetes kubeconfigs
维护与来源背书 8 / 10

由 Kubernetes SIGs(kubernetes-sigs/aws-iam-authenticator)基于 Apache-2.0 维护。

  • CNCF / Kubernetes SIGs repository under Apache-2.0
文档与可验证性 8 / 10

仓库 README 与本地 --help 说明清晰完整。

  • Upstream README documents token, verify, and init commands

安全边界、鉴权与放权指南

鉴权方式
本地配置文件 环境变量密钥
凭证存储位置

读取标准 AWS SDK 凭证(~/.aws/credentials、AWS_PROFILE 或 AWS_ACCESS_KEY_ID / AWS_SESSION_TOKEN 环境变量)在内存中签名 STS 令牌。

潜在副作用
只读查询
费用与配额提示

Apache-2.0 开源 CLI 免费;本地 STS 预签名无额外费用。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# 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 高频安全命令配方

只读查询(安全推荐)

签发 Kubernetes ExecCredential JSON 令牌
aws-iam-authenticator token -i my-eks-cluster

生成短生命周期的 STS 预签名 Bearer 令牌并封装为 Kubernetes ExecCredential JSON。

指定 IAM 角色签发令牌
aws-iam-authenticator token -i my-eks-cluster -r arn:aws:iam::123456789012:role/EksReadOnly

在生成 Kubernetes 认证令牌前先切换至最小权限 IAM 角色。

核心优势

  • + 原生无交互输出标准 Kubernetes ExecCredential JSON。
  • + 纯本地只读 STS 签名,支持 -i 集群绑定与 -r 角色扮演。
  • + 轻量级静态 Go 二进制,无运行时依赖。

注意事项与踩坑点

  • ! 执行 token 会在标准输出打印实时 Bearer 令牌,切勿将其写入对话记录或代码库。
  • ! 在常规 EKS 环境中,现在可直接用 aws eks get-token 替代而无需额外二进制。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI