SslBundle integration with FeignClients
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
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java, spring-boot
Hướng nghiên cứu
Bắt đầu với các điểm vào cấu hình Feign client và so sánh cách tiếp cận SslBundles/SSLContext được nêu với RestTemplateBuilder.setSslBundle. Theo dõi cách các Feign client xây dựng Client của chúng và xác định nơi có thể chọn một SSL bundle. Được coi là hoàn thành khi FeignClients có thể sử dụng một SSL bundle Spring Boot đã được cấu hình, với hành vi và việc xử lý lỗi được kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Recently, in spring-boot 3.1, spring team introduced the SslBundles component as a convenient way to configure SSL connection to RestTemplate and RestClient.
As reference: https://spring.io/blog/2023/06/07/securing-spring-boot-applications-with-ssl
I similar approach would be interesting to exist in the spring-cloud-openfeign.
I am currently taking the following approach:
application.yml
spring:
ssl:
bundle:
jks:
secure-service:
key:
alias: "secure-service"
keystore:
location: "classpath:keystore.p12"
password: "myStrongPassword"
type: "PKCS12"
@Bean
@ConditionalOnProperty(prefix = "spring.ssl.bundle.jks.secure-service.key", name = "alias")
public Client feignClient(SslBundles sslBundles) throws Exception {
// "secure-service" is defined in application properties
try {
SslBundle sslBundle = sslBundles.getBundle("secure-service");
SSLContext sslContext = sslBundle.createSslContext();
log.info("Configuring SSL Context for FeignClient");
return new Client.Default(sslContext.getSocketFactory(), new DefaultHostnameVerifier());
} catch (NoSuchSslBundleException ex) {
log.error("SSLContext not provided. Creating FeignClient without sslContext.");
throw new IllegalStateException("spring.ssl.bundle.jks.secure-service.key.alias not configure correctly. Please change your application properties, yml or environment configuration.");
}
}
I proposed approach would be similar to this:
@Bean
public restTemplate(RestTemplateBuilder restTemplateBuilder, SslBundles sslBundles) {
this.restTemplate = restTemplateBuilder.setSslBundle(sslBundles.getBundle("secure-service")).build();
}
Further reference: https://www.baeldung.com/spring-boot-security-ssl-bundles
- Ngôn ngữ chính
- Java
- Star
- 1.3k
- Fork
- 835
- Merge trung bình
- 23 giờ 57 phút
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọ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 spring-cloud/spring-cloud-openfeign
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
spring-cloud/spring-cloud-openfeign#1392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FeignClientsConfiguration$MicrometerConfiguration.class cannot be opened because it does not existĐang mởfeedback-provided
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
spring-cloud/spring-cloud-openfeign#1379 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
waiting-for-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
spring-cloud/spring-cloud-openfeign#1344 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
waiting-for-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
spring-cloud/spring-cloud-openfeign#1343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
waiting-for-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
spring-cloud/spring-cloud-openfeign#1340 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của spring-cloud/spring-cloud-openfeign
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Dans-Plugins/Medieval-Roleplay-Engine#384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
:Search Relevance/Vectors >test-failure needs:risk Team:Search Relevance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
elastic/elasticsearch#163668 · 3 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Controller está sem anotaçãoĐang mởbug critical
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
agent:working bug follow-up lane:auto
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Sanne/incus-spawn#1765 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày