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编码]
相关推荐
Nimsolax28 分钟前
Linux网络Socket编程TCP
linux·网络·tcp/ip
SUPER52664 小时前
FastApi项目启动失败 got an unexpected keyword argument ‘loop_factory‘
java·服务器·前端
一只小bit5 小时前
MySQL 库的操作:从创建配置到备份恢复
服务器·数据库·mysql·oracle
利刃大大5 小时前
【高并发服务器】二、时间轮定时器设计与实现
服务器·项目·cpp·高并发服务器
青草地溪水旁7 小时前
linux信号(14)——SIGALRM:从“手机闹钟”看SIGALRM:进程的非阻塞定时神器
linux·信号机制
心灵宝贝7 小时前
libopenssl-1_0_0-devel-1.0.2p RPM 包安装教程(openSUSE/SLES x86_64)
linux·服务器·数据库
BullSmall8 小时前
linux zgrep命令介绍
linux·运维
emma羊羊9 小时前
【文件读写】图片木马
linux·运维·服务器·网络安全·靶场
wdfk_prog10 小时前
闹钟定时器(Alarm Timer)初始化:构建可挂起的定时器基础框架
java·linux·数据库
2301_8184115510 小时前
Ubuntu之apt更新源
linux·运维·ubuntu