KeyManagerImpl always taking the first client alias
@prbprbprb ya está trabajando en esto.
Desde el 15/1/2023.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
In KeyManagerImpl the logic that chooses a client alias in method chooseClientAlias always takes the first client alias. For my use case, I am using the KeyManagerImpl for MTLS communication to the backend.
My scenario is that I have 2 keypairs in my KeymManager keystore. One of the keypair's certificate is about to be expired, so i created a new keypair and both of these keypairs are signed by the same CA, thus when talking to my backend the same Principal Names are return when chooseClientAlias is invoked.
Now the problem comes when the backend removes the expired leaf certificate, but chooseClientAlias still will choose the keypair with the expired certificate and an http 403 will occur despite my keystore having both the expired and the non-expired keypairs.
this happens because of the below
@Override
public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
final String[] al = chooseAlias(keyTypes, issuers);
return (al == null ? null : al[0]);
}
Conscrypt KeyManagerImpl will just take the first alias no matter what. Can there be some form of deterministic behaviour where the array of aliases be sorted first b4 returning like below? By doing this i can somehow decide which keypair is used first when creating the keystore.
@Override
public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
final String[] al = chooseAlias(keyTypes, issuers);
if (al == null) return null;
Arrays.sort(al);
return al[0];
}
- Lenguaje dominante
- Java
- Estrellas
- 1.4k
- Forks
- 332
- Merge medio
- 2 d 56 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de google/conscrypt
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
Dificultad 3/5 Medio día Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 49/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
Todos los issues de google/conscrypt
Issues similares
-
beginner difficulty: easy documentation good first issue hacktoberfest help wanted observability size/S up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
dmitriy-iliyov/spring-transactional-outbox#82 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
RamazanKara/nightjar#264 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
netty/netty#18628 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
apache/flink-agents#1500 ·
Los mantenedores suelen responder en 1 día
-
bug frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
sylvainmetayer/planning-equipes#495 ·
Los mantenedores suelen responder en 1 día