AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /session_based_access_control /juliusyolo_endpoint-security-clerk-spring-boot-starter.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The repo is a Spring Boot starter library with no in-repo client; the caller sending 'Authorization: Bearer <Clerk client token>' (read in convert, src/main/java/com/juliusyolo/component/UserPermissionAuthenticationConverter.java:25) is outside the repo. No tests or UI present." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "present", | |
| "symbol": "securityFilterChain", | |
| "file": "src/main/java/com/juliusyolo/configuration/WebServletSecurityConfiguration.java", | |
| "lines": "137", | |
| "notes": "Entry point of the servlet flow: the @Bean securityFilterChain installs the framework AuthenticationFilter (built in authenticationFilter, line 94) at line 150, with UserPermissionAuthenticationConverter extracting the bearer token and authenticationFailureHandler returning 403 on failure; anyRequest().authenticated() (line 148) blocks unauthenticated requests. The reactive twin is securityWebFilterChain in WebFluxSecurityConfiguration.java:142 (active only for WebFlux apps)." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "present", | |
| "symbol": "verifyToken", | |
| "file": "src/main/java/com/juliusyolo/service/impl/ClerkServiceImpl.java", | |
| "lines": "76", | |
| "notes": "Reached from the enforcer's AuthenticationFilter via UserAuthenticationManager.authenticate (UserAuthenticationManager.java:31, call at line 34). verifyToken calls getActiveClerkUserId (line 77, declared line 53), which keeps only ACTIVE Clerk sessions for the token; verifyToken throws UserAuthenticationException if none, otherwise loads the Clerk user and memberships and returns the UserModel principal." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "external", | |
| "symbol": "verify", | |
| "file": "src/main/java/com/juliusyolo/service/impl/ClerkServiceImpl.java", | |
| "lines": "57", | |
| "notes": "Called by the Verifier via getActiveClerkUserId (ClerkServiceImpl.java:53) as clerk.clients().verify().request(req).call(): the Clerk Backend API (com.clerk.backend_api.Clerk, bean at EndpointSecurityConfiguration.java:29) resolves the opaque client token to the server-side Client and its sessions. Session state is kept entirely by the external Clerk service." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "securityFilterChain", | |
| "file": "src/main/java/com/juliusyolo/configuration/WebServletSecurityConfiguration.java", | |
| "lines": "137", | |
| "notes": "Same @Bean as the Authentication enforcer: authorizeHttpRequests (lines 144-148) makes the framework AuthorizationFilter apply .access(userAuthorizationManager) to endpointProperties.authorizationPaths() after authentication; denial goes to accessDeniedHandler (line 111). UserAuthorizationManager.check (UserAuthorizationManager.java:29) adapts the request to its servlet path and forwards to the Decider." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "present", | |
| "symbol": "verifyAuthorization", | |
| "file": "src/main/java/com/juliusyolo/service/impl/ClerkServiceImpl.java", | |
| "lines": "106", | |
| "notes": "Called from UserAuthorizationManager.check at UserAuthorizationManager.java:32. Maps the request path to a permission string 'org:<seg0>:<rest>' and returns true only if the principal's authorities contain it (line 122); returns true for all if yolo.endpoint.path-authorization-enable is false (line 107)." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "present", | |
| "symbol": "getAuthorities", | |
| "file": "src/main/java/com/juliusyolo/model/UserModel.java", | |
| "lines": "33", | |
| "notes": "The Decider reads token.getAuthorities() (ClerkServiceImpl.java:122), which were set from UserModel.getAuthorities() when the token was authenticated (UserAuthenticationManager.java:38). getAuthorities flattens the Clerk organization-membership permissions into PermissionModel authorities; the memberships come from the external Clerk API call getOrganizationMemberships at ClerkServiceImpl.java:90." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "Starter library only (rule 7): the protected handlers belong to the consuming application; no in-repo controller or example module is wired behind securityFilterChain (WebServletSecurityConfiguration.java:137)." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.54 kB
- Xet hash:
- bd13b6a434a70280d83dae5c3351c077fa6b375049b6dd88cec4d4d099ba0bd7
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.