Buckets:

AnonymousSpottedToad/securityPatternsRecovery / ground_truth /java /authentication_pwd__contentmunch_contentmunch-parent.json
download
raw
7.98 kB
{
"role_mappings": [
{
"patternRole": "Subject",
"entity": "",
"file": "",
"lines": "",
"notes": "No in-repo client (UI/SDK/CLI) posts credentials to /api/auth/login; the caller is outside the repo (only tests call it).",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Enforcer",
"entity": "login",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/controller/AuthController.java",
"lines": "36",
"notes": "Anchor: POST /api/auth/login handler in AuthController (registered via @ImportAutoConfiguration in AuthenticationAutoConfiguration.java:18, permitted in SecurityConfig.java:42). It passes username/password to authenticationManager.authenticate (line 38) and refuses on failure because the thrown BadCredentialsException is mapped to 401 by SecurityExceptionHandler.",
"status": "present",
"nodeId": null
},
{
"patternRole": "Verification manager",
"entity": "authenticate",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/controller/AuthController.java",
"lines": "38",
"notes": "Reached from Enforcer login (AuthController.java:38). Spring Security's ProviderManager/DaoAuthenticationProvider.authenticate (AuthenticationManager bean exposed at SecurityConfig.java:54) loads the user via the UserDetailsService and checks the password; no in-repo AuthenticationProvider.",
"status": "external",
"nodeId": null
},
{
"patternRole": "Password store",
"entity": "loadContentmunchUser",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/service/PropertyUserDetailsService.java",
"lines": "14",
"notes": "DaoAuthenticationProvider calls loadUserByUsername (ContentmunchUserDetailsService.java:11), which delegates to PropertyUserDetailsService.loadContentmunchUser, the default bean (AuthenticationAutoConfiguration.java:23, @ConditionalOnMissingBean). It looks users (with password field) up in contentmunch.auth.users config properties (AuthConfigProperties.java:17); the stored value may be plaintext or {id}-prefixed hash depending on config.",
"status": "present",
"nodeId": null
},
{
"patternRole": "Hasher",
"entity": "matches",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/config/SecurityConfig.java",
"lines": "55",
"notes": "Called internally by DaoAuthenticationProvider (from authenticate at AuthController.java:38). No PasswordEncoder bean is declared in the repo, so Spring uses the default DelegatingPasswordEncoder (PasswordEncoderFactories, bcrypt by default / {noop} etc.) when building the AuthenticationManager at SecurityConfig.java:55; one matches call covers both Hasher and Comparator.",
"status": "external",
"nodeId": null
},
{
"patternRole": "Pepper store",
"entity": "",
"file": "",
"lines": "",
"notes": "No pepper on the login path; searched for pepper/secret/HMAC. contentmunch.auth.secret (AuthConfigProperties.java:15) is the JWT signing key used in TokenizationService.init, not a pepper.",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Encrypter",
"entity": "",
"file": "",
"lines": "",
"notes": "No encryption of the password hash with a pepper anywhere on the DaoAuthenticationProvider path; only JWT HMAC signing exists (TokenizationService.java:42), unrelated to password verification.",
"status": "missing",
"nodeId": null
},
{
"patternRole": "Comparator",
"entity": "matches",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/config/SecurityConfig.java",
"lines": "55",
"notes": "Same single call as Hasher: DaoAuthenticationProvider.additionalAuthenticationChecks invokes the default DelegatingPasswordEncoder.matches, which hashes and compares; activated via the AuthenticationManager built at SecurityConfig.java:55 and reached from authenticate at AuthController.java:38.",
"status": "external",
"nodeId": null
},
{
"patternRole": "System",
"entity": "generateAccessToken",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/service/TokenizationService.java",
"lines": "45",
"notes": "Success branch of Enforcer login (AuthController.java:44) issues the JWT access token (and refresh token at line 45) via TokenizationService.generateAccessToken, then sets cookies and returns the user.",
"status": "present",
"nodeId": null
}
],
"interaction_order": {
"available": true,
"language": "java",
"repo": "contentmunch_contentmunch-parent",
"reason": "",
"entryRole": "Enforcer",
"entryRule": "behaviour",
"interactions": [
{
"rank": 1,
"interaction": "Enforcer \u2192 Verification manager",
"from": "Enforcer",
"to": "Verification manager",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/controller/AuthController.java",
"line": 38,
"via": [],
"mechanism": "call",
"path": [
{
"caller": "com.contentmunch.authentication.controller.AuthController.login:org.springframework.http.ResponseEntity(com.contentmunch.authentication.model.AuthRequest,jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse)",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/controller/AuthController.java",
"line": 38,
"code": "this.authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(authRequest.username(), authRequest.pas\u2026",
"callee": "org.springframework.security.authentication.AuthenticationManager.authenticate:<unresolvedSignature>(1)",
"mechanism": "call"
}
],
"parent": ""
},
{
"rank": 2,
"interaction": "Verification manager \u2192 Password store",
"from": "Verification manager",
"to": "Password store",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/service/ContentmunchUserDetailsService.java",
"line": 12,
"via": [],
"mechanism": "call",
"path": [
{
"caller": "com.contentmunch.authentication.service.ContentmunchUserDetailsService.loadUserByUsername:org.springframework.security.core.userdetails.UserDetails(java.lang.String)",
"file": "contentmunch-auth-spring-boot-starter/src/main/java/com/contentmunch/authentication/service/ContentmunchUserDetailsService.java",
"line": 12,
"code": "this.loadContentmunchUser(username)",
"callee": "com.contentmunch.authentication.service.PropertyUserDetailsService.loadContentmunchUser:com.contentmunch.authentication.model.ContentmunchUser(java.lang.String)",
"mechanism": "call"
}
],
"parent": "Enforcer \u2192 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": "external"
}
],
"skippedRoles": [
"Subject",
"System"
]
}
}

Xet Storage Details

Size:
7.98 kB
·
Xet hash:
a4197c1a26c3eda35ab2b6ed66b702e948c722bec2112b40fddd7dee2a490ffd

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