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编码]
相关推荐
赖small强15 小时前
【Linux C/C++开发】Linux 系统野指针崩溃机制深度解析
linux·mmu·crash·core dump·野指针
爱打代码的小林16 小时前
python基础(pandas库)
服务器·python·pandas
J__M__C16 小时前
WSL2的环境配置(安装+网络配置+基本美化)
linux
学困昇16 小时前
Linux基础开发工具(下):调试器gdb/cgdb的使用详解
linux·运维·服务器·开发语言·c++
liulilittle16 小时前
Linux shell 搜索指定后缀名文件,并复制到指定目录。
linux·服务器·数据库
必胜刻16 小时前
Redis哨兵模式(Linux)
linux·数据库·redis
双翌视觉16 小时前
服务器电源外观检测智能化机器视觉解决方案
运维·服务器·人工智能·机器学习
Channing Lewis17 小时前
.ini文件格式
服务器
阿猿收手吧!17 小时前
【Linux】Ubuntu 24安装webbench
linux·运维·ubuntu
高锰酸钾_17 小时前
单机或内网服务器快速部署软件系统完整教程
运维·服务器