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编码]
相关推荐
拉不拉斯3 小时前
Linux 性能调优实战指南:从 perf 实时监控到火焰图生成
linux·运维·服务器·perf
小生迷途知返3 小时前
影响巨大!Linux 提权大洞速速复现!!!暂无补
linux·运维·服务器
IMPYLH4 小时前
Linux 的 wc 命令
linux·运维·服务器·前端·bash
zxy6444924734 小时前
Centos7.9编译安装PHP7.4
linux·运维·服务器
无限进步_4 小时前
【Linux】从冯诺依曼到操作系统:理解计算机运行的基本脉络
linux·运维·服务器
happybasic4 小时前
Python库升级标准流程~
linux·前端·python
Rabbit_QL4 小时前
【ln -s】Linux 软链接在大模型部署中的应用
linux·运维·服务器
坤昱5 小时前
cfs调度类深入解刨——核心结构细节分析
linux·cfs调度·eevdf调度·linux调度·linux技术
希望永不加班5 小时前
var局部变量类型推断的利弊
java·服务器·前端·javascript·html
枳实-叶5 小时前
【Linux驱动开发】第12天:Linux设备树核心:树形结构+节点+属性 完整全解
linux·运维·驱动开发