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

Failed to obtain the service instance by using the user with rw permission and reported "authentication failed!" #9696

Closed
TC-wang opened this issue Dec 12, 2022 · 1 comment
Labels
status/duplicate This issue or pull request already exists

Comments

@TC-wang
Copy link

TC-wang commented Dec 12, 2022

Describe the bug
Failed to obtain the service instance by using the user with rw permission and reported "authentication failed!"

Expected behavior
Getting service instance succeeded

Actually behavior
Client reported "authentication failed!"

Exception in thread "main" ErrCode:500, ErrMsg:Request nacos server failed: 
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:288)
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.doSubscribe(NamingGrpcClientProxy.java:229)
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.subscribe(NamingGrpcClientProxy.java:214)
	at com.alibaba.nacos.client.naming.remote.NamingClientProxyDelegate.subscribe(NamingClientProxyDelegate.java:147)
	at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:290)
	at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:278)
	at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:266)
	at com.alibaba.nacos.client.naming.NacosNamingService.selectInstances(NacosNamingService.java:243)
	at com.bytedance.mse.ProviderApplication.main(ProviderApplication.java:26)
Caused by: ErrCode:403, ErrMsg:authorization failed!
	at com.alibaba.nacos.client.naming.remote.gprc.NamingGrpcClientProxy.requestToServer(NamingGrpcClientProxy.java:280)
	... 8 more

How to Reproduce

  1. The ”test“ user has rw permission under public namespace;

  2. The error code is as follows:

public class Test {
        public static void main(String[] args) throws Exception {
            Properties properties = new Properties();
            properties.put("serverAddr", "127.0.0.1:8848");
            properties.put("namespace", "");
            properties.put("username", "test");
            properties.put("password", "123456");
            NamingService namingService = NamingFactory.createNamingService(properties);
            List<Instance> list = namingService.selectInstances("provider", true);
            System.out.println(list);
    }
}

Desktop (please complete the following information):

  • Version [nacos-server 2.1.0, nacos-client 2.1.0]
  • Module [naming]
  • SDK [nacos-client 2.1.0]

Additional context

@TC-wang TC-wang changed the title Authentication failed Failed to obtain the service instance by using the user with rw permission Dec 12, 2022
@TC-wang TC-wang changed the title Failed to obtain the service instance by using the user with rw permission Failed to obtain the service instance by using the user with rw permission and reported "authentication failure" Dec 12, 2022
@TC-wang TC-wang changed the title Failed to obtain the service instance by using the user with rw permission and reported "authentication failure" Failed to obtain the service instance by using the user with rw permission and reported "authentication failed!" Dec 12, 2022
@KomachiSion
Copy link
Collaborator

duplicate with #3525

you can use other namespace use first.

@KomachiSion KomachiSion closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2022
@KomachiSion KomachiSion added the status/duplicate This issue or pull request already exists label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants