The package mirror's address reaches every app, so a token in it leaks
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- go, kubernetes
调研方向
Start with validMirrorURL in internal/config/config.go and trace how the mirror address reaches internal/pixienv/pixienv.go and the config written in internal/cli/podcmd/runner.go. Then review the proposed auth Secret and install-step mount design, along with the mirror documentation; done means credentials stay out of the app environment and readable config, with tests covering rejected query strings and fragments.
由索引模型根据 Issue 内容生成。
描述
The package mirror's address still reaches every user's app, so a secret written into it leaks.
validMirrorURL refuses a user name or password, but a token anywhere else in the address passes, for example https://mirror.example.com/conda-forge?token=SECRET, https://mirror.example.com/t/SECRET/conda-forge (conda's own token form) or https://mirror.example.com/conda-forge#SECRET:
https://github.com/nebari-dev/tapas/blob/cc65f01120dbcf3efc76386b18a0ecc07e20cc93/internal/config/config.go#L1278-L1280
The full address is then put in the app container's environment as TAPAS_PIXI_MIRROR, which the person's own code can read:
https://github.com/nebari-dev/tapas/blob/cc65f01120dbcf3efc76386b18a0ecc07e20cc93/internal/pixienv/pixienv.go#L394-L396
and in /etc/pixi/config.toml, written world-readable (0644) and mounted into the app:
https://github.com/nebari-dev/tapas/blob/cc65f01120dbcf3efc76386b18a0ecc07e20cc93/internal/cli/podcmd/runner.go#L113
Reproduced on a local cluster with a user name and password before that check existed: inside the app, echo $TAPAS_PIXI_MIRROR printed the password.
Proposed fix: keep the mirror's address public and its credentials apart.
- Refuse a query string and a fragment in the address, as a user name or password is refused now. A token in the path cannot be detected, so the docs say the address must hold no secret.
- Credentials in a Secret named by a new setting (for example
environments.mirror.authSecret): pixi's auth file, mounted read-only (0400) in the install step only, never in the app. - Keep
TAPAS_PIXI_MIRRORout of the app container; the install step can keep it./etc/pixi/config.tomlcan stay readable once it holds only the public address. - Document mirrors that need a login, and that a person's own
pixi addin the app does not get the mirror's credentials.
Follow-up from #63 and #65.
- 主要语言
- Go
- 星标
- 5
- 派生
- 0
- 平均合并
- 21 小时 13 分钟
- 30 天内合并 PR
- 53
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nebari-dev/tapas 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
nebari-dev/tapas#124 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
nebari-dev/tapas#121 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
nebari-dev/tapas#32 ·
维护者通常 1 天内回复
-
Suggest saving a memory when a chat message holds something worth remembering可能已有人在做 @jbouder 今天认领。 未关闭
难度 5/5 一周以上 新手友好度 25/100
nebari-dev/tapas#137 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 54/100
nebari-dev/tapas#136 ·
维护者通常 1 天内回复
相似的 Issue
-
area: pipeline priority: low type: bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
prime-radiant-inc/evener#8335 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
-
ui: OnTextKey on SearchField never sees keys (it does not reach the inner input)可能已有人在做 @szluyu99 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100