[enhancement] github runner: support just-in-time (JIT) runner configuration
维护者通常 4 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
调研方向
Read the self-hosted runner documentation linked in the issue and trace the --install-ghactions-runner CLI options and the code that generates runner user data. Check how existing token, App and PAT options are validated and how runner startup differs across platforms. Done means the JIT config file option starts a one-job ephemeral runner, conflicting options return an error, and registration tokens do not appear in user data or Pulumi state.
由索引模型根据 Issue 内容生成。
描述
Problem
Reading https://github.com/redhat-developer/mapt/blob/main/docs/self-hosted-runner.md, the GitHub runner is registered with a registration token written into the instance's cloud-init user data (config.sh --token … --replace). That token is valid for one hour and isn't bound to one runner. Any process on the host can read it from the instance metadata service, and so can anyone with access to the cloud account or the Pulumi state. Within the hour, they can register other runners on the same repository or organization, with any name and labels, or replace an existing runner of the same name.
This matters when the jobs on the runner aren't fully trusted, or when the cloud account and the GitHub organization belong to different parties.
Proposal
Support GitHub's just-in-time (JIT) runners (REST API, security hardening guide). A JIT config registers exactly one ephemeral runner, whose name, labels and runner group are set by whoever generated it. It can't register another runner, and it's useless once consumed.
- Add
--ghactions-runner-jitconfig-file <path>: a JIT config generated by the caller, read from a file so it stays out of process listings. It excludes the token, App and PAT options, and--ghactions-runner-labels/--ghactions-runner-ephemeral(the config sets them). - With it, the snippets start the runner with
run.sh --jitconfig <config>instead ofconfig.sh, on every platform. - Optionally, with
--ghactions-app-*, mapt generates a JIT config itself instead of a registration token, so App users get the same benefit.
Related: #851.
Acceptance
mapt aws rhel create --install-ghactions-runner --ghactions-runner-jitconfig-file jit.txt …brings up a runner that takes one job and is then removed by GitHub.- No registration token appears in the user data or the Pulumi state.
- Combining the option with a token, App or PAT option exits with an error.
- 主要语言
- Go
- 星标
- 25
- 派生
- 41
- 平均合并
- 5 天 3 小时
- 30 天内合并 PR
- 16
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redhat-developer/mapt 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
redhat-developer/mapt#972 ·
维护者通常 4 天内回复
-
Host/username secret values contain trailing newlines, sanitization fix breaks SSH key可能重新可做 @abdulazeem-tk4vr 于 153 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
redhat-developer/mapt#817 · 12 条评论 ·
维护者通常 4 天内回复
-
openshift-snc: align cluster ingress domain with the nip.io access domain (crc.testing split-brain)未关闭
难度 5/5 一周以上 新手友好度 25/100
redhat-developer/mapt#968 · 1 个 reaction ·
维护者通常 4 天内回复
-
enhancement provider/IBMCLOUD
难度 4/5 3-5 天 新手友好度 25/100
redhat-developer/mapt#955 ·
维护者通常 4 天内回复
-
[bug] ibm-power: job containers run at MTU 1500 on a 1450 network可能重新可做 @atishay-kasliwal 于 7 天前认领,目前没有进行中的 PR。 未关闭bug provider/IBMCLOUD
难度 4/5 3-5 天 新手友好度 35/100
redhat-developer/mapt#954 · 2 条评论 ·
维护者通常 4 天内回复
查看 redhat-developer/mapt 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
automated documentation maintenance
难度 1/5 1-3 小时 新手友好度 75/100
github/gh-aw-mcpg#16717 ·
维护者通常 1 天内回复
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deleted未关闭internal
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
jesseduffield/lazygit#6229 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
prometheus/prometheus#20482 ·
维护者通常 2 天内回复