You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Argo Workflow集成Azure AD SSO后GetInfo/GetUserInfo报403权限错误

解决Argo Workflows SSO登录403权限拒绝问题

核心问题

你开启了SSO的RBAC功能,但未配置用户/AD组到Kubernetes ServiceAccount的映射规则,导致Argo Server无法将登录用户与对应的权限绑定,触发no service account rule matches错误。

解决方案步骤

1. 补充SSO RBAC映射配置

在你的Argo Server SSO配置中添加scopes和rules字段,用于关联Azure AD用户/组到ServiceAccount:

sso:
  clientId:
    name: argo-sso-secrets
    key: client-id
  clientSecret:
    name: argo-sso-secrets
    key: client-secret
  issuer: MY_ISSUER_URL
  redirectUrl: https://argo-workflows.com/oauth2/callback
  rbac:
    enabled: true
    # 添加以下配置
    scopes:
      - email
      - groups
    rules:
      # 示例1:匹配特定Azure AD组,映射到argo-admin ServiceAccount
      - groups:
          - "your-azure-ad-admin-group-id" # 替换为你的AD组ID
        serviceAccount:
          name: argo-admin
          namespace: argo
      # 示例2:匹配指定域名邮箱用户,映射到argo-user ServiceAccount
      - email: "*@your-domain.com"
        serviceAccount:
          name: argo-user
          namespace: argo
extraArgs:
  - --auth-mode=sso

2. 创建并配置对应的ServiceAccount及权限

确保映射规则中指定的ServiceAccount存在,并绑定合适的权限:

创建ServiceAccount(以argo-admin为例)

apiVersion: v1
kind: ServiceAccount
metadata:
  name: argo-admin
  namespace: argo

绑定ClusterRole(授予管理员权限)

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: argo-admin-binding
subjects:
  - kind: ServiceAccount
    name: argo-admin
    namespace: argo
roleRef:
  kind: ClusterRole
  name: argo-workflows-admin # Argo默认提供的管理员ClusterRole
  apiGroup: rbac.authorization.k8s.io

3. 验证Azure AD Token包含所需Claims

确保你的Azure AD应用注册配置了返回email和groups声明:

  • 在Azure Portal的应用注册中,进入令牌配置,添加并启用ID令牌和访问令牌的对应声明。
  • 可通过Azure AD的OIDC元数据地址(https://login.microsoftonline.com/{tenant-id}/v2.0/.well-known/openid-configuration)确认支持所需scopes。

验证配置

更新Helm配置后重新部署Argo Server:

helm upgrade argo-workflows argo/argo-workflows -n argo -f your-values.yaml

登录后检查Argo Server日志,若不再出现no service account rule matches错误,说明配置生效。

内容的提问来源于stack exchange,提问作者Aman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.27 21:12:47