Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /verifiable_token_based_authentication /halitkalayci_turkcell2.microservices.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client sends a Bearer token to the order-service: ProductClient (order-service/.../client/ProductClient.java) and FeignConfig add no Authorization header, and there is no UI/SDK; the caller is outside the repo." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "doFilterInternal", | |
| "file": "turkcell-t2/src/main/java/io/github/halitkalayci/security/filter/BaseJwtAuthFilter.java", | |
| "lines": "29", | |
| "notes": "doFilterInternal in BaseJwtAuthFilter (OncePerRequestFilter) reads the 'Authorization: Bearer' header, calls validateToken (line 50) and sets the SecurityContext; registered via addFilterBefore in BaseSecurityService.configureCoreSecurity (BaseSecurityService.java:33), used by order-service SecurityConfig.securityFilterChain (SecurityConfig.java:19) which requires authentication on /api/v1/orders/** (line 22). Blocking of unauthenticated requests is done by Spring's authorization filter on that rule." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "validateToken", | |
| "file": "turkcell-t2/src/main/java/io/github/halitkalayci/security/jwt/BaseJwtService.java", | |
| "lines": "28", | |
| "notes": "Called from the Enforcer at BaseJwtAuthFilter.java:50; validateToken in BaseJwtService parses the signed JWT with jjwt and checks the expiration. extractUsername (line 38) / extractRoles (line 47) also parse-verify the token to extract the principal and roles." | |
| }, | |
| { | |
| "role": "Key manager", | |
| "status": "present", | |
| "symbol": "getSignKey", | |
| "file": "turkcell-t2/src/main/java/io/github/halitkalayci/security/jwt/BaseJwtService.java", | |
| "lines": "56", | |
| "notes": "Called by validateToken at BaseJwtService.java:30; getSignKey base64-decodes the hard-coded SECRET_KEY constant (line 18) and builds an HMAC key with Keys.hmacShaKeyFor. Caveat: secret is hard-coded in source." | |
| }, | |
| { | |
| "role": "Cryptographer", | |
| "status": "external", | |
| "symbol": "parseSignedClaims", | |
| "file": "turkcell-t2/src/main/java/io/github/halitkalayci/security/jwt/BaseJwtService.java", | |
| "lines": "32", | |
| "notes": "Called from validateToken (BaseJwtService.java:28) after verifyWith(getSignKey()) at line 30; jjwt (io.jsonwebtoken.Jwts JwtParser) verifies the HMAC-SHA signature. Token generation uses signWith at line 24 (issuing sub-flow)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "get", | |
| "file": "order-service/src/main/java/com/turkcell/order_service/controller/OrdersController.java", | |
| "lines": "25", | |
| "notes": "GET /api/v1/orders handler in OrdersController, reached after the Enforcer passes; protected by the authenticated() rule at order-service SecurityConfig.java:22. Returns a static string." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 2.97 kB
- Xet hash:
- cdaee2f0c900c42d80b261c1b76e7d46152f79bf8fa555fa2296a7cfd2b530bf
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.