Support workload identity federation for plugin credentials
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, azure, gcp, typescript
- Lĩnh vực
- authentication, backend-api-design, security
Hướng nghiên cứu
Start with packages/junior-plugin-api/src/manifest.ts, chat/pi/gateway-auth.ts, and the existing grantForEgress/issueCredential lease path referenced in the issue. Read how plugin credentials are declared and how host egress caches leases. The issue is done when plugins can declare a host-minted, refreshed federated credential with a configurable header and the stated security controls, with GCP as the first exchange provider.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Plugins cannot authenticate to services that need short-lived credentials issued to a workload, such as apps behind Google Cloud IAP. Vercel issues per-deployment OIDC tokens that GCP (and AWS/Azure) can trust through workload identity federation, so no long-lived cloud key is needed. Junior has no shared primitive for this.
Current behavior
- Manifest
credentialssupport onlyoauth-bearer(packages/junior-plugin-api/src/manifest.ts): a token from a host env var or per-user OAuth, injected for the listed domains.api-headersare static values with env refs. - Packaged plugins can issue short-lived header leases with
grantForEgress+issueCredential(the GitHub plugin does this). Host egress caches a lease until itsexpiresAt. - Core uses Vercel OIDC only for AI Gateway auth (
chat/pi/gateway-auth.ts) and for verifying sandbox egress requests. Plugins have no way to get the deployment's OIDC token, and there is no shared GCP token exchange.
Gap
- IAP needs a Google-signed credential that is valid for at most 1h. A static env token cannot work. The only option today is a JSON service account key in env, which is the long-lived secret that federation removes.
- Every plugin that needs this must rebuild Vercel OIDC → Google STS → IAM Credentials, with its own caching and security checks.
- Some upstreams use
Authorizationfor their own auth (Redash:Authorization: Key …). The proxy credential then has to go inProxy-Authorization, which IAP supports. Manifest credentials cannot choose the header today.
Capabilities identified in design discussion
- Host workload identity exchange: a plugin credential trades the deployment's Vercel OIDC token for a short-lived cloud credential. GCP first: STS exchange, then IAM Credentials (
signJwt,generateIdToken,generateAccessToken) on one named service account. - Declared in
plugin.yaml: a plugin such as Redash should need no code. Inputs: domains, workload identity provider audience, service account, token kind and audience (for example an IAP service-account JWT withaud: https://<host>/*), and target header. - Configurable target header, including
Proxy-Authorization, used alongside staticapi-headers. - Lease caching and refresh before expiry, through the existing egress lease path.
- Security invariants:
- Mint only on the host. Never expose the token to the sandbox or the model.
- No long-lived cloud keys.
- Document the provider attribute condition that limits trust to production deployments (
sub = owner:<team>:project:<project>:environment:production), because team members can pull development OIDC tokens locally. - Emit telemetry for each mint.
Motivating case
An internal Redash instance behind Google Cloud IAP. IAP accepts JWTs signed by a service account with aud set to the app URL, and accepts them in Proxy-Authorization (IAP programmatic auth). This works even when IAP uses the Google-managed OAuth client. Vercel documents the GCP federation setup in Connect to GCP.
via @dcramer.
--
- Ngôn ngữ chính
- TypeScript
- Star
- 397
- Fork
- 43
- Merge trung bình
- 8 giờ 28 phút
- Pull request đã merge (30 ngày)
- 764
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/junior
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/junior
Issue tương tự
-
area:tooling good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
interledger/publisher-tools#1007 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
databrickslabs/ontos#1420 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
vercel-labs/just-bash#756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ci good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
interledger/web-monetization-extension#1555 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[t-dialog] 弹窗组件和抽屉组件的文档说明不够详细清楚Đang mở🐞 bug 🧐 unconfirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Tencent/tdesign-vue-next#7056 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày