简体   繁体   English

Spring Boot 1.5中的运行状况端点无法通过HTTPS工作

[英]Health endpoint not working over HTTPS in Spring Boot 1.5

I recently updated the version of Spring Boot in my application from 1.4 to 1.5.1 and I noticed that the healtch check started to fail after deployment to Elastic Beanstalk on AWS. 我最近将应用程序中的Spring Boot版本从1.4更新到1.5.1,我注意到在部署到AWS上的Elastic Beanstalk之后,健康检查开始失败。

In our AWS environments, all communication is over HTTPS including health and it used to work fine with Spring Boot and Actuator 1.4 but we started to get 401 on the actuator health endpoint in verson 1.5. 在我们的AWS环境中,所有通信都是通过HTTPS进行的,包括运行状况,它过去可以与Spring Boot和Actuator 1.4正常工作,但是在Verson 1.5中,我们开始在执行器运行状况端点上获得401。

Does anyone have same problem? 有人有同样的问题吗? Not sure what changed in this release relating this topic but I have not found any solution by reading release notes. 不确定此发行版中与该主题相关的更改,但是我没有通过阅读发行说明找到任何解决方案。 Would be glad for any help. 希望得到任何帮助。

Nothing to do with https. 与https无关。

Since 1.5.1 health points are by default secure, which is why you are getting 401's. 由于默认情况下1.5.1健康点是安全的,所以这就是为什么获得401的原因。

It's in the release notes: 在发行说明中:

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.5-Release-Notes https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-1.5-Release-Notes

"Actuator "sensitive" endpoints are now secure by default (even if don't have a dependency on "Spring Security"). If your existing Spring Boot 1.4 application makes use of Spring Security (and doesn't have any custom security configuration) things should work as before. If your existing Spring Boot 1.4 application has custom security configuration and you wish to have open access to your sensitive endpoints, you will need to explicitly configure that in your security configuration. If you're upgrading a Spring Boot 1.4 application that doesn't have dependency on Spring Security and you wish to retain open access to your sensitive endpoints you'll need to set management.security.enabled to false. See the updated reference documentation for more details." 现在,默认情况下,“执行器“敏感”端点是安全的(即使不依赖于“ Spring Security”)。如果您现有的Spring Boot 1.4应用程序使用了Spring Security(并且没有任何自定义安全配置)如果您现有的Spring Boot 1.4应用程序具有自定义安全配置,并且希望对敏感端点具有开放访问权限,则需要在安全配置中显式配置它。如果要升级Spring Boot 1.4,不依赖于Spring Security的应用程序,并且您希望保留对敏感端点的开放访问权限,则需要将management.security.enabled设置为false。有关更多详细信息,请参阅更新的参考文档。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM