Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

dubbo3/SentinelDubboProviderFilter.java 配置key 错误导致授权规则失败

Open yangzhongj opened this issue 2 years ago • 4 comments

Issue Description

Type: bug report or feature request

DubboUtils.SENTINEL_DUBBO_APPLICATION_KEY

经过consumer 传输到producer 变成了小写(public static final String SENTINEL_DUBBO_APPLICATION_KEY = "dubboApplication";)---> (public static final String SENTINEL_DUBBO_APPLICATION_KEY = "dubboapplication";))

导致取不到应用名,导致授权规则

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

yangzhongj avatar Sep 07 '22 17:09 yangzhongj

这个已经在群里反馈了, dubbo3 triple协议的问题,改dubbo协议正常,另外triple协议还漏了好多要透传的字段

ilaotan avatar Sep 08 '22 02:09 ilaotan

Dubbo 3 adapter 获取对端应用名已经修改为从 context 直接获取,理论上不再强制依赖这个特殊的 attachment。可以看一下 context 里面取 remoteApplicationName 是不是没拿到。

sczyh30 avatar Sep 08 '22 02:09 sczyh30

cc @AlbumenJ

sczyh30 avatar Sep 08 '22 02:09 sczyh30

Triple 协议的等 1.8.6 发版后用新的 Dubbo 3 Adapter 吧,那个会优先从 Dubbo API 获取应用名

AlbumenJ avatar Sep 08 '22 02:09 AlbumenJ

You may use the latest Dubbo 3.x adapter: https://github.com/alibaba/Sentinel/tree/master/sentinel-adapter/sentinel-apache-dubbo3-adapter

sczyh30 avatar Nov 08 '22 06:11 sczyh30