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编码]
相关推荐
the_fat_bird3 分钟前
ubuntu install nvidia gpu driver
linux·运维·ubuntu
IMPYLH21 分钟前
Linux 的 tac 命令
linux·运维·服务器·bash
计算机安禾25 分钟前
【Linux从入门到精通】第50篇:专栏总结与Linux学习之路的未来展望
linux·运维·学习
zhouwy11326 分钟前
Linux 内核学习笔记:从零搭建内核开发与调试环境
linux
GottdesKrieges32 分钟前
OceanBase备份常见问题
linux·网络·oceanbase
白菜欣1 小时前
Linux —进程概念
linux·运维·服务器
iuu_star1 小时前
Vue+FastAPI 项目宝塔Linux部署指南
linux·运维·fastapi
杜哥无敌1 小时前
FreeSSHd vs FileZilla Server vs SFTPGo:Windows SFTP服务器易用性终极横向测评
运维·服务器·windows
楼田莉子1 小时前
仿Muduo的高并发服务器:Channel模块与Poller模块
linux·服务器·c++·学习·设计模式
zhouwy1131 小时前
Linux网络编程从入门到精通
linux·c++