nacos-group / nacos-sdk-go

Nacos client in Golang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

endpoint寻址模式下login会直接返回false,导致实例注册失败(权限校验失败)

xiaomiusa87 opened this issue · comments

What version of nacos-sdk-go are you using?

2.2.5

What version of nacos-sever are you using?

2.1.2

What version of Go are you using (go version)?

1.21.5

What operating system (Linux, Windows, …) and version?

Windows10

What did you do?

If possible, provide a recipe for reproducing the error.
1、nacos服务端开启权限校验
2、nacos-go客户端使用 endpoint寻址模式
3、客户端使用client.RegisterInstance注册实例
此时客户端注册实例会失败,因为寻址模式获取的serverList没有传递给securityLogin,login会直接返回false,后续注册也会被服务端权限校验拦截,返回403错误

What did you expect to see?

实例注册成功

What did you see instead?

实例注册失败