Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /verifiable_token_based_authentication /sixcrabs_slardar.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends the slardar JWT to SlardarTokenRequiredFilter; callers are external. sample/sample-client is an SSO client app (targets the SSO server flow), and tests do not count." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "doFilterInternal", | |
| "file": "starter/src/main/java/io/github/sixcrabs/slardar/starter/filter/request/SlardarTokenRequiredFilter.java", | |
| "lines": "121", | |
| "notes": "doFilterInternal in SlardarTokenRequiredFilter (OncePerRequestFilter, bean at SlardarBeanConfiguration.java:207, installed via addFilterBefore at SlardarSecurityConfiguration.java:161) extracts the token (getTokenValueFromServlet, line 122), calls authenticateService.getUsernameFromTokenValue (line 129) and isExpired (line 133), and replies 401 via sendError (line 168) on failure, else sets the SecurityContext and continues the chain (line 171)." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "geUserKey", | |
| "file": "starter/src/main/java/io/github/sixcrabs/slardar/starter/support/spi/token/SlardarTokenJwtProvider.java", | |
| "lines": "92", | |
| "notes": "Reached from Enforcer (SlardarTokenRequiredFilter.java:129) via SlardarAuthenticateService.getUsernameFromTokenValue/getUserKeyFromTokenValue -> getTokenImpl().geUserKey (SlardarAuthenticateService.java:279); default token type is 'jwt' (SlardarProperties.java:827) so SlardarTokenJwtProvider is used. geUserKey calls getClaimsFromToken (line 162, signature + expiry check with clock skew) and returns the subject or null; caveat: the service additionally checks that the token key exists in the keyStore (isExpired, SlardarAuthenticateService.java:81), a hybrid stateful check." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "initialize", | |
| "file": "starter/src/main/java/io/github/sixcrabs/slardar/starter/support/spi/token/SlardarTokenJwtProvider.java", | |
| "lines": "66", | |
| "notes": "initialize in SlardarTokenJwtProvider (invoked by SpringSlardarSpiFactory when loading token providers) loads the HMAC secret from SlardarProperties token.jwt.signKey (line 67) into the 'secret' field, which getClaimsFromToken passes to setSigningKey (line 166). Caveat: default signKey is hard-coded 'slardar_security' (SlardarProperties.java:904)." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "parseClaimsJws", | |
| "file": "starter/src/main/java/io/github/sixcrabs/slardar/starter/support/spi/token/SlardarTokenJwtProvider.java", | |
| "lines": "168", | |
| "notes": "Verifier geUserKey -> getClaimsFromToken (line 162) calls jjwt Jwts.parser().setSigningKey(secret).parseClaimsJws(token), which verifies the HS512 HMAC signature (tokens signed with signWith(HS512, secret) at line 123) and expiration. Library: io.jsonwebtoken (jjwt) JwtParser." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "sayHi", | |
| "file": "sample/sample-server/src/main/java/org/winterfell/slardar/example/web/ApiController.java", | |
| "lines": "36", | |
| "notes": "The repo is a security starter; the sample-server app uses the starter and its /api/greeting handler (not @SlardarIgnore) is reached only after SlardarTokenRequiredFilter.doFilterInternal passes (filterChain.doFilter at line 171), reading the principal via SlardarSecurityHelper.getCurrentUsername. Cited per rule 7 since the sample is wired to the same enforcer." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.65 kB
- Xet hash:
- 79690d0f8ad145931d21a57665223c7d69f3c3bb2dd42690c23e6ab628634c51
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.