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

Can you add a new feature to support rate limiting for user whitelists and blacklists? #3460

Open
kwseeker opened this issue Oct 21, 2024 · 0 comments

Comments

@kwseeker
Copy link

能否为 AuthoritySlot 添加新功能以支持用户黑白名单限流?
比如将用户ID添加到黑名单禁止黑名单中的用户访问所有资源。

看 AuthoritySlot 源码发现已有的“黑白名单限流”并不适合用于用户黑白名单限流。
原因:

  1. AuthorityRule是针对某个资源(比如某个接口),用户黑名单限流规则应该支持针对所有资源;
  2. 请求头 origin 中放用户ID以及在 limitApp 中放被限制的用户ID 感觉不合适。

另外发现在业务代码中不容易拓展新的限流规则,spring-cloud-alibaba-sentinel-datasource 中将支持的规则类型写死了,现在只能二开重新打包进行拓展。
感觉用户黑白名单限流还是很常用的功能,能否为Sentinel添加上这个功能?

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

No branches or pull requests

1 participant