apache / apache/cloudstack

SSH key pairs are very buggy

オープン
#12,925 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
component:UI
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
32

説明

### problem

Having the ssh key pairs being identified by their name leads to a lot of weird issues.

1. The key pair validator allows commas(and other special characters like an ampersand) in the key pair name.
2. The `deployVirtualMachine` command `keypairs` parameter isn't escaped, this breaks on key pairs containing commas.
4. The `deployVirtualMachine` command `keypair` works with commas
5. The UI breaks when a key pair contains commas, below is a single key containing a bunch of commas Image
6. If the API consumer assumes the key pair name is safe and validated by cloudstack it *cloud* lead to a command injection(but it requires a lot of wrong assumptions)

### versions

CloudStack 4.22.0.0

### The steps to reproduce the bug

You can use the UI to observe most of the issues:
1. Create a new key pair with a comma in the name eg. `test, test`
2. Try creating a new instance with said key

### What to do about it?

1. Add a new `keypairId` array parameter to all the endpoint which access key pair name.
2. Mark the `keypair` and `keypairs` parameters deprecated.

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

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

調査の方向性

まず、キーペア名を受け付ける、またはキーペア名にアクセスする API エンドポイントを追跡し、次に UI と deployVirtualMachine コマンドを通じて、カンマを含むキーペアを再現します。影響を受けるすべてのエンドポイントと、そこに既存する keypair/keypairs パラメータを特定します。必要な keypairId 配列パラメータが利用可能になり、名前ベースのパラメータが deprecated としてマークされ、ドキュメント化されたワークフローを壊さないことが完了の条件です。

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

評価

技術スタック
java
領域
api, backend-api-design
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
43/100

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

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