Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /session_based_access_control /hygieia_api.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Subject", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The repo is a REST API only; the UI client that sends the 'Authorization: Bearer' token is outside the repo. Only outbound Bearer usage (OpenIdAuthenticationServiceImpl) exists, which targets a third-party IdP, and tests do not count." | |
| }, | |
| { | |
| "role": "Authentication enforcer", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No session-id enforcer: the only in-repo token filter is doFilterInternal in JwtAuthenticationFilter (src/main/java/com/capitalone/dashboard/auth/token/JwtAuthenticationFilter.java:39, registered at config/WebSecurityConfig.java:118), which validates a stateless, self-contained JWT (verifiable-token pattern), not an opaque session id resolved against server state. Per plan section 6 (credential type must match), it is not mapped; no HttpSession/JSESSIONID/token-store enforcer exists in the repo." | |
| }, | |
| { | |
| "role": "Verifier", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No session-id verifier: getAuthentication in TokenAuthenticationServiceImpl (src/main/java/com/capitalone/dashboard/auth/token/TokenAuthenticationServiceImpl.java:55, called from JwtAuthenticationFilter.java:87) only checks the JWT signature/expiry via jjwt parseClaimsJws (line 61) and reads the principal from claims, with no server-side session lookup. This is the verifiable-token pattern, so it is not mapped per plan section 6." | |
| }, | |
| { | |
| "role": "Session manager", | |
| "status": "missing", | |
| "symbol": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "getAuthentication (TokenAuthenticationServiceImpl.java:55) derives the principal from the self-contained JWT claims; there is no server-side store of open sessions (no HttpSession/spring-session use; only KeyValueLoggingFilter reads getSession(false) for logging). The api-token repository lives in the external hygieia-core library on a different (apiToken) flow." | |
| }, | |
| { | |
| "role": "Authorisation enforcer", | |
| "status": "present", | |
| "symbol": "DashboardOwnerOrAdmin", | |
| "file": "src/main/java/com/capitalone/dashboard/auth/access/DashboardOwnerOrAdmin.java", | |
| "lines": "17", | |
| "notes": "On the same request path, after JwtAuthenticationFilter.doFilterInternal (JwtAuthenticationFilter.java:97) puts the principal in the SecurityContext, Spring's method-security interceptor (enabled by @EnableGlobalMethodSecurity(prePostEnabled=true), WebSecurityConfig.java:48) enforces this in-repo @PreAuthorize meta-annotation on controller methods such as updateDashboard (DashboardController.java:92). No in-repo method performs the interception, so the annotation type carrying the policy expression is cited; this role does not depend on the credential type." | |
| }, | |
| { | |
| "role": "Decider", | |
| "status": "present", | |
| "symbol": "isOwnerOfDashboard", | |
| "file": "src/main/java/com/capitalone/dashboard/auth/access/MethodLevelSecurityHandler.java", | |
| "lines": "25", | |
| "notes": "Invoked from the SpEL expression '@methodLevelSecurityHandler.isOwnerOfDashboard(#id) or hasRole('ROLE_ADMIN')' (DashboardOwnerOrAdmin.java:19). It checks whether the principal (username + auth type from the SecurityContext) is among the dashboard's owners; the ROLE_ADMIN alternative is evaluated by Spring against the JWT roles." | |
| }, | |
| { | |
| "role": "Policy provider", | |
| "status": "external", | |
| "symbol": "findById", | |
| "file": "src/main/java/com/capitalone/dashboard/auth/access/MethodLevelSecurityHandler.java", | |
| "lines": "26", | |
| "notes": "isOwnerOfDashboard (MethodLevelSecurityHandler.java:25) calls DashboardRepository.findById, a Spring Data MongoDB repository declared in the hygieia-core library, to load the dashboard whose owners list is the ownership policy." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "updateDashboard", | |
| "file": "src/main/java/com/capitalone/dashboard/rest/DashboardController.java", | |
| "lines": "94", | |
| "notes": "PUT /dashboard/{id} handler in DashboardController, guarded by @DashboardOwnerOrAdmin (line 92) and executed only after authentication and the owner/admin check pass. Other guarded handlers: renameDashboard, deleteDashboard, addWidget." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 4.46 kB
- Xet hash:
- 1066345e1a5ee87270e1f44f46007662da010c819f9a937f3f41513468a05db4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.