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
Milestone

Comments

@areskts
Copy link

@areskts 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.

@Maijh97
Copy link
Collaborator

@Maijh97 Maijh97 commented Aug 5, 2020

@i will solve it@

Loading

@rcfeng
Copy link

@rcfeng rcfeng commented Aug 12, 2020

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants