Skip to content

docs: deploy identity mode guide (CI-only / Permissive as first-class modes) - #207

Merged
h13 merged 4 commits into
mainfrom
docs/193-deploy-identity-modes
Dec 2, 2026
Merged

h13 merged 4 commits into
mainfrom
docs/193-deploy-identity-modes

Conversation

@h13

@h13 h13 commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Closes #193

変更内容

  • docs/secret-manager*.md: 新章「Deploy Identity Modes: CI-only vs Permissive」を追加
    • 差分表(「secret を読める主体」= CI-only: GitHub は main 上の cd.yml(workflow_run 起動)から実行された deploy 環境ジョブのみ / GitLab は保護 ref 上の deploy 環境ジョブのみ)
    • CI-only 必須要件 1–4: ① WIF --attribute-condition(workflow_run + workflow_ref=main の cd.yml + environment。GitLab は ref_protected + environment)と environment 属性への grant、② 両 environment の deployment branch policy(main のみ、feat: init.sh で production / development environment の保護設定(required reviewers / prevent self-review)を行うオプション #203 の --branch-policy 参照)、③ dev/main ブランチ保護の org 全体強制(代替: fleet 専用 org に信頼を限定)、④ WIF 必須(legacy CLASPRC_JSON は不適合)
    • 検証手順: dev/prod の成功 2 ケース + 失敗すべき 5 ケース(フィーチャーブランチ、environment 宣言、on:push、改変 cd.yml、フリート外リポの environment 自動作成)
    • §3a/§4 に Permissive 形である旨の注記、§5 を「人間へのアクセス付与」(CI-only: 管理者のみ / Permissive: 開発者グループ)に改訂
    • Open Question(workflow_run の OIDC claim 実機未確認)を docs 内に明記
  • scripts/fetch-clasp-credentials.sh: ヘッダ・usage を管理者 / Permissive mode 用と明記し、実行時に「共有デプロイ ID のトークンである。通常の開発には init-sandbox.sh を」と stderr に表示
  • README*.md: Organization Setup の step 3・5 をモード別に更新
  • cd.yml / .gitlab/cd.yml: post-deploy hook の前に ~/.clasprc.json / .clasp.json を削除(hook は head_branch のコードを実行するため共有トークンを渡さない)

依存

Test plan

  • actionlint が cd.yml を pass
  • .gitlab/cd.yml の YAML パース OK
  • bash -n scripts/fetch-clasp-credentials.sh OK
  • (マージ後・実機)CI-only 検証手順の success 2 ケース / failure 5 ケースを org で確認(docs の「Verifying the CI-only boundary」)

@h13
h13 force-pushed the docs/193-deploy-identity-modes branch 2 times, most recently from 08bad47 to a1c2275 Compare December 2, 2026 10:45
@h13
h13 force-pushed the docs/193-deploy-identity-modes branch from a1c2275 to 1ccea64 Compare December 2, 2026 11:17
@h13
h13 merged commit b8d1f28 into main Dec 2, 2026
12 checks passed
@h13
h13 deleted the docs/193-deploy-identity-modes branch December 2, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: デプロイ ID の運用モード選択ガイド(CI-only / Permissive を対等な一級構成に)

1 participant