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编码]
相关推荐
夏玉林的学习之路5 小时前
如何远程连接服务器
运维·服务器
风曦Kisaki6 小时前
#Linux数据库管理Day06:主从同步与MaxScale读写分离
linux·运维·数据库
小楼昨夜又东风1266 小时前
使用python快速拉包
linux
影寂ldy7 小时前
C# try-catch 异常处理全套笔记
服务器·数据库·c#
fei_sun7 小时前
黑洞路由(Null Route/空接口路由)
服务器·前端·javascript
Tipriest_7 小时前
ubuntu创建和更换当前swap大小
linux·运维·ubuntu
WI8LbH7889 小时前
Ubuntu 部署Harbor
linux·运维·ubuntu
researcher-Jiang9 小时前
高性能计算之MPI:第一次MPI并行程序设计练习
linux·运维·服务器
Wireless_wifi69 小时前
Why Choose IPQ9574 for Your WiFi 7 Solution
linux·人工智能·5g
MYMOTOE610 小时前
国内对标腾讯 WorkBuddy 的桌面 AI 智能体软件大全
linux