SSH key pairs are very buggy
- Lenguaje dominante
- Java
- Estrellas
- 3.1k
- Forks
- 1.4k
- Merge medio
- 6 d 19 h
- PR fusionados (30 d)
- 32
Descripción
### 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
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.
Guía de contribución
Línea de trabajo
Comienza rastreando los endpoints de la API que aceptan o acceden a nombres de pares de claves y, a continuación, reproduce el par de claves que contiene una coma mediante la UI y los comandos deployVirtualMachine. Identifica todos los endpoints afectados y sus parámetros keypair/keypairs existentes. Se considera terminado cuando los parámetros de array keypairId requeridos estén disponibles y los parámetros basados en nombres estén marcados como deprecated sin romper los workflows documentados.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- api, backend-api-design
- Tipo de issue
- Error
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 43/100