Buckets:

download
raw
4.59 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client (UI/SDK/CLI) sends the 'token' header to the Crust filter; no .js/.html/.vue files exist. The caller is outside the repo."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "doFilterInternal",
"file": "Milkomeda/src/main/java/com/github/yizzuide/milkomeda/crust/CrustAuthenticationFilter.java",
"lines": "85",
"notes": "doFilterInternal in CrustAuthenticationFilter, installed by CrustAuthenticationConfigurer (http.addFilterBefore at CrustAuthenticationConfigurer.java:77) applied in securityFilterChain (CrustConfigurerAdapter.java:182) for the default stateless=true mode. It reads the token via crust.getToken(true) (line 99) and crust.getAuthInfoFromToken (line 102), and rejects via unsuccessfulAuthentication when no principal is returned."
},
{
"role": "Verifier",
"status": "present",
"symbol": "getAuthInfoFromToken",
"file": "Milkomeda/src/main/java/com/github/yizzuide/milkomeda/crust/Crust.java",
"lines": "234",
"notes": "Called from doFilterInternal (CrustAuthenticationFilter.java:102). With default enableCache=true it is @LightCacheable keyed by md5(token), so the principal (CrustUserInfo) is resolved from the server-side crustLightCache; on a miss it falls back to tokenResolver.resolve (JWT). Caveat: getToken(true) (Crust.java:355) first rejects tokens not present in the cache, which makes the JWT revocable/server-tracked like a session id; with enableCache=false it would be a plain verifiable-token flow."
},
{
"role": "Session manager",
"status": "present",
"symbol": "isCacheL1Exists",
"file": "Milkomeda/src/main/java/com/github/yizzuide/milkomeda/light/LightCache.java",
"lines": "380",
"notes": "Reached from Crust.getToken (Crust.java:363) on the verification path; LightCache bean crustLightCache (CrustConfig.java:91) keeps logged-in tokens in an L1 in-memory map and L2 Redis (isCacheL2Exists at LightCache.java:385), populated at login (Crust.java:160) and evicted on logout via removeTokenCache (Crust.java:260). The principal itself is fetched through LightCacheAspect.applyAround -> CacheHelper.get."
},
{
"role": "Authorisation enforcer",
"status": "external",
"symbol": "invoke",
"file": "MilkomedaDemo/src/main/java/com/github/yizzuide/milkomeda/demo/crust/controller/CaseController.java",
"lines": "39",
"notes": "After doFilterInternal passes, Spring Security method security (AuthorizationManagerBeforeMethodInterceptor.invoke, enabled by @EnableMethodSecurity at EnableCrust.java:40) enforces @PreAuthorize(\"@crust.permitAny('ADMIN')\") on CaseController.info; denial goes to DefaultFailureHandler.handle (CrustConfigurerAdapter.java:304). The URL-level anyRequest().authenticated() (CrustConfigurerAdapter.java:174) only requires authentication."
},
{
"role": "Decider",
"status": "present",
"symbol": "permitAny",
"file": "Milkomeda/src/main/java/com/github/yizzuide/milkomeda/crust/Crust.java",
"lines": "371",
"notes": "Invoked through the SpEL '@crust.permitAny('ADMIN')' at CaseController.java:39 (bean 'crust', CrustConfig.java:61). It returns true for admins or when any required permission is among the principal's granted authorities."
},
{
"role": "Policy provider",
"status": "present",
"symbol": "findPermissions",
"file": "MilkomedaDemo/src/main/java/com/github/yizzuide/milkomeda/demo/crust/provider/UserDetailsService.java",
"lines": "31",
"notes": "The authorities checked by permitAny are built in Crust.activeAuthentication (Crust.java:272) from the cached permission list or CrustUserDetailsService.findPermissions; the wired demo override returns a hard-coded ADMIN role (comment says a DAO would be used in practice). Abstract hook declared at CrustUserDetailsService.java:88."
},
{
"role": "System",
"status": "present",
"symbol": "info",
"file": "MilkomedaDemo/src/main/java/com/github/yizzuide/milkomeda/demo/crust/controller/CaseController.java",
"lines": "41",
"notes": "Demo app enables the same Crust machinery via @EnableCrust (EnableMilkomeda.java:52); CaseController.info (GET /case/info) runs only after the Crust filter authenticates and @PreAuthorize permitAny('ADMIN') passes (line 39)."
}
]
}

Xet Storage Details

Size:
4.59 kB
·
Xet hash:
be680c74df35d6368c00958a6222845e987078d86f97f3af6b426fe53e1168ad

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