Buckets:

download
raw
3.65 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "present",
"symbol": "postProcessHttpRequest",
"file": "commons-auth-api/src/main/java/io/rocketbase/commons/adapters/JwtClientRequestFactory.java",
"lines": "33",
"notes": "In-repo client SDK: JwtRestTemplate (JwtRestTemplate.java:22) uses JwtClientRequestFactory, whose postProcessHttpRequest adds the 'Authorization: Bearer <jwt>' header (line 44) to calls such as AuthenticationResource.getAuthenticated -> /auth/me, which target the commons-auth-server endpoints guarded by the traced Enforcer."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "doFilterInternal",
"file": "commons-auth-adapter/src/main/java/io/rocketbase/commons/filter/JwtTokenFilter.java",
"lines": "45",
"notes": "doFilterInternal in JwtTokenFilter (OncePerRequestFilter) extracts the Bearer token / ?token param (getAuthToken line 60) and calls tryToAuthenticate (line 50), overridden in the server flow by JwtAuthenticationTokenFilter.tryToAuthenticate (commons-auth-service/.../JwtAuthenticationTokenFilter.java:35), which calls validateToken (line 40) and sets the SecurityContext. Library repo: the filter is only registered via addFilterBefore in TestSecurityConfig (consumers register it themselves); unauthenticated requests are then rejected by Spring Security's .authenticated() rules."
},
{
"role": "Verifier",
"status": "present",
"symbol": "validateToken",
"file": "commons-auth-core/src/main/java/io/rocketbase/commons/security/JwtTokenService.java",
"lines": "158",
"notes": "Reached from JwtAuthenticationTokenFilter.java:40 via validateToken(token, user) (JwtTokenService.java:187), which delegates here. It parses/verifies the JWS via getAllClaimsFromToken (line 67; jjwt also enforces expiry), checks the subject matches the username and that iat is after the user's lastTokenInvalidation, returning true/false."
},
{
"role": "Key manager",
"status": "present",
"symbol": "secret",
"file": "commons-auth-core/src/main/java/io/rocketbase/commons/config/JwtProperties.java",
"lines": "19",
"notes": "getAllClaimsFromToken (JwtTokenService.java:69) obtains the HMAC key via jwtProperties.getSecret(), a Lombok-generated getter of the 'secret' field bound from config 'auth.jwt.secret'; no in-repo key-retrieving method exists, so the field is cited. Same secret signs tokens (line 141)."
},
{
"role": "Cryptographer",
"status": "external",
"symbol": "parseClaimsJws",
"file": "commons-auth-core/src/main/java/io/rocketbase/commons/security/JwtTokenService.java",
"lines": "71",
"notes": "Called from getAllClaimsFromToken (JwtTokenService.java:67) on the Verifier path; jjwt's JwtParser (Jwts.parser().setSigningKey(...)) verifies the HS512 HMAC signature and expiration. Token generation uses jjwt signWith(SignatureAlgorithm.HS512, ...) at line 141."
},
{
"role": "System",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "Library repo (rule 7): no production handler is demonstrably wired to the traced Enforcer. AuthenticationController.getAuthenticated (commons-auth-server/src/main/java/io/rocketbase/commons/controller/AuthenticationController.java:67, GET /auth/me) would be the protected handler, but the filter reaches it only through the test TestSecurityConfig (addFilterBefore at commons-auth-server/src/test/java/io/rocketbase/commons/TestSecurityConfig.java:141), and tests are excluded."
}
]
}

Xet Storage Details

Size:
3.65 kB
·
Xet hash:
03edbace6b41d4dd6b49f8a110260c2d4e9a6703f0000825bfc8eb16df8d9612

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