Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /limit_request_rate /RicardoMorim_Auth-Provider.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Entity", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client calls the API; callers are external HTTP clients (repo is a Spring Boot auth starter with no UI/SDK). Only tests issue requests." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "doFilterInternal", | |
| "file": "src/main/java/com/ricardo/auth/ratelimiter/RateLimiterFilter.java", | |
| "lines": "44", | |
| "notes": "doFilterInternal in RateLimiterFilter (OncePerRequestFilter), registered in SecurityConfig.filterChain at src/main/java/com/ricardo/auth/config/SecurityConfig.java:219 after JwtAuthFilter. It derives the id (authenticated username or IP via IpResolver, line 54/64), calls rateLimiter.allowRequest(key) at line 56 and returns 429 on refusal, else forwards via filterChain.doFilter (line 61)." | |
| }, | |
| { | |
| "role": "Limiter", | |
| "status": "present", | |
| "symbol": "allowRequest", | |
| "file": "src/main/java/com/ricardo/auth/ratelimiter/InMemoryRateLimiter.java", | |
| "lines": "66", | |
| "notes": "Reached from RateLimiterFilter.doFilterInternal:56; the default 'generalRateLimiter' bean is InMemoryRateLimiter (AuthAutoConfiguration.java:573, matchIfMissing=true). It cleans the sliding window, compares the count with maxRequests (line 80) and denies or increments. Alternative opt-in RedisRateLimiter (type=redis) not used." | |
| }, | |
| { | |
| "role": "HistoryProvider", | |
| "status": "present", | |
| "symbol": "getCount", | |
| "file": "src/main/java/com/ricardo/auth/ratelimiter/InMemoryRateLimiter.java", | |
| "lines": "139", | |
| "notes": "Called by allowRequest at InMemoryRateLimiter.java:80; RequestCounter (in-memory ConcurrentHashMap 'counters', line 23) sums per-second request buckets in the window. The update step is RequestCounter.increment (line 150, called at line 83) and cleanup (line 129)." | |
| }, | |
| { | |
| "role": "PolicyProvider", | |
| "status": "present", | |
| "symbol": "maxRequests", | |
| "file": "src/main/java/com/ricardo/auth/autoconfig/AuthProperties.java", | |
| "lines": "355", | |
| "notes": "Policy is config-backed: AuthProperties.RateLimiter fields maxRequests=150 and timeWindowMs=60000 (line 356), bound from ricardo.auth.rate-limiter.*, read via Lombok getters in the InMemoryRateLimiter constructor (InMemoryRateLimiter.java:35-36) and used by allowRequest at line 80. No repo-declared method retrieves the policy (getters are Lombok-generated), so the field is cited; changeSettings (line 47) allows runtime updates." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "login", | |
| "file": "src/main/java/com/ricardo/auth/controller/AuthController.java", | |
| "lines": "159", | |
| "notes": "RateLimiterFilter applies to every request in the SecurityConfig chain (SecurityConfig.java:219); after filterChain.doFilter (RateLimiterFilter.java:61) requests reach controllers such as AuthController.login (POST /api/auth/login), the brute-force-relevant handler. Other handlers (refresh, me, logout, user endpoints) are equally guarded." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.17 kB
- Xet hash:
- 16bdc487ea3ecfbbd3126b9e1452db75a678372e256cc88714f083b3ce4e9e33
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.