Buckets:

download
raw
3.09 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client (UI/SDK/CLI) sends the Bearer token to the ZeusRequestFilter; callers are external. Only test code (src/test) builds tokens, which does not count."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "doFilterInternal",
"file": "src/main/java/com/brihaspathee/zeus/auth/filter/ZeusRequestFilter.java",
"lines": "39",
"notes": "doFilterInternal in ZeusRequestFilter (OncePerRequestFilter) reads the 'Authorization: Bearer' header, calls zeusJwtUtil.extractUsername (line 50) and zeusJwtUtil.validateToken (line 54), and sets the SecurityContext on success. Registered via addFilterBefore in ZeusSecurityConfig.filterChain (src/main/java/com/brihaspathee/zeus/config/ZeusSecurityConfig.java:96); blocking of unauthenticated requests is done by anyRequest().authenticated() in that chain."
},
{
"role": "Verifier",
"status": "present",
"symbol": "validateToken",
"file": "src/main/java/com/brihaspathee/zeus/auth/util/ZeusJwtUtil.java",
"lines": "78",
"notes": "Reached from doFilterInternal (ZeusRequestFilter.java:54). validateToken in ZeusJwtUtil re-parses the token via extractUsername -> extractClaim -> extractAllClaims (line 46, signature-verified parse), checks the subject matches the loaded UserDetails and that the token is not expired. extractUsername is also called earlier at ZeusRequestFilter.java:50 to obtain the principal."
},
{
"role": "Key manager",
"status": "present",
"symbol": "getSigningKey",
"file": "src/main/java/com/brihaspathee/zeus/auth/util/ZeusJwtUtil.java",
"lines": "53",
"notes": "Called from extractAllClaims (ZeusJwtUtil.java:47) on the Verifier path; builds an HMAC key via Keys.hmacShaKeyFor from the Base64-decoded SECRET_KEY field (line 31). Caveat: the secret is hard-coded in source."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "parseClaimsJws",
"file": "src/main/java/com/brihaspathee/zeus/auth/util/ZeusJwtUtil.java",
"lines": "49",
"notes": "Called in extractAllClaims (ZeusJwtUtil.java:46) on the Verifier path; jjwt JwtParser.parseClaimsJws (io.jsonwebtoken, built with Jwts.parserBuilder().setSigningKey(getSigningKey())) verifies the HS256 HMAC signature. Token issuing uses signWith at line 74 (separate sub-flow)."
},
{
"role": "System",
"status": "present",
"symbol": "getAllUsers",
"file": "src/main/java/com/brihaspathee/zeus/web/resource/impl/UserAPIImpl.java",
"lines": "44",
"notes": "Representative protected handler: UserAPIImpl.getAllUsers is not in AUTH_WHITELIST of ZeusSecurityConfig, so it runs only after doFilterInternal (ZeusRequestFilter.java:39) authenticated the request and anyRequest().authenticated() passes. Other controllers (Role, Authority, Account, etc.) are guarded the same way."
}
]
}

Xet Storage Details

Size:
3.09 kB
·
Xet hash:
4c1683fb4c1f78b660f4291c5cfee4e02a55fb458c63656a912f7a9454fd3ac1

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