Buckets:

download
raw
3.38 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client sends the Bearer token: the repo contains only Java backend modules (no Angular/TS frontend; the web UI lives in a separate repo). Callers of /api/** are outside the repo."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "doFilterInternal",
"file": "comixed-auth/src/main/java/org/comixedproject/auth/ComiXedAuthenticationFilter.java",
"lines": "56",
"notes": "doFilterInternal in ComiXedAuthenticationFilter (OncePerRequestFilter) extracts the 'Authorization: Bearer' token, calls jwtTokenUtil.getEmailFromToken (line 66) and validateToken (line 89), and sets the SecurityContext only on success; registered via addFilterBefore in ComiXedSecurityConfiguration.restSecurityFilterChain (ComiXedSecurityConfiguration.java:71). Blocking is then done by @PreAuthorize on controllers since the /api/** chain is permitAll; the same filter also handles a Basic-auth branch."
},
{
"role": "Verifier",
"status": "present",
"symbol": "validateToken",
"file": "comixed-auth/src/main/java/org/comixedproject/auth/JwtTokenUtil.java",
"lines": "105",
"notes": "Called from doFilterInternal (ComiXedAuthenticationFilter.java:89). validateToken in JwtTokenUtil re-parses the token via getEmailFromToken -> getClaimFromToken -> getAllClaimsFromToken (JwtTokenUtil.java:69, signature check) and accepts only if the subject email matches the loaded user and isTokenExpired is false."
},
{
"role": "Key manager",
"status": "present",
"symbol": "signingKey",
"file": "comixed-auth/src/main/java/org/comixedproject/auth/JwtTokenUtil.java",
"lines": "52",
"notes": "Reached from the Verifier chain at getAllClaimsFromToken (JwtTokenUtil.java:70), which derives the HMAC key inline with jjwt Keys.hmacShaKeyFor(signingKey bytes); no dedicated key-retrieving method exists, so the config-injected field is cited. Caveat: it defaults to a hard-coded secret via @Value(\"${comixed.auth.jwt-signing-key:comixed-secured-jwt-signing-key!}\") at line 51."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "parseSignedClaims",
"file": "comixed-auth/src/main/java/org/comixedproject/auth/JwtTokenUtil.java",
"lines": "71",
"notes": "Called inside getAllClaimsFromToken (reached from validateToken/getEmailFromToken): jjwt Jwts.parser().verifyWith(key).build().parseSignedClaims(token) verifies the HS256 MAC (io.jsonwebtoken JwtParser). Token generation uses jjwt signWith at JwtTokenUtil.java:101."
},
{
"role": "System",
"status": "present",
"symbol": "loadCurrentUser",
"file": "comixed-rest/src/main/java/org/comixedproject/rest/user/UserController.java",
"lines": "56",
"notes": "Representative /api/** handler reached after doFilterInternal (ComiXedAuthenticationFilter.java:99 filterChain.doFilter) populates the principal; GET /api/user guarded by @PreAuthorize(\"hasAnyRole('READER','ADMIN')\") at UserController.java:55 returns the current user for the token's principal. Any other @PreAuthorize REST handler (e.g. SeriesDetailController.loadSeriesList) is equally on this path."
}
]
}

Xet Storage Details

Size:
3.38 kB
·
Xet hash:
f80557cbf0e61af59e37f14ca004ffa4606ef30336404b2fc40b6655c5ce14c0

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