-
Notifications
You must be signed in to change notification settings - Fork 11
#CCSD-389 Birth& death module integrated with user service for applicant #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
7d9f509
4736815
fadfc7d
dc8d579
5023cc5
052906d
eeace25
493063a
5fc18e7
5bf31b6
fec4270
e042266
df064cb
9359fe2
97b892d
46e505c
2ded6a2
84a7ac3
35469af
c230226
be2659a
65e696c
ab15116
68e90cf
e25db60
1e7846b
cd85af3
6b29abd
64e66ce
9502b38
a900d87
26dfb90
ac72469
91cfbd4
03bb712
76a5f3d
7bf3bf4
bbc5ebd
99197ff
17fb349
a98b559
40b1144
226ce8b
794f0a9
e25358b
844e0b6
49f38e2
dd93ca9
5d77c11
99fb68a
e680d63
bf62f4c
1c14de6
3bddf3c
e018832
8cae1b9
7938e81
c2bd1aa
a87e015
b4290a7
343acc8
251edd2
e61b535
2ac5a29
f919077
f6b05d0
112a4df
38e108f
48c3608
2b56ec9
81dd6f7
30508d7
4d892e3
845ae68
2e857d5
5b94e8d
ea7ff02
8335433
274fd4d
e311580
fe46ad9
6302a6f
c1b0c20
3c24e10
4009e4f
4c07a9a
0bcf084
e627391
6caa525
1898d43
ec17263
867329b
bd38dd2
b63918c
1722b94
8679316
62f10c5
3013b89
549fdd8
04cd799
a836c35
a46a242
9c896e2
028631c
0405052
8caec64
98a8713
15e6c42
c233821
7673fda
8f05648
429d241
90b3be5
0a14f43
8939f62
d1964dd
0d06055
a581e9b
514bec1
2af1e73
95761b1
42c116f
4f4b33a
3bc9693
9b7e288
b00972e
a4e1c38
684884f
11d3d11
63bdfbe
6b69d6e
532f885
e96a8fb
eaace9b
083eda6
568194b
db58601
5a92b7e
aef7768
b892557
90d8c6c
f7e6edf
c97181b
357333d
936ec29
70718c3
68fec80
59b838f
84956af
106017b
1790905
8255aec
0b54d33
6828302
83aef84
65c0b95
b64f683
8c4eec2
584bd3e
fd52ea0
bd19fe2
cd9785f
c3365ec
769967c
c5e9f7d
346ef46
0ab89a4
6d31c7f
e52c7be
17fd7c7
cf7f19e
ba4d6a9
3735a93
612de3f
747c9f8
4d2400e
7f40a85
d93b9b4
7bc3266
8b2c9d3
7b012af
03305b2
784ab31
fb9e753
d392703
6d2f88a
2e46e1d
c6a77d1
a6ad1cc
e800c55
26594e9
11c997c
a4714df
ce9895a
7cb3745
e3c34ed
7d9a462
3ced30b
9b91727
af0eee2
886906c
7908ac0
7badc30
5d1b175
0079c04
8dec6e1
4367291
29bd234
70f3c29
6623de2
2f3b50d
732cd7b
cdffda6
8fb76ae
07f2bdf
bc9cbe3
5ef7e58
3148803
12a3ae5
2c1dc4f
6559335
e2316cb
50fb409
f922754
57a2bf8
8a293cb
28ee62c
05cf7af
1d6a249
c49264e
9bf0c68
bfc6d7c
df1ac97
3c66668
28b5089
c13118e
7284618
bd0914e
b8a5e62
5e30d11
860d5ba
39319e5
303d7a7
6d5ba04
862e717
7a9e7b4
92829a4
4d23d9f
5606bc8
d9e06a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -205,7 +205,8 @@ public EgovPdfResp saveBirthCertPdf(BirthPdfApplicationRequest pdfApplicationReq | |
| try { | ||
| SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy"); | ||
| pdfApplicationRequest.getBirthCertificate().forEach(cert-> { | ||
| String uiHost = config.getUiAppHost(); | ||
| String stateLevelTenantId = centralInstanceUtil.getStateLevelTenant(cert.getTenantid()); | ||
| String uiHost = config.getUiAppHostMap().get(stateLevelTenantId); | ||
| String birthCertPath = config.getBirthCertLink(); | ||
| birthCertPath = birthCertPath.replace("$id",cert.getId()); | ||
| birthCertPath = birthCertPath.replace("$tenantId",cert.getTenantid()); | ||
|
|
@@ -260,7 +261,7 @@ public List<EgBirthDtl> getBirthDtlsAll(SearchCriteria criteria ,RequestInfo req | |
| birthDtls.forEach(birthDtl -> { | ||
| birthDtl.setBirthFatherInfo(encryptionDecryptionUtil.decryptObject(birthDtl.getBirthFatherInfo(), BirthDeathConstants.BND_DESCRYPT_KEY, EgBirthFatherInfo.class, requestInfo)); | ||
| birthDtl.setBirthMotherInfo(encryptionDecryptionUtil.decryptObject(birthDtl.getBirthMotherInfo(), BirthDeathConstants.BND_DESCRYPT_KEY, EgBirthMotherInfo.class, requestInfo)); | ||
| commonUtils.maskAndShowLast4Chars(birthDtl); | ||
| // commonUtils.maskAndShowLast4Chars(birthDtl); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify security implications of disabling data masking. Commenting out the masking functionality will expose sensitive personal information (mobile numbers, Aadhar numbers) in full. While this may be necessary for user enrichment, ensure that:
🏁 Script executed: #!/bin/bash
# Description: Verify access control and security measures for unmasked data exposure
# Check for any access control annotations or security configurations
rg -A 3 -B 3 "PreAuthorize|Secured|RolesAllowed" --type java
# Check for audit logging implementations
rg -A 5 "audit|log.*access|sensitive.*data" --type javaLength of output: 293339 Implement authorization & audit logging for full sensitive data The To fix: • Apply a method-level security annotation (e.g., Example diff: @@ public List<BirthDtl> getBirthDtlsAll(...) {
- // commonUtils.maskAndShowLast4Chars(birthDtl);
+ @PreAuthorize("hasAuthority('VIEW_FULL_BIRTH_DETAILS')")
+ logger.info("Audit: user {} retrieved full birth details at {}",
+ requestInfo.getUserInfo().getUuid(), Instant.now());
return birthDetails;
}
🤖 Prompt for AI Agents |
||
| }); | ||
| } | ||
| return birthDtls; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ public List<EgBirthDtl> extractData(ResultSet rs) throws SQLException, DataAcces | |
| .aadharno(rs.getString("bmotaadharno")).build(); | ||
| motherInfo.setFullName(utils.addfullName(motherInfo.getFirstname(),motherInfo.getMiddlename(),motherInfo.getLastname())); | ||
|
|
||
| EgBirthFatherInfo fatherInfo = EgBirthFatherInfo.builder().firstname(rs.getString("bfatfn")).middlename(rs.getString("bfatmn")).lastname(rs.getString("bfatln")) | ||
| EgBirthFatherInfo fatherInfo = EgBirthFatherInfo.builder().firstname(rs.getString("bfatfn")).middlename(rs.getString("bfatmn")).lastname(rs.getString("bfatln")).mobileno(rs.getString("bfatfmobileno")) | ||
| .aadharno(rs.getString("bfataadharno")).build(); | ||
|
Comment on lines
+38
to
39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify column name consistency across modules. The column alias 🏁 Script executed: #!/bin/bash
# Description: Check column alias consistency for father's mobile number across birth and death modules
# Check birth query builders for father mobile number aliases
rg "bfat.*mobileno" birth-death-services/src/main/java/org/bel/birthdeath/birth/
# Check death query builders for father mobile number aliases
rg "bfat.*mobileno" birth-death-services/src/main/java/org/bel/birthdeath/death/Length of output: 3076 Align father’s mobile column alias across modules. The birth module’s • In bfat.mobileno bfatfmobilenoto bfat.mobileno bfatmobileno• In - .mobileno(rs.getString("bfatfmobileno"))
+ .mobileno(rs.getString("bfatmobileno"))Please apply these changes to all query‐builder fragments (e.g., any select or count methods) and their corresponding row mappers in the birth module so that both birth and death services use the same 🤖 Prompt for AI Agents |
||
| fatherInfo.setFullName(utils.addfullName(fatherInfo.getFirstname(),fatherInfo.getMiddlename(),fatherInfo.getLastname())); | ||
|
|
||
|
|
@@ -52,7 +52,7 @@ public List<EgBirthDtl> extractData(ResultSet rs) throws SQLException, DataAcces | |
| presentaddr.getDistrict(),presentaddr.getCity(),presentaddr.getState(),presentaddr.getPinno(),presentaddr.getCountry())); | ||
|
|
||
| birthDtl = EgBirthDtl.builder().id(birthdtlid).registrationno(rs.getString("registrationno")).hospitalname(rs.getString("hospitalname")).dateofreport(rs.getTimestamp("dateofreport")).gender(rs.getInt("gender")) | ||
| .dateofbirth(rs.getTimestamp("dateofbirth")).counter(rs.getInt("counter")).genderStr(rs.getString("genderstr")).tenantid(rs.getString("tenantid")).dateofissue(System.currentTimeMillis()) | ||
| .dateofbirth(rs.getTimestamp("dateofbirth")).counter(rs.getInt("counter")).genderStr(rs.getString("genderstr")).tenantid(rs.getString("tenantid")).dateofissue(rs.getTimestamp("dateofreport") != null ? rs.getTimestamp("dateofreport").getTime() : System.currentTimeMillis()) | ||
| .firstname(rs.getString("bdtlfn")).middlename(rs.getString("bdtlmn")).lastname(rs.getString("bdtlln")).birthMotherInfo(motherInfo).birthFatherInfo(fatherInfo) | ||
| .birthPermaddr(permaddr).birthPresentaddr(presentaddr).placeofbirth(rs.getString("placeofbirth")).remarks(rs.getString("remarks")) | ||
| .build(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify dependency versions for security and compatibility.
The new validation and utility dependencies support the user management features well. However, ensure these versions are current and secure.
🌐 Web query:
💡 Result:
After reviewing the specified versions of the libraries—
javax.validation:validation-api:2.0.1.Final,hibernate-validator:7.0.5.Final,jakarta.el:4.0.2, andjson-smart:2.5.0—I have identified the following security considerations:1. javax.validation:validation-api:2.0.1.Final
This version does not have any known direct security vulnerabilities. (security.snyk.io)
2. hibernate-validator:7.0.5.Final
While this version is newer than some older vulnerable versions, it is not the latest release. The latest version is
hibernate-validator:8.0.2.Final. Upgrading to this version is recommended to benefit from the latest security patches and improvements. (security.snyk.io)3. jakarta.el:4.0.2
No specific security vulnerabilities have been identified for this version.
4. json-smart:2.5.0
No specific security vulnerabilities have been identified for this version.
Recommendations:
Upgrade Hibernate Validator: To ensure your application is protected against known vulnerabilities, consider upgrading to the latest version of Hibernate Validator.
Regularly Monitor Dependencies: Stay informed about security updates for all your project dependencies. Utilize tools like Snyk or the National Vulnerability Database (NVD) to monitor and manage vulnerabilities.
By proactively managing your dependencies and keeping them up to date, you can enhance the security and stability of your application.
Citations:
Upgrade Hibernate Validator to the Latest Release
All other versions appear free of known vulnerabilities, but
hibernate-validator:7.0.5.Finalis not the most recent. Please update it to the current secure release:• File: birth-death-services/pom.xml
– Change
<version>7.0.5.Final</version>to
<version>8.0.2.Final</version>Continue to monitor all dependencies (e.g., via Snyk or the NVD) for future security patches.
🤖 Prompt for AI Agents