Should we make SslOptions be more explicit about where it loads certifications?
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
Hướng nghiên cứu
Bắt đầu bằng cách đọc SslOptions.java quanh dòng 245 và theo dõi cách các đường dẫn chứng chỉ hiện được phân giải. So sánh các trường hợp classpath và file URI tường minh trong issue với hành vi fallback hiện có, sau đó xác nhận các quy tắc tương thích dự kiến và bổ sung coverage cho các đường dẫn phân giải đã thống nhất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Java
- Star
- 1.8k
- Fork
- 207
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jooby-project/jooby
-
Rainbow Gum logging moduleĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
jooby-project/jooby#4021 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Jooby CLI to SDKMANĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
jooby-project/jooby#3521 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
jooby-1.x are brokenĐang mởquestion
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
jooby-project/jooby#1513 · 10 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của jooby-project/jooby
Issue tương tự
-
status: waiting-for-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
spring-projects/spring-framework#37614 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
azure-spring azure-spring-aad Client
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/azure-sdk-for-java#51046 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
helm-knative-apply.sh fails with Helm 4Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea: triage theme: undefined
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
jhipster/generator-jhipster#35895 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
oracle/graalvm-reachability-metadata#11659 ·
Maintainer thường phản hồi trong vòng 1 ngày