Nacos 2.2.1启动报错

错误信息:

The specified key byte array is 248 bits which is not secure enough

for any JWT HMAC-SHA algorithm. The JWT JWA Specification (RFC 7518,

Section 3.2) states that keys used with HMAC-SHA algorithms MUST have

a size >= 256 bits (the key size must be greater than or equal to the

hash output size). See

https://tools.ietf.org/html/rfc7518#section-3.2 for more information.

翻译如下:

指定的密钥字节数组是248位,这对于任何JWT HMAC-SHA算法来说都不够安全。JWT JWA规范(RFC

7518,第3.2节)规定,与HMAC-SHA算法一起使用的密钥必须具有>=256位的大小(密钥大小必须大于或等于哈希输出大小)。看见https://tools.ietf.org/html/rfc7518#section-3.2了解更多信息。

解决办法:

修改 Nacos/config 文件夹里面 application.properties 文件,在大约第156行:

yaml 复制代码
### The default token (Base64 String):
nacos.core.auth.plugin.nacos.token.secret.key= [建议50位以上base64编码]
相关推荐
小麦嵌入式1 小时前
Linux驱动开发实战(六):设备树升级!插件设备树点灯!
linux·c语言·驱动开发·单片机·嵌入式硬件·mcu·ubuntu
shangxianjiao2 小时前
nacos安装,服务注册,服务发现,远程调用3个方法
java·nacos·springboot
tpoog2 小时前
MySQL:数据库基础
linux·c语言·开发语言·数据库·redis·mysql
阿正的梦工坊3 小时前
Linux top 命令详解:从入门到高级用法
linux·服务器·网络
单车少年ing3 小时前
stressapptest交叉编译(ARM64)
linux·arm64
遇见火星3 小时前
docker-compose 快速搭建日志平台
linux·运维·centos
.m3 小时前
Linux怎样源码安装Nginx
linux·运维·nginx
weixin_433431443 小时前
centos【rockylinux】安装【supervisor】的注意事项【完整版】
linux·运维·centos
Lightning_20173 小时前
软考中级-数据库-5.3-Internet基础知识
linux·网络·数据库·职场和发展
Akamai中国3 小时前
应用商店上新:Couchbase Enterprise Server集群
运维·服务器·sql·云原生·云计算·云服务