Should we make SslOptions be more explicit about where it loads certifications?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず245行目付近の SslOptions.java を読み、証明書パスが現在どのように解決されているかをたどります。issue に記載されている明示的な classpath と file URI のケースを既存のフォールバック動作と比較し、そのうえで想定される互換性ルールを確認し、合意した解決パスのカバレッジを追加します。
索引モデルが issue の本文から書いたものです。
説明
I'm not sure I like the default fallback behavior here:
Instead I recommend something more like:
static InputStream getResource(
String path)
throws FileNotFoundException, IOException {
URI uri = URI.create(path);
/*
* Explicit
*/
if ("classpath".equals(uri.getScheme())) {
var classpath = uri.getPath();
if (classpath == null) {
throw new FileNotFoundException(path);
}
return getClasspathResource(classpath);
}
if ("file".equals(uri.getScheme())) {
return Files.newInputStream(Path.of(uri));
}
/*
* Implicit
*/
Path filepath = Paths.get(path);
if (Files.exists(filepath)) {
// absolute file:
return Files.newInputStream(filepath);
}
// Maybe do not do this
return getClasspathResource(path);
}
This is where classpath:/// and file:/// can be explicitly used and then if that is not used we do the original behavior with the eventual goal of not doing the classpath unless it has the classpath uri schema.
The reason is assume I package a certification in the classpath. It works normally. Then someone adds a classpath on the filesystem when I go deploy. It now overrides the classpath one.
Now I admit this is unlikely and if this was not certs I could care less but I think we should not go around sniffing for certs. It also seems more inline with how we no longer use the service loader. That is less implicit behavior.
Otherwise I mostly don't care but just think this is the right thing to do.
- 主要言語
- Java
- スター
- 1.8k
- フォーク
- 207
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jooby-project/jooby のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
jooby-project/jooby#4021 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
jooby-project/jooby#3521 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
jooby-1.x are brokenオープンquestion
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
jooby-project/jooby#1513 · コメント 10 件 ·
メンテナーはふだん 1 日以内に返信
jooby-project/jooby の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
quarkiverse/quarkus-google-cloud-services#1188 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
opendataloader-project/opendataloader-pdf#851 ·
メンテナーはふだん 1 日以内に返信
-
Component: Frontend Component: Web Component Type: Maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
it-at-m/refarch-templates#1944 ·
メンテナーはふだん 2 日以内に返信
-
3.0.0-M*: every channel stays reachable from its session's KEX listeners, so a long-lived session leaks all closed channels対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信