AnonymousSpottedToad/securityPatternsRecovery / ground_truth /java /authentication_pwd__etiya-pair2_microservices.json
| { | |
| "role_mappings": [ | |
| { | |
| "patternRole": "Subject", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No in-repo client (UI/SDK/CLI) sends credentials to POST /api/v1/identity/auth/login; the caller is outside the repo. Searched all modules for .js/.ts/.html and client code.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Enforcer", | |
| "entity": "login", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/controller/AuthController.java", | |
| "lines": "23", | |
| "notes": "Anchor: POST /api/v1/identity/auth/login route handler; forwards LoginRequest (email, password) to AuthService.login at AuthController.java:24 and only returns a token when that call does not throw. SecurityFilterChain permits all requests (SecurityConfiguration.java:53), so the login endpoint itself is the enforcement point.", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Verification manager", | |
| "entity": "login", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "lines": "24", | |
| "notes": "Reached from Enforcer AuthController.java:24. Loads the user via userService.loadUserByUsername (line 25), calls passwordEncoder.matches (line 26) and throws RuntimeException on mismatch (line 28).", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Password store", | |
| "entity": "findByEmailIgnoreCase", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/repository/UserRepository.java", | |
| "lines": "12", | |
| "notes": "Verification manager calls userService.loadUserByUsername (AuthServiceImpl.java:25 -> UserServiceImpl.java:60), which calls this Spring Data JPA query (UserServiceImpl.java:61) returning the User entity whose password field holds the bcrypt hash (set via passwordEncoder.encode at registration, AuthServiceImpl.java:40).", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Hasher", | |
| "entity": "BCryptPasswordEncoder", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/core/configuration/SecurityConfiguration.java", | |
| "lines": "24", | |
| "notes": "Spring Security BCryptPasswordEncoder instantiated in the passwordEncoder bean (SecurityConfiguration.java:23-24) and injected into AuthServiceImpl; the single matches call at AuthServiceImpl.java:26 both hashes and compares. The duplicate bean in core BaseSecurityConfiguration.java:12 is not component-scanned by identityservice.", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Pepper store", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No pepper on the login path; only bcrypt with its per-hash salt. Grepped for pepper/secret usage in identityservice and core; the JWT SECRET_KEY in BaseJwtService is for token signing, not a pepper.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Encrypter", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No encryption of the password hash on the verification path (AuthServiceImpl.login only calls bcrypt matches). No Cipher/HMAC over passwords found in the repo.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Comparator", | |
| "entity": "matches", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "lines": "26", | |
| "notes": "Verification manager AuthServiceImpl.login calls Spring Security PasswordEncoder.matches (BCryptPasswordEncoder) with the raw and stored password at line 26; the same call also performs the hashing (Hasher). Result drives the reject at line 28.", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "System", | |
| "entity": "generateToken", | |
| "file": "core/src/main/java/io/github/sabaurgup/security/BaseJwtService.java", | |
| "lines": "23", | |
| "notes": "On successful verification AuthServiceImpl.login calls baseJwtService.generateToken(user.getUsername()) (AuthServiceImpl.java:30) to issue a signed JWT returned in TokenResponse; the BaseJwtService bean is declared in SecurityConfiguration.java:28.", | |
| "status": "present", | |
| "nodeId": null | |
| } | |
| ], | |
| "interaction_order": { | |
| "available": true, | |
| "language": "java", | |
| "repo": "etiya-pair2_microservices", | |
| "reason": "", | |
| "entryRole": "Enforcer", | |
| "entryRule": "behaviour", | |
| "interactions": [ | |
| { | |
| "rank": 1, | |
| "interaction": "Enforcer \u2192 Verification manager", | |
| "from": "Enforcer", | |
| "to": "Verification manager", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/controller/AuthController.java", | |
| "line": 24, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "com.etiya.identityservice.controller.AuthController.login:org.springframework.http.ResponseEntity(com.etiya.identityservice.dto.Auth.LoginRequest)", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/controller/AuthController.java", | |
| "line": 24, | |
| "code": "this.authService.login(loginRequest)", | |
| "callee": "com.etiya.identityservice.service.concretes.AuthServiceImpl.login:com.etiya.identityservice.dto.Auth.TokenResponse(com.etiya.identityservice.dto.Auth.LoginRequest)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| }, | |
| { | |
| "rank": 2, | |
| "interaction": "Verification manager \u2192 Password store", | |
| "from": "Verification manager", | |
| "to": "Password store", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/UserServiceImpl.java", | |
| "line": 61, | |
| "via": [ | |
| "com.etiya.identityservice.service.concretes.UserServiceImpl.loadUserByUsername:org.springframework.security.core.userdetails.UserDetails(java.lang.String)" | |
| ], | |
| "mechanism": "dispatch", | |
| "path": [ | |
| { | |
| "caller": "com.etiya.identityservice.service.concretes.AuthServiceImpl.login:com.etiya.identityservice.dto.Auth.TokenResponse(com.etiya.identityservice.dto.Auth.LoginRequest)", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "line": 25, | |
| "code": "this.userService.loadUserByUsername(loginRequest.getEmail())", | |
| "callee": "com.etiya.identityservice.service.concretes.UserServiceImpl.loadUserByUsername:org.springframework.security.core.userdetails.UserDetails(java.lang.String)", | |
| "mechanism": "dispatch" | |
| }, | |
| { | |
| "caller": "com.etiya.identityservice.service.concretes.UserServiceImpl.loadUserByUsername:org.springframework.security.core.userdetails.UserDetails(java.lang.String)", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/UserServiceImpl.java", | |
| "line": 61, | |
| "code": "this.userRepository.findByEmailIgnoreCase(username)", | |
| "callee": "com.etiya.identityservice.repository.UserRepository.findByEmailIgnoreCase:java.util.Optional(java.lang.String)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Verification manager" | |
| }, | |
| { | |
| "rank": 3, | |
| "interaction": "Verification manager \u2192 Hasher", | |
| "from": "Verification manager", | |
| "to": "Hasher", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "line": 26, | |
| "via": [], | |
| "mechanism": "dependency-injection", | |
| "path": [ | |
| { | |
| "caller": "com.etiya.identityservice.service.concretes.AuthServiceImpl.login:com.etiya.identityservice.dto.Auth.TokenResponse(com.etiya.identityservice.dto.Auth.LoginRequest)", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "line": 26, | |
| "code": "this.passwordEncoder.matches(loginRequest.getPassword(), user.getPassword())", | |
| "callee": "com.etiya.identityservice.core.configuration.SecurityConfiguration.passwordEncoder:org.springframework.security.crypto.password.PasswordEncoder()", | |
| "mechanism": "dependency-injection" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Verification manager" | |
| }, | |
| { | |
| "rank": 4, | |
| "interaction": "Verification manager \u2192 Comparator", | |
| "from": "Verification manager", | |
| "to": "Comparator", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "line": 26, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "com.etiya.identityservice.service.concretes.AuthServiceImpl.login:com.etiya.identityservice.dto.Auth.TokenResponse(com.etiya.identityservice.dto.Auth.LoginRequest)", | |
| "file": "identityservice/src/main/java/com/etiya/identityservice/service/concretes/AuthServiceImpl.java", | |
| "line": 26, | |
| "code": "this.passwordEncoder.matches(loginRequest.getPassword(), user.getPassword())", | |
| "callee": "org.springframework.security.crypto.password.PasswordEncoder.matches:<unresolvedSignature>(2)", | |
| "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": "METHOD" | |
| } | |
| ], | |
| "skippedRoles": [ | |
| "Subject", | |
| "System" | |
| ] | |
| } | |
| } |
Xet Storage Details
- Size:
- 10.3 kB
- Xet hash:
- ca77643cf523c64ddbc9623bee7c1a564367e229e39c677b941747eac2014a1c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.