AnonymousSpottedToad/securityPatternsRecovery / ground_truth /java /authentication_pwd__ncats_gsrs-spring-starter.json
| { | |
| "role_mappings": [ | |
| { | |
| "patternRole": "Subject", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "The caller sending auth-username/auth-password headers is outside the repo; grep for 'auth-password' only hits LegacyAuthenticationFilter. No in-repo UI/SDK/CLI client targets this enforcer (tests excluded).", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Enforcer", | |
| "entity": "doFilterInternal", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "lines": "74", | |
| "notes": "doFilterInternal in LegacyAuthenticationFilter, registered via addFilterBefore in LegacyGsrsSecurityConfiguration.filterChain (LegacyGsrsSecurityConfiguration.java:110). It reads auth-username/auth-password headers (lines 161-162), calls up.acceptPassword (line 173), throws BadCredentialsException on mismatch (line 190) and otherwise sets the SecurityContext and continues the chain; unauthenticated requests get 403 (line 231).", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Verification manager", | |
| "entity": "acceptPassword", | |
| "file": "gsrs-core-entities/src/main/java/ix/core/models/UserProfile.java", | |
| "lines": "206", | |
| "notes": "Reached from Enforcer doFilterInternal at LegacyAuthenticationFilter.java:173. acceptPassword in UserProfile gathers the stored hashp and salt of the loaded profile, calls hasher.hash(password, salt) (line 211), falls back to legacy Util.encrypt SHA-1 and triggers rehash via setPassword. LegacyGsrsAuthenticationProvider.authenticate (line 92) calls the same method for LegacyUserPassAuthentication, but nothing in production constructs that token.", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Password store", | |
| "entity": "findByUser_UsernameIgnoreCase", | |
| "file": "gsrs-core-entities/src/main/java/gsrs/repository/UserProfileRepository.java", | |
| "lines": "24", | |
| "notes": "Called by Enforcer doFilterInternal at LegacyAuthenticationFilter.java:165 before acceptPassword. Spring Data JPA derived query declared in the repo's UserProfileRepository, loading UserProfile (table ix_core_userprof) with hashp and salt fields (UserProfile.java:58-59).", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Hasher", | |
| "entity": "generateSecret", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "lines": "59", | |
| "notes": "Verification manager acceptPassword (UserProfile.java:211) calls hasher.hash -> GsrsPasswordHasher.hash(String...) (line 27) -> hash(input, salt, iterations) (line 54), which calls JCA SecretKeyFactory 'PBKDF2WithHmacSHA512' generateSecret (1000 iterations). The hasher instance is configured at UserProfile.java:37. Legacy fallback Util.encrypt (SHA-1, Util.java:372) also exists on the path.", | |
| "status": "external", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Pepper store", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No pepper on the path: acceptPassword (UserProfile.java:206) hashes only password + per-user salt (salt from LegacyTypeSalter, UserProfile.java:35, is not a pepper). No secret/pepper config found.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Encrypter", | |
| "entity": "", | |
| "file": "", | |
| "lines": "", | |
| "notes": "No encryption of the hash with a key on the verification path. Util.encrypt (gsrs-core/src/main/java/ix/utils/Util.java:372) is despite its name a salted SHA-1 hash, not encryption, so it is not an Encrypter.", | |
| "status": "missing", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "Comparator", | |
| "entity": "acceptPassword", | |
| "file": "gsrs-core-entities/src/main/java/ix/core/models/UserProfile.java", | |
| "lines": "206", | |
| "notes": "The comparison is inline in the Verification manager acceptPassword: this.hashp.equals(hasher.hash(password, this.salt)) at UserProfile.java:211 (and legacy equals at line 216); result returned via setMatchesRepository. Same method as Verification manager; plain String.equals, not constant-time.", | |
| "status": "present", | |
| "nodeId": null | |
| }, | |
| { | |
| "patternRole": "System", | |
| "entity": "login", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/controller/LoginController.java", | |
| "lines": "68", | |
| "notes": "After Enforcer doFilterInternal sets the authentication (LegacyAuthenticationFilter.java:255) and continues the chain (line 257), GET api/v1/whoami reaches LoginController.login (@PreAuthorize isAuthenticated), which creates the server session and session cookie and returns the user profile. LoginController is imported by GsrsLegacyAuthenticationSelector.java:28 alongside the security config.", | |
| "status": "present", | |
| "nodeId": null | |
| } | |
| ], | |
| "interaction_order": { | |
| "available": true, | |
| "language": "java", | |
| "repo": "ncats_gsrs-spring-starter", | |
| "reason": "", | |
| "entryRole": "Enforcer", | |
| "entryRule": "behaviour", | |
| "interactions": [ | |
| { | |
| "rank": 1, | |
| "interaction": "Enforcer \u2192 Password store", | |
| "from": "Enforcer", | |
| "to": "Password store", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 148, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "gsrs.security.LegacyAuthenticationFilter.doFilterInternal:void(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.FilterChain)", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 148, | |
| "code": "this.repository.findByUser_UsernameIgnoreCase(username)", | |
| "callee": "gsrs.repository.UserProfileRepository.findByUser_UsernameIgnoreCase:ix.core.models.UserProfile(java.lang.String)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| }, | |
| { | |
| "rank": 2, | |
| "interaction": "Enforcer \u2192 Verification manager", | |
| "from": "Enforcer", | |
| "to": "Verification manager", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 173, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "gsrs.security.LegacyAuthenticationFilter.doFilterInternal:void(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.FilterChain)", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 173, | |
| "code": "up.acceptPassword(pass)", | |
| "callee": "ix.core.models.UserProfile.acceptPassword:gsrs.model.UserProfileAuthenticationResult(java.lang.String)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| }, | |
| { | |
| "rank": 3, | |
| "interaction": "Enforcer \u2192 Comparator", | |
| "from": "Enforcer", | |
| "to": "Comparator", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 173, | |
| "via": [], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "gsrs.security.LegacyAuthenticationFilter.doFilterInternal:void(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.FilterChain)", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 173, | |
| "code": "up.acceptPassword(pass)", | |
| "callee": "ix.core.models.UserProfile.acceptPassword:gsrs.model.UserProfileAuthenticationResult(java.lang.String)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| }, | |
| { | |
| "rank": 4, | |
| "interaction": "Verification manager \u2192 Comparator", | |
| "from": "Verification manager", | |
| "to": "Comparator", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 173, | |
| "via": [], | |
| "mechanism": "co-located", | |
| "path": [ | |
| { | |
| "caller": "gsrs.security.LegacyAuthenticationFilter.doFilterInternal:void(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.FilterChain)", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 173, | |
| "code": "up.acceptPassword(pass)", | |
| "callee": "ix.core.models.UserProfile.acceptPassword:gsrs.model.UserProfileAuthenticationResult(java.lang.String)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Verification manager" | |
| }, | |
| { | |
| "rank": 5, | |
| "interaction": "Verification manager \u2192 Hasher", | |
| "from": "Verification manager", | |
| "to": "Hasher", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 59, | |
| "via": [ | |
| "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)" | |
| ], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "ix.core.models.UserProfile.acceptPassword:gsrs.model.UserProfileAuthenticationResult(java.lang.String)", | |
| "file": "gsrs-core-entities/src/main/java/ix/core/models/UserProfile.java", | |
| "line": 211, | |
| "code": "UserProfile.hasher.hash(password, this.salt)", | |
| "callee": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 33, | |
| "code": "hash(values[0], values.length > 1 ? values[1] : null, iterations)", | |
| "callee": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 59, | |
| "code": "skf.generateSecret(spec)", | |
| "callee": "javax.crypto.SecretKeyFactory.generateSecret:javax.crypto.SecretKey(java.security.spec.KeySpec)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Verification manager" | |
| }, | |
| { | |
| "rank": 6, | |
| "interaction": "Comparator \u2192 Hasher", | |
| "from": "Comparator", | |
| "to": "Hasher", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 59, | |
| "via": [ | |
| "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)" | |
| ], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "ix.core.models.UserProfile.acceptPassword:gsrs.model.UserProfileAuthenticationResult(java.lang.String)", | |
| "file": "gsrs-core-entities/src/main/java/ix/core/models/UserProfile.java", | |
| "line": 211, | |
| "code": "UserProfile.hasher.hash(password, this.salt)", | |
| "callee": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 33, | |
| "code": "hash(values[0], values.length > 1 ? values[1] : null, iterations)", | |
| "callee": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 59, | |
| "code": "skf.generateSecret(spec)", | |
| "callee": "javax.crypto.SecretKeyFactory.generateSecret:javax.crypto.SecretKey(java.security.spec.KeySpec)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "Enforcer \u2192 Comparator" | |
| }, | |
| { | |
| "rank": 7, | |
| "interaction": "Enforcer \u2192 Hasher", | |
| "from": "Enforcer", | |
| "to": "Hasher", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 59, | |
| "via": [ | |
| "gsrs.security.LegacyAuthenticationFilter.<lambda>11:<unresolvedSignature>(1)", | |
| "ix.core.models.UserProfile.setPassword:void(java.lang.String)", | |
| "gsrs.util.LegacyTypeSalter.generateSalt:java.lang.String()", | |
| "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)" | |
| ], | |
| "mechanism": "call", | |
| "path": [ | |
| { | |
| "caller": "gsrs.security.LegacyAuthenticationFilter.doFilterInternal:void(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.FilterChain)", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 179, | |
| "code": "", | |
| "callee": "gsrs.security.LegacyAuthenticationFilter.<lambda>11:<unresolvedSignature>(1)", | |
| "mechanism": "route-registration" | |
| }, | |
| { | |
| "caller": "gsrs.security.LegacyAuthenticationFilter.<lambda>11:<unresolvedSignature>(1)", | |
| "file": "gsrs-spring-boot-autoconfigure/src/main/java/gsrs/security/LegacyAuthenticationFilter.java", | |
| "line": 181, | |
| "code": "opt.get().setPassword(pass)", | |
| "callee": "ix.core.models.UserProfile.setPassword:void(java.lang.String)", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "ix.core.models.UserProfile.setPassword:void(java.lang.String)", | |
| "file": "gsrs-core-entities/src/main/java/ix/core/models/UserProfile.java", | |
| "line": 232, | |
| "code": "UserProfile.salter.generateSalt()", | |
| "callee": "gsrs.util.LegacyTypeSalter.generateSalt:java.lang.String()", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.LegacyTypeSalter.generateSalt:java.lang.String()", | |
| "file": "gsrs-core/src/main/java/gsrs/util/LegacyTypeSalter.java", | |
| "line": 27, | |
| "code": "this.hasher.hash(text)", | |
| "callee": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String[])", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 33, | |
| "code": "hash(values[0], values.length > 1 ? values[1] : null, iterations)", | |
| "callee": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)", | |
| "mechanism": "call" | |
| }, | |
| { | |
| "caller": "gsrs.util.GsrsPasswordHasher.hash:java.lang.String(java.lang.String,java.lang.String,int)", | |
| "file": "gsrs-core/src/main/java/gsrs/util/GsrsPasswordHasher.java", | |
| "line": 59, | |
| "code": "skf.generateSecret(spec)", | |
| "callee": "javax.crypto.SecretKeyFactory.generateSecret:javax.crypto.SecretKey(java.security.spec.KeySpec)", | |
| "mechanism": "call" | |
| } | |
| ], | |
| "parent": "" | |
| } | |
| ], | |
| "anchoredRoles": [ | |
| { | |
| "role": "Comparator", | |
| "kind": "METHOD" | |
| }, | |
| { | |
| "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:
- 17 kB
- Xet hash:
- d875d94e44b74bd1d9ac93b1b2d57689cfa61d5ea965bdc149422bf9e05b76bb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.