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编码]
相关推荐
头发还没掉光光22 分钟前
Linux网络之IP协议
linux·运维·网络·c++·tcp/ip
一个平凡而乐于分享的小比特1 小时前
Linux内核中的container_of宏详解
linux·container_of
csdn_aspnet8 小时前
TCP/IP协议栈深度解析:从基石到前沿
服务器·网络·tcp/ip
lcreek8 小时前
Linux信号机制详解:阻塞信号集与未决信号集
linux·操作系统·系统编程
shandianchengzi8 小时前
【记录】Tailscale|部署 Tailscale 到 linux 主机或 Docker 上
linux·运维·docker·tailscale
John Song9 小时前
Linux机器怎么查看进程内存占用情况
linux·运维·chrome
sichuanwuyi9 小时前
Wydevops工具的价值分析
linux·微服务·架构·kubernetes·jenkins
持戒波罗蜜9 小时前
ubuntu20解决intel wifi 驱动问题
linux·驱动开发·嵌入式硬件·ubuntu
不做无法实现的梦~10 小时前
使用ros2来跑通mid360的驱动包
linux·嵌入式硬件·机器人·自动驾驶
梁辰兴10 小时前
计算机网络基础:虚拟专用网
服务器·网络·计算机网络·vpn·虚拟专用网·计算机网络基础·梁辰兴