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编码]
相关推荐
Aspiresky18 小时前
浅析Linux进程信号处理机制:基本原理及应用
linux·运维·信号处理
ajassi200018 小时前
linux C 语言开发 (八) 进程基础
linux·运维·服务器
..过云雨19 小时前
05.【Linux系统编程】进程(冯诺依曼体系结构、进程概念、进程状态(注意僵尸和孤儿)、进程优先级、进程切换和调度)
linux·笔记·学习
matlab的学徒19 小时前
Web与Nginx网站服务(改)
linux·运维·前端·nginx·tomcat
Insist75319 小时前
prometheus安装部署与alertmanager邮箱告警
linux·运维·grafana·prometheus
BAGAE20 小时前
MODBUS 通信协议详细介绍
linux·嵌入式硬件·物联网·硬件架构·iot·嵌入式实时数据库·rtdbs
灿烂阳光g20 小时前
SELinux 策略文件编写
android·linux
xqlily20 小时前
Linux操作系统之Ubuntu
linux·运维·ubuntu
阿部多瑞 ABU20 小时前
《基于国产Linux的机房终端安全重构方案》
linux·安全
倔强的石头10621 小时前
【Linux指南】Makefile入门:从概念到基础语法
linux·运维·服务器