Buckets:

download
raw
4.58 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The repo is a Spring Boot security library with no client code that sends the refresh token to /auth/refresh; callers are outside the repo (only tests/testFixtures call it, which do not count)."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "refresh",
"file": "base/src/main/java/eu/fraho/spring/securityJwt/base/controller/RefreshRestController.java",
"lines": "57",
"notes": "Anchor: the refresh endpoint (${fraho.jwt.refresh.path:/auth/refresh}) is the only flow using an opaque, server-side tracked token. refresh in RefreshRestController extracts the opaque refresh token from body or cookie and hands it to checkRefresh (RefreshRestController.java:70); failures surface as BadCredentialsException -> 401. The JWT access-token filter (JwtAuthenticationTokenFilter.doFilterInternal, JwtAuthenticationTokenFilter.java:34) was rejected because it verifies a self-contained signed JWT with no session lookup."
},
{
"role": "Verifier",
"status": "present",
"symbol": "checkRefresh",
"file": "base/src/main/java/eu/fraho/spring/securityJwt/base/service/RefreshServiceImpl.java",
"lines": "32",
"notes": "Reached from refresh (RefreshRestController.java:70). checkRefresh in RefreshServiceImpl calls jwtTokenService.useRefreshToken (RefreshServiceImpl.java:45 -> JwtTokenServiceImpl.java:237, a thin forwarder to the store) and rejects with BadCredentialsException(\"Unknown token\") when no principal is returned."
},
{
"role": "Session manager",
"status": "present",
"symbol": "useToken",
"file": "internal/src/main/java/eu/fraho/spring/securityJwt/internal/service/InternalTokenStore.java",
"lines": "47",
"notes": "Reached via useRefreshToken -> refreshTokenStore.useToken (JwtTokenServiceImpl.java:242). InternalTokenStore.useToken removes the token from an ExpiringMap<token, JwtUser> and reloads the principal; the store also lists/revokes tokens per user. Alternative RefreshTokenStore implementations exist in files/, hibernate/, redis/, data-redis/, memcache/ modules; the base default NullTokenStore disables refresh entirely."
},
{
"role": "Authorisation enforcer",
"status": "present",
"symbol": "checkRefresh",
"file": "base/src/main/java/eu/fraho/spring/securityJwt/base/service/RefreshServiceImpl.java",
"lines": "32",
"notes": "Same method as the Verifier: after the principal is obtained, checkRefresh in RefreshServiceImpl only proceeds to token issuance if the user may access the API, else throws BadCredentialsException(\"Insufficient accesss rights\") (RefreshServiceImpl.java:54-56)."
},
{
"role": "Decider",
"status": "present",
"symbol": "checkRefresh",
"file": "base/src/main/java/eu/fraho/spring/securityJwt/base/service/RefreshServiceImpl.java",
"lines": "32",
"notes": "The authorisation decision is inline in checkRefresh (`if (!userDetails.isApiAccessAllowed())`, RefreshServiceImpl.java:54); isApiAccessAllowed is a Lombok getter of JwtUser.apiAccessAllowed (JwtUser.java:70), so no separate declared helper exists. Same method also serves as Verifier and Authorisation enforcer."
},
{
"role": "Policy provider",
"status": "external",
"symbol": "loadUserByUsername",
"file": "internal/src/main/java/eu/fraho/spring/securityJwt/internal/service/InternalTokenStore.java",
"lines": "50",
"notes": "The privileges (apiAccessAllowed flag, authorities on JwtUser) are fetched by useToken calling userDetailsService::loadUserByUsername (InternalTokenStore.java:50); the Spring Security UserDetailsService is supplied by the consuming application (the repo's default EmptyUserDetailsService just throws), so the policy source is outside the repo."
},
{
"role": "System",
"status": "present",
"symbol": "generateToken",
"file": "base/src/main/java/eu/fraho/spring/securityJwt/base/service/JwtTokenServiceImpl.java",
"lines": "87",
"notes": "Reached from checkRefresh after both checks pass (RefreshServiceImpl.java:62): generateToken in JwtTokenServiceImpl issues a new signed access token, followed by generateRefreshToken (RefreshServiceImpl.java:69). The library has no other protected business handler of its own (SecuredController is a test fixture)."
}
]
}

Xet Storage Details

Size:
4.58 kB
·
Xet hash:
3ce427a288e667c2e127faf5e3cacbd9563cf061751ad8e0ac4e6ae8f4c4f0e5

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