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编码]
相关推荐
杜子不疼.10 分钟前
进程控制(四):自主Shell命令行解释器
linux·c语言·人工智能
橘颂TA12 分钟前
【Linux 网络】深入理解 UDP
linux·运维·服务器·网络·网络协议
乱蜂朝王7 小时前
Ubuntu 20.04安装CUDA 11.8
linux·运维·ubuntu
梁洪飞8 小时前
clk学习
linux·arm开发·嵌入式硬件·arm
~光~~9 小时前
【嵌入式linux驱动——点亮led】基于鲁班猫4 rk3588s
linux·点灯·嵌入式linux驱动
yuanmenghao9 小时前
车载Linux 系统问题定位方法论与实战系列 - 车载 Linux 平台问题定位规范
linux·运维·服务器·网络·c++
qq_5895681011 小时前
centos6.8镜像源yum install不成功,无法通过镜像源下载的解决方式
linux·运维·centos
weixin_5160230711 小时前
linux下fcitx5拼音的安装
linux·运维·服务器
hunter145012 小时前
Linux 进程与计划任务
linux·运维·服务器
楼田莉子12 小时前
Linux学习之磁盘与Ext系列文件
linux·运维·服务器·c语言·学习