apache / apache/cloudstack

SSH key pairs are very buggy

Aperta
#12,925 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
component:UI
Lingua principale
Java
Stelle
3.1k
Fork
1.4k
Merge medio
6g 19h
PR unite (30g)
32

Descrizione

### 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia tracciando gli endpoint API che accettano o accedono ai nomi delle coppie di chiavi, quindi riproduci la coppia di chiavi contenente una virgola tramite la UI e i comandi deployVirtualMachine. Identifica tutti gli endpoint interessati e i relativi parametri keypair/keypairs esistenti. Il lavoro è completato quando i parametri array keypairId richiesti sono disponibili e i parametri basati sul nome sono contrassegnati come deprecated senza interrompere i workflow documentati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, backend-api-design
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
43/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.