Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos 开启授权认证后,新建的用户在分配自定义的命名空间,其实是没有问题的,只有在分配public的时候才会403错误 #3524

Closed
areskts opened this issue Aug 5, 2020 · 2 comments
Labels
kind/bug Category issues or prs related to bug.
Milestone

Comments

@areskts
Copy link

areskts commented Aug 5, 2020

Describe the bug
nacos 开启授权认证后,新建的用户在分配自定义的命名空间,其实是没有问题的,只有在分配public的时候才会403错误

Expected behavior
预期行为应该是新建的用户可以正常访问自定义的命名空间内容

Acutally behavior
实际在启动discovery时候,如果新用户分配了public命名空间,会导致启动的时候报403错误

How to Reproduce
Steps to reproduce the behavior:

  1. 创建新用户(user)、创建新命名空间(new_spaces)、创建新的角色(new_role),进行相关绑定设置
  2. 分配新的用户(user) 到 新命名空间(new_spaces)和(public命名空间)
  3. 启动nacos discovery客户端
  4. 报403认证错

Desktop (please complete the following information):

  • OS: [e.g. Centos]
  • Version [e.g. nacos-server 1.3.1, nacos-client 1.3.1]
  • Module [e.g. naming/config]
  • SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]

Additional context
Add any other context about the problem here.

@KomachiSion KomachiSion added kind/bug Category issues or prs related to bug. kind/research labels Aug 5, 2020
@Maijh97
Copy link
Collaborator

Maijh97 commented Aug 5, 2020

@i will solve it@

@rcfeng
Copy link

rcfeng commented Aug 12, 2020

这个问题上次碰到过,其实就是分配权限的时候没有把public的权限写到数据库,鉴权的时候又从数据库读取了
可以在permissions表临时插入权限数据规避这个问题
如:
ROLE_PROD_READ prod:: r
ROLE_PROD_READ public:: rw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
Development

No branches or pull requests

4 participants