lyft / lyft/python-blessclient
Unintentional Identity file signing
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 117
- 派生
- 31
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi, while troubleshooting some unrelated problems I noticed this client is generated signed key certs for any identity that we use in the in the ssh command.
The culprit seems to be this:
https://github.com/lyft/python-blessclient/blob/master/blessclient/client.py#L171
called here:
https://github.com/lyft/python-blessclient/blob/master/blessclient/client.py#L448
Given an ssh config as recommended:
Match exec "env | grep -q BLESS_COMPLETE || /Users/stype/blessclient/blessclient.run --gui --host '%h'"
IdentityFile ~/.ssh/blessid
If we are to call any other ssh command as:
ssh -i ~/.ssh/mykey user@host
and we didn't have a filter on domain_regex: blessclient will still generate and sign the mykey key.
While I believe this could be in some case desired functionality(when doing ssh wrapping instead of ssh config), I think it might be better to just let it toggle via an env var or the existing BLESS_IDENTITYFILE as in most cases than not if you specify a particular identity on the command line, you want to use exactly that to auth and signing is unnecessary.
If this is accepted I can create a PR to cleanup/implement this.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 blessclient/client.py 的第 171 行和第 448 行开始,这里处理 identity 并调用 signing path。使用所示的 SSH 配置和带有 -i ~/.ssh/mykey 的 ssh 命令重现该行为,然后跟踪 BLESS_IDENTITYFILE 和 domain_regex 如何影响选择。当 client 不再对显式选择的 identity 进行签名,除非所选配置启用了该行为时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- authentication, security
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100