Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /limit_request_rate /AdepuSriCharan_spring-security-starter.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Entity", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The caller of POST /login, /refresh and /login/google (AuthController) is an outside HTTP client; the repo has no in-repo UI/SDK/CLI client (only Java sources; tests do not count)." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "enforceRateLimit", | |
| "file": "security-autoconfigure/src/main/java/com/sricharan/security/autoconfigure/controller/AuthController.java", | |
| "lines": "332", | |
| "notes": "Called first thing in login (AuthController.java:131), refresh (:194) and login/google (:283); derives the entity id via rateLimitKey/clientIp (IP by default, X-Forwarded-For or remote addr), calls rateLimiter.tryAcquire (:337) and returns a 429 with Retry-After that the handler returns, blocking the request. AuthController is registered as a bean in SecurityAutoConfiguration.java:381 (auth-mode INTERNAL, default)." | |
| }, | |
| { | |
| "role": "Limiter", | |
| "status": "present", | |
| "symbol": "tryAcquire", | |
| "file": "security-autoconfigure/src/main/java/com/sricharan/security/autoconfigure/ratelimit/InMemoryRateLimiter.java", | |
| "lines": "33", | |
| "notes": "Reached from enforceRateLimit (AuthController.java:337) via the RateLimiter SPI; the default bean is InMemoryRateLimiter (SecurityAutoConfiguration.java:237, store-mode INMEMORY default). Fixed-window counter: resets the window when elapsed, increments, denies with retryAfter when count > capacity. Alternative RedisRateLimiter.tryAcquire (RedisRateLimiter.java:33) is active only when security.refresh.store-mode=REDIS." | |
| }, | |
| { | |
| "role": "HistoryProvider", | |
| "status": "present", | |
| "symbol": "windows", | |
| "file": "security-autoconfigure/src/main/java/com/sricharan/security/autoconfigure/ratelimit/InMemoryRateLimiter.java", | |
| "lines": "25", | |
| "notes": "ConcurrentHashMap<String, Window> keyed by rate-limit key, holding window start and AtomicInteger count; read and updated inline in tryAcquire (InMemoryRateLimiter.java:35 compute, :42 incrementAndGet), so no dedicated method exists and the field is cited. In Redis mode the history is a Redis INCR/EXPIRE counter (RedisRateLimiter.java:35)." | |
| }, | |
| { | |
| "role": "PolicyProvider", | |
| "status": "present", | |
| "symbol": "rateLimiter", | |
| "file": "security-autoconfigure/src/main/java/com/sricharan/security/autoconfigure/SecurityAutoConfiguration.java", | |
| "lines": "237", | |
| "notes": "Bean method that reads the policy from SecurityProperties.RateLimit (SecurityProperties.java:423; capacity 10, window 60s, key IP by default, bound from security.rate-limit.*) and injects capacity/window into the InMemoryRateLimiter used by tryAcquire. The policy is fixed per limiter instance, not per id; the keying dimension is read in rateLimitKey (AuthController.java:351)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "issueAndStoreTokenPair", | |
| "file": "security-autoconfigure/src/main/java/com/sricharan/security/autoconfigure/controller/AuthController.java", | |
| "lines": "389", | |
| "notes": "After enforceRateLimit lets the request through in login (AuthController.java:131), the login handler (AuthController.java:116) verifies credentials and on success calls issueAndStoreTokenPair (:177), which issues and stores the token pair; refresh (:232) and login/google (:306) reach it too." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.52 kB
- Xet hash:
- 6b87196783da3421639609f4d3ba141d16155b7558d7a774d0af9b59d98794f7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.