Buckets:

download
raw
4.49 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The repo is a security library module (src/main/java/com/anst/sd/api/security only); there is no in-repo client that sends the Bearer access token to AuthTokenFilter. Callers are outside the repo."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "doFilterInternal",
"file": "src/main/java/com/anst/sd/api/security/app/impl/AuthTokenFilter.java",
"lines": "37",
"notes": "doFilterInternal in AuthTokenFilter (OncePerRequestFilter), registered via addFilterBefore at WebSecurityConfig.java:64. It extracts the Bearer token (parseJwt, line 46) and calls resolveBasicAuthentication -> validateBasicClaims (line 69), which throws AuthException on failure; on success it sets the SecurityContext principal (setSecurityContext, line 112)."
},
{
"role": "Verifier",
"status": "present",
"symbol": "validateBasicClaims",
"file": "src/main/java/com/anst/sd/api/security/app/impl/AuthTokenFilter.java",
"lines": "82",
"notes": "Reached from doFilterInternal via resolveBasicAuthentication (AuthTokenFilter.java:69). It checks that the presented access token is exactly the one stored in Redis for its deviceId (line 85), i.e. that it corresponds to an open server-side session, and throws AuthException otherwise. Caveat: the credential is a JWT that is also signature-checked (JwtService.validateAccessToken, JwtService.java:142) and the principal comes from its claims, but revocation/validity is decided against the Redis store, so it is treated as a stateful session."
},
{
"role": "Session manager",
"status": "external",
"symbol": "get",
"file": "src/main/java/com/anst/sd/api/security/app/impl/AuthTokenFilter.java",
"lines": "85",
"notes": "validateBasicClaims (AuthTokenFilter.java:82) looks up the open session via Redisson RMapCache.get on the map obtained with redissonClient.getMapCache(jwtStorageName) (line 84). The repo manages the session entries itself: put with TTL in JwtService.generateAccessRefreshTokens (JwtService.java:93) and removal in disableAccessTokens (JwtService.java:87) / validateAccessTokenLifetime (JwtService.java:75); storage is Redis via Redisson."
},
{
"role": "Authorisation enforcer",
"status": "present",
"symbol": "defaultSecurityFilterChain",
"file": "src/main/java/com/anst/sd/api/security/fw/WebSecurityConfig.java",
"lines": "50",
"notes": "After AuthTokenFilter (registered at WebSecurityConfig.java:64) sets the JwtAuth principal, the framework AuthorizationFilter installed by authorizeHttpRequests() in defaultSecurityFilterChain (lines 58-62) enforces the URL rules and rejects unauthenticated requests. @EnableGlobalMethodSecurity(prePostEnabled=true) is enabled (line 28) but no @PreAuthorize exists in the repo."
},
{
"role": "Decider",
"status": "external",
"symbol": "check",
"file": "src/main/java/com/anst/sd/api/security/fw/WebSecurityConfig.java",
"lines": "62",
"notes": "Spring Security's AuthorizationManager.check (AuthenticatedAuthorizationManager for anyRequest().authenticated(), permitAll for PUBLIC_URLS), configured at WebSecurityConfig.java:59 and :62 and invoked by the framework AuthorizationFilter; no in-repo decision logic. Role-based rules (ERole USER/PREMIUM/ADMIN) are not used by any rule."
},
{
"role": "Policy provider",
"status": "present",
"symbol": "PUBLIC_URLS",
"file": "src/main/java/com/anst/sd/api/security/fw/WebSecurityConfig.java",
"lines": "30",
"notes": "The authorisation policy is static configuration: the PUBLIC_URLS constant (permitAll, used at line 59) plus anyRequest().authenticated() (line 62) in defaultSecurityFilterChain. No method retrieves privileges, so the constant holding the policy is cited; principal authorities come from JwtAuth.getAuthorities (JwtAuth.java:27) but are not consulted by any rule."
},
{
"role": "System",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "Library/starter repo (imported via @EnableAuthLibSecurity, EnableAuthLibSecurity.java:12) with no controllers or business handlers; searched for Controller/handler classes and found none."
}
]
}

Xet Storage Details

Size:
4.49 kB
·
Xet hash:
66236a08d49679fe078dffdf67c530b16dd71597fb9233b968b0266c14a5cee5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.