aws-samples / aws-samples/sample-autonomous-cloud-coding-agents

feat(security): principal-to-repo authorization

オープン
#476 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement orchestration security
主要言語
TypeScript
スター
146
フォーク
46
平均マージ
3日 10時間
マージ済み PR(30日)
24

説明

**Context:** ROADMAP.md → Credentials and authorization → Principal-to-repo authorization
**Related:** #249, #389 (mentions principal-to-repo when available)

---

## Component

API or orchestration

## Describe the feature

Map Cognito identities (and future auth principals) to allowed repository sets so users can only submit tasks, webhooks, and channel triggers against repos they are authorized to access. Enforce at task creation and admission time (fail-closed).

## Use case

Multi-user deployments cannot rely on shared PATs or implicit trust. Operators need tenant isolation: Alice may trigger work on `org/frontend` but not `org/payments-core`. Without this, any authenticated user with API access can target any onboarded repo.

## Proposed solution

1. Add a `PrincipalRepoAccess` (or equivalent) store: principal identity → allowed `repo` patterns or explicit repo IDs.
2. Validate in `createTaskCore` / webhook processors / channel adapters before hydration.
3. Admin/operator APIs or CDK Blueprint hooks to manage mappings per team.
4. Return `403 REPO_NOT_AUTHORIZED` with clear CLI messaging.
5. Document operator setup in user/developer guides.

## Other information

- Complements per-session IAM scoping (#209) and identity propagation (#249).
- Scheduled triggers (#389) should inherit the same authorization model.
- Design context: `docs/design/SECURITY.md`, `docs/design/API_CONTRACT.md`.

- [ ] This might be a breaking change

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず docs/design/SECURITY.md と docs/design/API_CONTRACT.md を読み、続いて createTaskCore、webhook プロセッサ、チャネルアダプターを追跡します。スケジュールされたトリガーを含め、hydration 前に principal とリポジトリのマッピングをどのように管理し、適用するかを定義します。未承認のアクセスが 403 REPO_NOT_AUTHORIZED で fail closed し、CLI メッセージが明確で、オペレーター向けのセットアップが文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, typescript
領域
api, authentication, authorization, backend, security
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。