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编码]
相关推荐
周周记笔记16 小时前
Ubuntu 中如何配置域名
运维·服务器
KYGALYX16 小时前
Win10/11系统下WSL2+Ubuntu的全流程安装
linux·运维·ubuntu
寰天柚子1 天前
裸金属服务器深度解析:适用场景、选型指南与运维实践
服务器·网络·github
Yyyy4821 天前
Ubuntu安装Jenkis
linux·运维·ubuntu
克莱斯勒ya1 天前
服务器硬件配置
运维·服务器
zhuzewennamoamtf1 天前
Linux SPI设备驱动
android·linux·运维
春日见1 天前
在虚拟机上面无法正启动机械臂的控制launch文件
linux·运维·服务器·人工智能·驱动开发·ubuntu
松涛和鸣1 天前
Linux Makefile : From Basic Syntax to Multi-File Project Compilation
linux·运维·服务器·前端·windows·哈希算法
Predestination王瀞潞1 天前
JDK安装及环境变量配置
java·linux·开发语言
再睡一夏就好1 天前
深入Linux线程:从轻量级进程到双TCB架构
linux·运维·服务器·c++·学习·架构·线程