alibaba / alibaba/Sentinel

Thoughts on "limitApp" and "Origin

Open
#1,760 2 comments 0 reactions 0 assignees View on GitHub
kind/discussion
Dominant language
Java
Stars
23.1k
Forks
8.1k
PR merge metrics
No merged PRs in 30d

Description

## Issue Description

bug

### Describe what happened (or what feature you want)
Because the wildcard ", "is used as a delimiter for" rules.getLimitapp "when" AuthoritySlot "does black and white list check。
So can we argue that context.getorigin should not contain ", "because that would be illegal?
For example, "LimitApp" internal value is "App1,1, App2", we cannot determine “Origin ”as "App1,1" black and white list check

### Describe what you expected to happen
I don't think there should be ambiguous definitions, which need to be explained in the annotation document, and the restriction of "Origin" is not allowed to include ", ".

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

Using the test method "com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleCheckerTest#testPassCheck"can be easily verified

Contributor guide

Open the contributing guide

Research direction

Start with com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleCheckerTest#testPassCheck and trace how AuthoritySlot parses rules.getLimitApp and compares context.getOrigin. Clarify the expected handling of commas in Origin and LimitApp, then update the relevant test and annotation documentation to make the delimiter behavior unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authorization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.