[英]Spring boot container With truststore in Azure App Service
I have a legacy spring boot Application that uses a common library that injects a RestTemplate which is default configured to make some HTTPS calls, Meaning it is always looking for a trust-store in the classpath.我有一个旧版 spring 引导应用程序,它使用一个通用库,该库注入一个 RestTemplate,默认配置为进行一些 HTTPS 调用,这意味着它总是在类路径中寻找信任库。 Spring boot by default needs a key store when we enable trust-store
Spring 启动默认需要密钥库,当我们启用信任库时
I successfully containerized and deployed this app in the App service however App service is failing with the below error我成功地将这个应用程序容器化并部署在应用程序服务中,但是应用程序服务失败并出现以下错误
Bad Request This combination of host and port requires TLS.
错误请求 主机和端口的这种组合需要 TLS。
Most of the comments out there suggest App service containers need to run on HTTP with port 80 and not HTTPS.大多数评论表明应用服务容器需要在 HTTP 上运行,端口为 80,而不是 HTTPS。
Questions问题
Any help is appreciated任何帮助表示赞赏
If I am reading this correctly you are looking to do outbound SSL with a trust store.如果我没看错,您正在寻找使用信任存储的出站 SSL。 If you store your trust store certificate in Azure Key Vault you can use the Azure Key Vault Certificate Spring Boot starter to accomplish what you need.
如果您将信任存储证书存储在 Azure Key Vault 中,您可以使用 Azure Key Vault Certificate Spring Boot starter 来完成您需要的操作。
See https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-starter-keyvault-certificates/README.md#client-side-ssl请参阅https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/azure-spring-boot-starter-keyvault-certificates/README.md#client-side-ssl
Here is the detailed answers from Microsoft community这是来自微软社区的详细答案
https://docs.microsoft.com/en-us/answers/questions/666261/spring-boot-container-with-truststore-in-azure-app.html https://docs.microsoft.com/en-us/answers/questions/666261/spring-boot-container-with-truststore-in-azure-app.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.