You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/31 12:46:54 UTC

[GitHub] [dubbo] haoyann opened a new issue #8383: [3.0] Token 认证调用失败

haoyann opened a new issue #8383:
URL: https://github.com/apache/dubbo/issues/8383


   - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   - [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
   
   ### Steps to reproduce this issue
   
   1. provider 开启认证 `dubbo.provider.token=true`
   2. 调用异常
   ```
   org.apache.dubbo.rpc.RpcException: Invalid token! Forbid invoke remote service interface org.test.apache.dubbo.interfaces.PeopleService method work() from consumer 192.168.1.3 to provider 192.168.1.3, consumer incorrect token is 54ff0e8d-e486-4986-823d-f028302d5fbb
   ```
   ### 原因
   consumer 在获取token的时候,先获取 Instance 的 token ,如果没有再获取 interface 的 token.
   `实例 token`
   ![image](https://user-images.githubusercontent.com/43994656/127740178-31ac570a-ce98-4fc9-9e27-d87236fd86da.png)
   `接口 token`
   ![image](https://user-images.githubusercontent.com/43994656/127740200-d2cc7833-5092-4043-936a-3fcb3b07d046.png)
   `最终获取的 token 是实例的 token`
   ![image](https://user-images.githubusercontent.com/43994656/127740240-4c4ba965-1e2b-4282-b717-67afaa9a8b93.png)
   
   https://github.com/apache/dubbo/blob/6c8046aa43771ced3d725af4fb8e7455166fe9ea/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/InstanceAddressURL.java#L142-L148
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] horizonzy closed issue #8383: [3.0] Token 认证调用失败

Posted by GitBox <gi...@apache.org>.
horizonzy closed issue #8383:
URL: https://github.com/apache/dubbo/issues/8383


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org