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编码]
相关推荐
tokepson1 小时前
Mysql下载部署方法备份(Windows/Linux)
linux·服务器·windows·mysql
nbsaas-boot3 小时前
SQL Server 存储过程开发规范(公司内部模板)
java·服务器·数据库
zz_nj4 小时前
工作的环境
linux·运维·服务器
极客先躯4 小时前
如何自动提取Git指定时间段的修改文件?Win/Linux双平台解决方案
linux·git·elasticsearch
suijishengchengde5 小时前
****LINUX时间同步配置*****
linux·运维
willhuo5 小时前
基于xray的匿名、授权、IP白名单代理访问研究
服务器·网络·tcp/ip
qiuqyue5 小时前
基于虹软Linux Pro SDK的多路RTSP流并发接入、解码与帧级处理实践
linux·运维·网络
切糕师学AI5 小时前
Linux 操作系统简介
linux
南烟斋..6 小时前
GDB调试核心指南
linux·服务器
爱跑马的程序员6 小时前
Linux 如何查看文件夹的大小(du、df、ls、find)
linux·运维·ubuntu