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编码]
相关推荐
___波子 Pro Max.43 分钟前
Linux快速查看文件末尾字节方法
linux
Caster_Z1 小时前
WinServer安装VM虚拟机运行Linux-(失败,云服务器不支持虚拟化)
linux·运维·服务器
少废话h2 小时前
Redis主从与集群搭建全指南
大数据·linux·redis·mysql
中屹指纹浏览器3 小时前
指纹浏览器抗检测进阶:绕过深度风控的技术实践
服务器·网络·经验分享·笔记·媒体
Cheadmaster3 小时前
20252820_进程管理实验
linux
model20053 小时前
Alibaba linux 3安装LAMP(5)
linux·运维·服务器
哇哈哈&4 小时前
安装wxWidgets3.2.0(编译高版本erlang的时候用,不如用rpm包),而且还需要高版本的gcc++19以上,已基本舍弃
linux·数据库·python
Macbethad5 小时前
工业触摸屏技术指南:选型、难点与实战解决方案
服务器·前端·数据库
minihuabei6 小时前
跨域拉镜像
linux
王 富贵6 小时前
【Linux】防火墙常用命令(iptables/firewalld/ufw)
linux·运维·服务器