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编码]
相关推荐
我爱加班、、6 分钟前
new Map()+Array.from()整理elementPlus的级联器数据
linux·前端·javascript
豆是浪个14 分钟前
Linux(Centos 7.6)命令详解:top
linux·运维·服务器
历程里程碑37 分钟前
Linxu14 进程一
linux·c语言·开发语言·数据结构·c++·笔记·算法
baidu_huihui1 小时前
`sudo DNF` 是 Linux 系统中以管理员权限执行 DNF 包管理命令的标准方式
linux·dnf
峥嵘life1 小时前
Android 16 EDLA测试STS模块
android·大数据·linux·学习
代码AC不AC1 小时前
【Linux】进程程序替换
linux·进程·程序替换
Zach_yuan1 小时前
UDP网络编程:从入门到精通
linux·网络·网络协议·udp
_叶小格_2 小时前
cp、scp、rsync命令详解
linux·运维·服务器·ubuntu·centos·运维开发
凯子坚持 c2 小时前
Qt常用控件指南(7)
服务器·数据库·qt
wheeldown2 小时前
【Linux网络编程】 Linux TCP网络编程:客户端开发+守护进程实战
linux·网络·tcp/ip