Buckets:

AnonymousSpottedToad/securityPatternsRecovery / ground_truth /java /authentication_pwd__songqingwei_icloud.json
download
raw
8.8 kB
{
"role_mappings": [
{
"patternRole": "Subject",
"entity": "",
"file": "",
"lines": "",
"notes": "No in-repo client sends credentials: the admin login page/static UI (classpath:/admin/) is not in the repo and there are no html/js sources; the caller of the form login is outside the repo.",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Enforcer",
"entity": "login",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/api/impl/AdminInterfaceImpl.java",
"lines": "34–37",
"notes": "Anchor: Spring Security chain bean that installs formLogin (loginPage /admin/login, SecurityConfig.java:44) and anyRequest().authenticated() (line 42), so the UsernamePasswordAuthenticationFilter rejects bad credentials. Caveat: SecurityConfig is @ConditionalOnProperty i.admin.enabled=true with matchIfMissing=false, yet UserServiceImpl needs its PasswordEncoder bean, so the admin module only works with the property set.",
"status": "present",
"nodeId": null
},
{
"patternRole": "Verification manager",
"entity": "login",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"lines": "37–60",
"notes": "Reached from the Enforcer's formLogin filter via the AuthenticationManager bean (SecurityConfig.java:31); authenticationManagerBuilder.userDetailsService(...) registers Spring Security's DaoAuthenticationProvider (with the context PasswordEncoder), which loads the user and checks the password. Off-path alternative: UserServiceImpl.login (UserServiceImpl.java:38) is not HTTP-mapped (AdminInterfaceImpl.login has no request mapping).",
"status": "present",
"nodeId": null
},
{
"patternRole": "Password store",
"entity": "selectByUsername",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"lines": "39",
"notes": "DaoAuthenticationProvider calls AdminUserDetailsService.loadUserByUsername (AdminUserDetailsService.java:31), which calls userMapper.selectByUsername at line 33 to fetch the user with its bcrypt hash (MyBatis mapper; no mapper XML present in repo). Caveat: if the stored password is empty, a configured default password (i.admin.password, default 'admin') is bcrypt-encoded on load (line 41).",
"status": "present",
"nodeId": null
},
{
"patternRole": "Hasher",
"entity": "",
"file": "",
"lines": "",
"notes": "Spring Security BCryptPasswordEncoder instantiated in the passwordEncoder bean (SecurityConfig.java:26), injected into DaoAuthenticationProvider via the HttpSecurity AuthenticationManagerBuilder (line 34). Its matches() both hashes and compares (one call covers Hasher and Comparator).",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Pepper store",
"entity": "",
"file": "",
"lines": "",
"notes": "No pepper/secret applied to passwords on the verification path (searched pepper/hmac/secret/Cipher in the starters); bcrypt salt is not a pepper.",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Encrypter",
"entity": "",
"file": "",
"lines": "",
"notes": "The bcrypt hash is not encrypted with any key; no Cipher/HMAC on the login path.",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Comparator",
"entity": "matches",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"lines": "44",
"notes": "DaoAuthenticationProvider (wired at SecurityConfig.java:34) calls BCryptPasswordEncoder.matches inside Spring Security; no in-repo call line exists on this path, so the encoder instantiation line is cited. Same call covers Hasher. Off-path in-repo call: UserServiceImpl.java:44.",
"status": "external",
"nodeId": null
},
{
"patternRole": "System",
"entity": "",
"file": "",
"lines": "",
"notes": "After successful formLogin, Spring's default success handler redirects to '/', which MyWebMvcConfigurer.addViewControllers (MyWebMvcConfigurer.java:33) redirects to /iadmin/login, served by this authenticated-only handler. Other protected handlers: MfaController endpoints (/admin/mfa/**).",
"status": "missing",
"nodeId": null
}
],
"interaction_order": {
"available": true,
"language": "java",
"repo": "songqingwei_icloud",
"reason": "",
"entryRole": "Enforcer",
"entryRule": "behaviour",
"interactions": [
{
"rank": 1,
"interaction": "Enforcer → Verification manager",
"from": "Enforcer",
"to": "Verification manager",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/api/impl/AdminInterfaceImpl.java",
"line": 36,
"via": [],
"mechanism": "call",
"path": [
{
"caller": "cn.isqing.icloud.starter.admin.api.impl.AdminInterfaceImpl.login:cn.isqing.icloud.common.api.dto.Response(cn.isqing.icloud.starter.admin.api.dto.UserLoginRequestDto)",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/api/impl/AdminInterfaceImpl.java",
"line": 36,
"code": "this.userService.login(reqDto)",
"callee": "cn.isqing.icloud.starter.admin.service.userService.impl.UserServiceImpl.login:cn.isqing.icloud.common.api.dto.Response(cn.isqing.icloud.starter.admin.api.dto.UserLoginRequestDto)",
"mechanism": "call"
}
],
"parent": ""
},
{
"rank": 2,
"interaction": "Verification manager → Password store",
"from": "Verification manager",
"to": "Password store",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"line": 39,
"via": [],
"mechanism": "call",
"path": [
{
"caller": "cn.isqing.icloud.starter.admin.service.userService.impl.UserServiceImpl.login:cn.isqing.icloud.common.api.dto.Response(cn.isqing.icloud.starter.admin.api.dto.UserLoginRequestDto)",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"line": 39,
"code": "this.userMapper.selectByUsername(reqDto.getUsername())",
"callee": "cn.isqing.icloud.starter.admin.dao.mapper.UserMapper.selectByUsername:cn.isqing.icloud.starter.admin.dao.entity.User(java.lang.String)",
"mechanism": "call"
}
],
"parent": "Enforcer → Verification manager"
},
{
"rank": 3,
"interaction": "Verification manager → Comparator",
"from": "Verification manager",
"to": "Comparator",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"line": 44,
"via": [],
"mechanism": "call",
"path": [
{
"caller": "cn.isqing.icloud.starter.admin.service.userService.impl.UserServiceImpl.login:cn.isqing.icloud.common.api.dto.Response(cn.isqing.icloud.starter.admin.api.dto.UserLoginRequestDto)",
"file": "icloud-starters/icloud-starter-admin/src/main/java/cn/isqing/icloud/starter/admin/service/userService/impl/UserServiceImpl.java",
"line": 44,
"code": "this.passwordEncoder.matches(reqDto.getPassword(), user.getPassword())",
"callee": "org.springframework.security.crypto.password.PasswordEncoder.matches:<unresolvedSignature>(2)",
"mechanism": "call"
}
],
"parent": "Enforcer → Verification manager"
}
],
"anchoredRoles": [
{
"role": "Comparator",
"kind": "external"
},
{
"role": "Encrypter",
"kind": "external"
},
{
"role": "Enforcer",
"kind": "METHOD"
},
{
"role": "Hasher",
"kind": "external"
},
{
"role": "Password store",
"kind": "METHOD"
},
{
"role": "Pepper store",
"kind": "external"
},
{
"role": "Verification manager",
"kind": "METHOD"
}
],
"skippedRoles": [
"Subject",
"System"
]
}
}

Xet Storage Details

Size:
8.8 kB
·
Xet hash:
a056491c6f591b23ca6ad19630128ecd01e8886fdbf7c7bfa190e4fa10a70d71

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