nacos开启权限认证
不开启会出现身份认证绕过漏洞,可通过post请求随意添加nacos账户
-
版本信息:
nacos:2.0.3 spring-cloud-alibaba-dependencies:2.2.5.RELEASE
-
启动nacos时,添加运行参数配置,开启权限认证,具体参数可以看这里https://github.com/nacos-group/nacos-docker:
NACOS_AUTH_ENABLE=true
-
springboot配置文件添加nacos账户和密码:
spring.cloud.discovery.username: nacos spring.cloud.discovery.password: nacos spring.cloud.config.username: nacos spring.cloud.config.password: nacos spring.cloud.config.contextPath: /nacos