Buckets:

download
raw
5.01 kB
{
"role_mappings": [
{
"role": "Subject",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "No in-repo client (UI/SDK/CLI) sends the access-token header; the repo is a set of Spring Boot starter modules with only Java backend code. The caller is outside the repo."
},
{
"role": "Authentication enforcer",
"status": "present",
"symbol": "preHandle",
"file": "java-impetus-auth-impl/src/main/java/io/github/jockerCN/web/interceptor/TokenRequestFilterInterceptor.java",
"lines": "48",
"notes": "preHandle in TokenRequestFilterInterceptor (bean at JavaImpetusAuthImplAutoConfiguration.java:88, type=filter) is invoked via JavaImpetusAuthImplHandler.preHandle (JavaImpetusAuthImplHandler.java:29, registered for /** in JavaImpetusAuthWebConfigurer.java:61) -> InterceptorFilterManager preHandle (InterceptorFilterManager.java:42). It reads the opaque access token from the request header, rejects a blank one, and calls TokenRecordProcess.validate at line 54; exceptions are turned into an error response by FilterException. Same method also acts as Authorisation enforcer."
},
{
"role": "Verifier",
"status": "present",
"symbol": "validate",
"file": "java-impetus-auth/src/main/java/io/github/jockerCN/token/process/TokenRecordProcess.java",
"lines": "382",
"notes": "Called from TokenRequestFilterInterceptor.java:54. validate in DefaultTokenRecordProcess runs tokenValidateConsumer; for the default storageType DB (TokenProperties.java:15) the lambda at line 81 looks the token up in the user_login_info table, throws 'token is invalid' if absent or 'token expires' if past expirationTime, then loads the principal's groups/permissions into RequestContext. LOCAL/REDIS/DB_REDIS/DB_LOCAL variants exist as config alternatives."
},
{
"role": "Session manager",
"status": "present",
"symbol": "getUserLoginInfoWithToken",
"file": "java-impetus-auth/src/main/java/io/github/jockerCN/dao/DaoUtils.java",
"lines": "119",
"notes": "Called by the Verifier's DB lambda at TokenRecordProcess.java:82. Queries the UserLoginInfo entity (server-side login-session record holding accessToken, userCode, expirationTime) by access token via getUserLoginInfo/JPA query. Sessions are written at login by TokenRecordProcess.creator (JpaRepositoryUtils.save, line 79)."
},
{
"role": "Authorisation enforcer",
"status": "present",
"symbol": "preHandle",
"file": "java-impetus-auth-impl/src/main/java/io/github/jockerCN/web/interceptor/TokenRequestFilterInterceptor.java",
"lines": "48",
"notes": "Same method as the Authentication enforcer: after successful token validation, preHandle in TokenRequestFilterInterceptor takes the principal's groups from RequestContext and calls requestAuthorization.access(groups) at line 59, writing a no-permission response and returning false when denied (lines 61-64), otherwise letting the request reach the controller."
},
{
"role": "Decider",
"status": "present",
"symbol": "access",
"file": "java-impetus-auth/src/main/java/io/github/jockerCN/access/RequestAuthorization.java",
"lines": "39",
"notes": "Called from TokenRequestFilterInterceptor.java:59; RequestAuthorization.getInstance() returns DefaultRequestAuthorization since no RequestAuthorization bean is registered. access fetches the API permissions of the user's groups and returns true if any permission resource ant-matches the request URI. SecurityRequestAuthorization.access (SecurityRequestAuthorization.java:24) belongs to the alternative 'security' mode and is not used."
},
{
"role": "Policy provider",
"status": "present",
"symbol": "getGroupPermissionSetByGroupId",
"file": "java-impetus-auth/src/main/java/io/github/jockerCN/dao/DaoUtils.java",
"lines": "132",
"notes": "Decider calls GroupPermissionsProcess.getGroupPermissions(groupIds, types) at RequestAuthorization.java:41 -> DefaultGroupPermissionsProcess.getGroupPermissions (GroupPermissionsProcess.java:196) -> getPermissionFunction, which for the default AuthUrlStorage DB (DefaultAuthUrlConfig.java:26) is DaoUtils::getGroupPermissionSetByGroupId (GroupPermissionsProcess.java:179). It loads the group's permissions from the DB via getGroupPermissionAggregate."
},
{
"role": "System",
"status": "present",
"symbol": "getUserProfile",
"file": "java-impetus-auth-impl/src/main/java/io/github/jockerCN/api/UserInfoApi.java",
"lines": "243",
"notes": "GET /v1/userInfo/profile in UserInfoApi (@RestController) is covered by the /** interceptor registration (JavaImpetusAuthWebConfigurer.java:61) and runs only after preHandle returns true; it returns the profile of the session's userCode taken from RequestContext. Other controllers in the api package are guarded the same way."
}
]
}

Xet Storage Details

Size:
5.01 kB
·
Xet hash:
29ea3c0469cc4f5f1be7ed423b8ae1eab13348a6064db139af262c4ef439f416

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