Should we make SslOptions be more explicit about where it loads certifications?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
先阅读第 245 行附近的 SslOptions.java,跟踪当前如何解析证书路径。将 issue 中明确的 classpath 和 file URI 情况与现有的 fallback 行为进行比较,然后确认预期的兼容性规则,并为已达成一致的解析路径添加覆盖。
由索引模型根据 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 小时
- 30 天内合并 PR
- 20
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jooby-project/jooby 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
jooby-project/jooby#4021 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
jooby-project/jooby#3521 · 2 条评论 ·
维护者通常 1 天内回复
-
question
难度 4/5 3-5 天 新手友好度 35/100
jooby-project/jooby#1513 · 10 条评论 ·
维护者通常 1 天内回复
查看 jooby-project/jooby 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
oracle/graalvm-reachability-metadata#11472 ·
维护者通常 1 天内回复
-
status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 70/100
spring-projects/spring-ai#7269 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 89/100
objectionary/hone-maven-plugin#1353 ·
维护者通常 9 天内回复
-
ClassNotFoundException: io.netty.channel.kqueue.KQueueEventLoop stack trace printed during native build on main (Netty 4.2 removed the class)可能已有人在做 @gastaldi 今天认领。 未关闭area/netty kind/bug
难度 2/5 1-3 小时 新手友好度 68/100
quarkusio/quarkus#57939 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
conductor-oss/conductor#1777 ·
维护者通常 4 天内回复