KeyManagerImpl always taking the first client alias
@prbprbprb がすでに取り組んでいます。
2023年1月15日 から。
評価
この issue はまだ評価されていません。
説明
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];
}
- 主要言語
- Java
- スター
- 1.4k
- フォーク
- 332
- 平均マージ
- 2日 56分
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
google/conscrypt のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 3/5 半日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 49/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
google/conscrypt の issue をすべて見る
似ている issue
-
beginner difficulty: easy documentation good first issue hacktoberfest help wanted observability size/S up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
dmitriy-iliyov/spring-transactional-outbox#82 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RamazanKara/nightjar#264 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
netty/netty#18628 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
apache/flink-agents#1500 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
sylvainmetayer/planning-equipes#495 ·
メンテナーはふだん 1 日以内に返信