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编码]
相关推荐
C Yu小白3 小时前
Linux系统调用与文件操作详解
linux·运维·服务器
ZFB00013 小时前
【麒麟桌面系统】V10-SP1 2503 系统知识——常见用户组简介
linux·运维·kylin
EndingCoder4 小时前
类的继承和多态
linux·运维·前端·javascript·ubuntu·typescript
ZFB00014 小时前
【麒麟桌面系统】V10-SP1 2503 系统知识——添加用户
linux·运维·kylin
ZFB00015 小时前
【麒麟桌面系统】V10-SP1 2503 系统知识——进入救援模式
linux·运维·kylin
RisunJan5 小时前
Linux命令-iptables-restore命令(从文件批量恢复 iptables 防火墙规则)
linux·运维·网络
hugerat6 小时前
在AI的帮助下,用C++构造微型http server
linux·c++·人工智能·http·嵌入式·嵌入式linux
ha20428941947 小时前
Linux操作系统学习记录之----自定义协议(网络计算器)
linux·网络·学习
想唱rap7 小时前
MYSQL在ubuntu下的安装
linux·数据库·mysql·ubuntu
糖~醋排骨7 小时前
DHCP服务的搭建
linux·服务器·网络