Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
392 commits
Select commit Hold shift + click to select a range
45399c2
fix: changed application properties
vishwab1 Aug 26, 2025
e305d5d
fix: removed firebase enabled
vishwab1 Aug 26, 2025
b9fd226
fix: added firebase enabled
vishwab1 Aug 26, 2025
84a75fa
fix firebase issue
SauravBizbRolly Aug 27, 2025
0695327
Merge remote-tracking branch 'upstream/release-3.6.0' into release-3.6.0
SauravBizbRolly Aug 27, 2025
6b3d22e
fix sms issue
SauravBizbRolly Aug 28, 2025
355eafe
fix sms issue
SauravBizbRolly Aug 28, 2025
c1caeae
fix sms issue
SauravBizbRolly Aug 28, 2025
ff53e66
fix firebase code issue
SauravBizbRolly Aug 28, 2025
9df0542
fix code issue
SauravBizbRolly Aug 28, 2025
c2b1a44
fix code issue
SauravBizbRolly Aug 28, 2025
eccc116
fix code issue
SauravBizbRolly Aug 28, 2025
abfc4e4
fix code issue
SauravBizbRolly Aug 28, 2025
ace7340
fix code issue
SauravBizbRolly Aug 28, 2025
86042b9
fix code issue
SauravBizbRolly Aug 28, 2025
555e274
fix code issue
SauravBizbRolly Aug 28, 2025
17bad73
fix code issue
SauravBizbRolly Aug 28, 2025
9f2ebd6
fix code issue
SauravBizbRolly Aug 28, 2025
edb6137
fix code issue
SauravBizbRolly Aug 28, 2025
3dd6522
fix code issue
SauravBizbRolly Aug 28, 2025
3aa039e
fix code issue
SauravBizbRolly Aug 28, 2025
16194a1
fix code issue
SauravBizbRolly Aug 28, 2025
aaf41c9
fix code issue
SauravBizbRolly Aug 28, 2025
4771ce6
fix code issue
SauravBizbRolly Aug 28, 2025
6f1cc9a
Merge branch 'release-3.6.0' into release-3.6.0-develop
vishwab1 Sep 1, 2025
089035d
fix code issue
SauravBizbRolly Sep 2, 2025
f75892e
VAPT: File Upload Validation and Security Hardening (#285)
vishwab1 Sep 2, 2025
fa648d2
Update application.properties
SauravBizbRolly Sep 2, 2025
79cc8b1
Beneficiary consent
SauravBizbRolly Mar 10, 2025
ab64879
Beneficiary consent
SauravBizbRolly Apr 10, 2025
88b042a
Beneficiary consent
SauravBizbRolly Apr 10, 2025
50416d6
Beneficiary consent
SauravBizbRolly Jun 13, 2025
afdf9f0
Beneficiary consent
SauravBizbRolly Mar 10, 2025
0d22d68
firebase setup
SauravBizbRolly Apr 11, 2025
ad11e10
firebase setup
SauravBizbRolly Apr 11, 2025
2f281b0
firebase setup
SauravBizbRolly Apr 11, 2025
f8d2784
firebase setup
SauravBizbRolly Apr 14, 2025
d113d36
firebase setup
SauravBizbRolly Apr 17, 2025
acd9ee1
Firebase Configuration in ci
SauravBizbRolly Apr 17, 2025
77b823f
Firebase Configuration in ci
SauravBizbRolly Apr 17, 2025
2ab86e1
firebase notification setup
SauravBizbRolly May 2, 2025
3551a00
Firebase update userToken
SauravBizbRolly Jun 19, 2025
bddf0dc
Firebase update userToken
SauravBizbRolly Jun 19, 2025
affd611
Add firebase variables in common_docker.properties
SauravBizbRolly Jun 19, 2025
13031c4
Add firebase variables in common_docker.properties
SauravBizbRolly Jun 19, 2025
433ffec
update firebase variables in common_docker.properties
SauravBizbRolly Jun 20, 2025
af65376
update firebase variables in common_docker.properties
SauravBizbRolly Jun 20, 2025
d4d6cbf
update firebase variables in common_docker.properties
SauravBizbRolly Jun 20, 2025
1441f99
fixed code
SauravBizbRolly Jun 21, 2025
4376a8a
fixed code
SauravBizbRolly Jun 21, 2025
807f043
Fixed security hotspot
SauravBizbRolly Jun 23, 2025
2f728d3
Fixed security hotspot
SauravBizbRolly Jun 23, 2025
2c8277f
Remove firebase base64 variable
SauravBizbRolly Jun 23, 2025
157a6e6
Remove firebase base64 variable
SauravBizbRolly Jun 23, 2025
c88d2c1
fix firebase file access issue
SauravBizbRolly Jun 23, 2025
1e900a3
fix firebase file access issue
SauravBizbRolly Jun 23, 2025
845c138
dynamic form
SauravBizbRolly Jun 30, 2025
d6abd65
dynamic form
SauravBizbRolly Jun 30, 2025
9a743da
dynamic form
SauravBizbRolly Jun 30, 2025
6c1417d
dynamic form
SauravBizbRolly Jul 1, 2025
cd9417a
IDENTITY_BASE_URL fix
SauravBizbRolly Jul 3, 2025
8bf6d0c
IDENTITY_BASE_URL fix
SauravBizbRolly Jul 3, 2025
52660af
IDENTITY_BASE_URL fix
SauravBizbRolly Jul 4, 2025
7d21b14
IDENTITY_BASE_URL fix
SauravBizbRolly Jul 4, 2025
1a07e56
IDENTITY_BASE_URL fix
SauravBizbRolly Jul 4, 2025
272db98
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 4, 2025
78531fa
IDENTITY_BASE_URL fix
SauravBizbRolly Jul 4, 2025
a66ac6f
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 4, 2025
534665d
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 4, 2025
d176d64
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 4, 2025
634b9e2
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 7, 2025
c25aa3f
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 7, 2025
697ba36
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 7, 2025
e2dab17
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 7, 2025
d3c6f2f
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 7, 2025
e6e992b
fix IDENTITY_API_BASE_URL variable in docker file
SauravBizbRolly Jul 7, 2025
1b5b9b9
Update BeneficiaryOTPHandlerImpl.java
SauravBizbRolly Jul 17, 2025
15b7055
Update BeneficiaryOTPHandlerImpl.java
SauravBizbRolly Jul 17, 2025
61ae6af
Update application.properties
SauravBizbRolly Jul 18, 2025
8680ecb
Update BeneficiaryOTPHandlerImpl.java
SauravBizbRolly Jul 18, 2025
e7c6b04
Update BeneficiaryOTPHandlerImpl.java
SauravBizbRolly Jul 18, 2025
376e704
Update JwtUserIdValidationFilter.java
SauravBizbRolly Jul 21, 2025
795c427
Update CommonIdentityMapperDecorator.java
SauravBizbRolly Aug 4, 2025
ebd595e
Update JwtUserIdValidationFilter.java
SauravBizbRolly Aug 12, 2025
3e9d00e
Update FirebaseNotificationController.java
SauravBizbRolly Aug 12, 2025
82434e1
Update FirebaseNotificationService.java
SauravBizbRolly Aug 12, 2025
34bd50d
Update BeneficiaryConsentController.java
SauravBizbRolly Aug 12, 2025
dff88e6
dynamic from feature
SauravBizbRolly Jul 16, 2025
5441939
dynamic from feature
SauravBizbRolly Jul 16, 2025
616dbfc
dynamic from feature
SauravBizbRolly Jul 16, 2025
bae3a68
dynamic from feature
SauravBizbRolly Jul 16, 2025
ad459c2
welcome sms
SauravBizbRolly Aug 13, 2025
e84e28f
fix issue
SauravBizbRolly Aug 13, 2025
2b806a7
fix issue
SauravBizbRolly Aug 13, 2025
d2d8fb6
fix issue
SauravBizbRolly Aug 13, 2025
7a5e8cd
Update application.properties
SauravBizbRolly Aug 13, 2025
3a14f56
fix issue
SauravBizbRolly Aug 13, 2025
00197a2
fix issue
SauravBizbRolly Aug 13, 2025
df1c324
fix issue
SauravBizbRolly Aug 13, 2025
d61a2dc
fix issue
SauravBizbRolly Aug 13, 2025
bbbb623
fix issue
SauravBizbRolly Aug 13, 2025
1237757
fix issue
SauravBizbRolly Aug 21, 2025
254a9a0
Update WelcomeBenificarySmsServiceImpl.java
SauravBizbRolly Aug 18, 2025
e1cf6bd
Update application.properties
SauravBizbRolly Aug 20, 2025
5bc5445
Update IEMRAdminController.java
SauravBizbRolly Aug 20, 2025
0aed4f0
fix issue
SauravBizbRolly Aug 21, 2025
1b2e7a0
fix issue
SauravBizbRolly Aug 21, 2025
2802fb3
fix issue
SauravBizbRolly Aug 21, 2025
7030151
fix issue
SauravBizbRolly Aug 21, 2025
7a280b6
fix issue
SauravBizbRolly Aug 21, 2025
b92d7d7
fix issue
SauravBizbRolly Aug 21, 2025
4ed6798
fix issue
SauravBizbRolly Aug 21, 2025
ae5bc54
fix issue
SauravBizbRolly Aug 21, 2025
9d05db2
fix issue
SauravBizbRolly Aug 21, 2025
9ebd258
fix firebase issue
SauravBizbRolly Aug 27, 2025
100245b
changed the pom correction
vishwab1 Aug 26, 2025
3379b71
fix sms issue
SauravBizbRolly Aug 28, 2025
36a177e
fix sms issue
SauravBizbRolly Aug 28, 2025
2f7b7d3
fix firebase code issue
SauravBizbRolly Aug 28, 2025
4e65a33
fix code issue
SauravBizbRolly Aug 28, 2025
dd0957d
fix code issue
SauravBizbRolly Aug 28, 2025
300659b
fix code issue
SauravBizbRolly Aug 28, 2025
6112a78
fix code issue
SauravBizbRolly Aug 28, 2025
7531f30
fix code issue
SauravBizbRolly Aug 28, 2025
268642e
fix code issue
SauravBizbRolly Aug 28, 2025
ff5dc76
fix code issue
SauravBizbRolly Aug 28, 2025
e9c9dea
fix code issue
SauravBizbRolly Aug 28, 2025
a1ec0ee
fix code issue
SauravBizbRolly Aug 28, 2025
f69fab4
fix code issue
SauravBizbRolly Aug 28, 2025
717148c
fix code issue
SauravBizbRolly Aug 28, 2025
59e7a85
fix code issue
SauravBizbRolly Aug 28, 2025
acb2ff2
fix code issue
SauravBizbRolly Aug 28, 2025
d5fdbd7
fix code issue
SauravBizbRolly Aug 28, 2025
9aebcc7
fix code issue
SauravBizbRolly Aug 28, 2025
aabe287
fix code issue
SauravBizbRolly Sep 2, 2025
91ef53d
Merge remote-tracking branch 'upstream/release-3.6.0' into release-3.6.0
SauravBizbRolly Sep 3, 2025
aaf013c
fix code issue
SauravBizbRolly Sep 3, 2025
cf526ce
fix code issue
SauravBizbRolly Sep 3, 2025
8938dd1
Update application.properties
SauravBizbRolly Sep 3, 2025
5f0d92b
Update ScheduleForGrievanceDataSync.java
SauravBizbRolly Sep 3, 2025
0cb6287
Update BeneficiaryOTPHandlerImpl.java
SauravBizbRolly Sep 3, 2025
c584be7
Update WelcomeBenificarySmsServiceImpl.java
SauravBizbRolly Sep 3, 2025
8fbf9f1
Update application.properties
SauravBizbRolly Sep 3, 2025
f928523
Update common_ci.properties
SauravBizbRolly Sep 3, 2025
3adda88
Update common_docker.properties
SauravBizbRolly Sep 3, 2025
1753021
Update NHMDetailCallReportScheduler.java
SauravBizbRolly Sep 3, 2025
c504ef9
merge with main
SauravBizbRolly Sep 3, 2025
7dbc8ee
merge with main
SauravBizbRolly Sep 3, 2025
e4717c8
merge with main
SauravBizbRolly Sep 3, 2025
c32fb6b
merge with main
SauravBizbRolly Sep 3, 2025
e73d1cc
Merge pull request #288 from PSMRI/release-3.6.0-develop
SauravBizbRolly Sep 5, 2025
50e2313
fix: fix the session expiry issue (#286)
vanitha1822 Sep 5, 2025
bf2c62d
Merge branch 'release-3.5.0' of https://github.com/PSMRI/Common-API i…
5Amogh Sep 7, 2025
c181b2a
Content disposition modified signature (#287)
ravishanigarapu Sep 8, 2025
5e39ca1
feat: amm-1337 platform feedback module
5Amogh Sep 10, 2025
d2f44b1
feat: amm-1337 entities updated based on change in DDL
5Amogh Sep 11, 2025
54acf48
Merge pull request #289 from PSMRI/develop-amogh
5Amogh Sep 11, 2025
4149b14
merge with main
SauravBizbRolly Sep 12, 2025
1fca232
merge with main
SauravBizbRolly Sep 12, 2025
896012c
merge with main
SauravBizbRolly Sep 12, 2025
067cc02
Merge pull request #290 from toarunmishra/release-3.7.0
SauravBizbRolly Sep 12, 2025
ac39698
fix ben death param issue
SauravBizbRolly Sep 12, 2025
ce7fa31
fix ben death param issue
SauravBizbRolly Sep 12, 2025
e5d4234
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
c4603b0
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
13aa4ba
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
b14952b
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
eba0f45
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
0dfad08
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
19ade96
fix: dev-linux issue fix
5Amogh Sep 17, 2025
8635a02
fix: dev-linux issue fix (#291)
5Amogh Sep 17, 2025
d0dc555
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
dddc108
fix strict-origin-when-cross-origin
SauravBizbRolly Sep 17, 2025
0505d4e
fix: dev-linux issue fix
5Amogh Sep 18, 2025
ffdc20d
Merge pull request #292 from PSMRI/develop-amogh
5Amogh Sep 18, 2025
a97d332
fix: dev-linux issue fix
5Amogh Sep 18, 2025
3686d5c
Merge pull request #293 from PSMRI/develop-amogh
5Amogh Sep 18, 2025
70695b7
fix: dev-linux issue fix
5Amogh Sep 18, 2025
ae474a9
fix: dev-linux issue fix
5Amogh Sep 19, 2025
53376cd
Merge pull request #294 from PSMRI/develop-amogh
5Amogh Sep 19, 2025
9ffee16
Update pom.xml
5Amogh Sep 25, 2025
aa94a5a
Update pom.xml
5Amogh Sep 25, 2025
6c00a6b
Update pom.xml
5Amogh Sep 25, 2025
f93e2f4
refresh token unauthorize issue (#296)
ravishanigarapu Sep 25, 2025
e5789f4
fix: missing env added
5Amogh Sep 26, 2025
ca036e6
Merge pull request #297 from PSMRI/rel-3.5.1-env-fix
5Amogh Sep 26, 2025
7f6f4dc
Merge branch 'release-3.6.0' into release-3.5.1
5Amogh Sep 26, 2025
3336300
Merge pull request #298 from PSMRI/release-3.5.1
5Amogh Sep 26, 2025
435fb88
finding userId baserd on createdBy (#299)
ravishanigarapu Sep 26, 2025
8fd476b
Nd/vs/fix ben (#300)
vanitha1822 Sep 26, 2025
18a3151
Merge branch 'release-3.6.0' into release-3.5.0
snehar-nd Sep 30, 2025
7ec95be
Merge pull request #301 from PSMRI/release-3.5.0
snehar-nd Sep 30, 2025
942ae41
fix: swagger env values made dynamic
5Amogh Oct 6, 2025
c822bbb
fix: swagger env values made dynamic
5Amogh Oct 6, 2025
75d6fa0
fix: aam-1752 , fetch only active signature
snehar-nd Oct 9, 2025
cf2c838
Merge pull request #302 from PSMRI/sn/3.6
snehar-nd Oct 9, 2025
57bdd89
Revert "fix: aam-1752 , fetch only active signature"
snehar-nd Oct 9, 2025
3c3541d
Merge pull request #303 from PSMRI/revert-302-sn/3.6
snehar-nd Oct 9, 2025
7bc8d71
fix: only get the Active signature
snehar-nd Oct 10, 2025
c072918
fix:active signature
vishwab1 Oct 10, 2025
eafd705
fix:exception handling
vishwab1 Oct 10, 2025
09000bd
fix:exception handling
vishwab1 Oct 10, 2025
772a9e0
fix strict-origin-when-cross-origin
SauravBizbRolly Oct 14, 2025
b1fccb9
Merge branch 'release-3.6.0' into sn/3.6
snehar-nd Oct 15, 2025
d7fefd6
Merge pull request #305 from PSMRI/sn/3.6
snehar-nd Oct 15, 2025
c581bf3
Merge remote-tracking branch 'upstream/release-3.6.0' into release-3.7.0
SauravBizbRolly Nov 4, 2025
4604845
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 7, 2025
4b7cb37
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 7, 2025
c668610
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 7, 2025
9324652
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 7, 2025
168291a
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 7, 2025
1121b75
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 7, 2025
de6f6b2
fix: amm-1930 wasa-validation added for sms template api
5Amogh Nov 10, 2025
19239f8
fix: amm-1931 JWT token reduced expiry timing
snehar-nd Nov 11, 2025
a38c33d
Merge pull request #309 from PSMRI/release-3.6.0
5Amogh Nov 11, 2025
cca9524
Merge pull request #310 from PSMRI/feature/sms-validation-3.6.0
5Amogh Nov 12, 2025
8f4efa0
Merge pull request #311 from PSMRI/sn/wasa
snehar-nd Nov 12, 2025
ddee5bd
Bump version from 3.6.0 to 3.6.1
5Amogh Nov 12, 2025
e41a47e
fix: amm-1927 http options vulnerability fixed through cors
5Amogh Nov 12, 2025
4081825
fix: amm 1927 implementing suggested code fixes by coderabbit
5Amogh Nov 13, 2025
6112133
fix: amm 1927 removal of hardcoded localhost part
5Amogh Nov 13, 2025
106515c
fix: amm 1927 removal of restrictive pattern for options & sticking R…
5Amogh Nov 13, 2025
8a95694
fix: amm-1929 username and passwords are passed plain
snehar-nd Nov 13, 2025
a51d441
fix: amm-1929 removed hardcoded decrypted value
snehar-nd Nov 13, 2025
f453611
fix: internal url disclosure (#308)
vanitha1822 Nov 14, 2025
1d12209
Merge pull request #313 from PSMRI/sn/wasa
snehar-nd Nov 14, 2025
c6929cf
Merge pull request #312 from PSMRI/AMM-1927
5Amogh Nov 17, 2025
ba4da8f
Merge remote-tracking branch 'upstream/release-3.6.1' into release-3.7.0
SauravBizbRolly Nov 21, 2025
ca7bc2e
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 21, 2025
5b195cf
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 21, 2025
e7828c2
fix strict-origin-when-cross-origin
SauravBizbRolly Nov 24, 2025
543b022
add column in create BeneficiaryModel
SauravBizbRolly Nov 26, 2025
19a5291
Add UAT domain to allowed CORS origins
SauravBizbRolly Nov 26, 2025
cb2ac7f
Update application.properties
SauravBizbRolly Nov 26, 2025
a49f09b
Remove CORS allowed origin from properties
SauravBizbRolly Nov 26, 2025
948d72c
add column in create BeneficiaryModel
SauravBizbRolly Nov 26, 2025
be6843f
Merge remote-tracking branch 'upstream/release-3.7.0' into release-3.7.0
SauravBizbRolly Nov 26, 2025
65d5b3b
add column in create BeneficiaryModel
SauravBizbRolly Nov 26, 2025
03ee687
Merge pull request #314 from PSMRI/release-3.6.1
drtechie Dec 3, 2025
50e2180
Merge pull request #315 from PSMRI/release-3.7.0
drtechie Dec 3, 2025
44b8e84
Merge branch 'release-3.6.0-temp' into release-3.8.0
drtechie Dec 3, 2025
e614249
Merge pull request #316 from PSMRI/release-3.8.0
drtechie Dec 3, 2025
1f63a40
fix: cors spell fixes and import of packages updates
5Amogh Dec 4, 2025
289d6ca
Merge pull request #318 from PSMRI/amo-3.6
5Amogh Dec 4, 2025
df3f76d
fix: deployment issue fix
5Amogh Dec 5, 2025
deb6a33
feat: amm-1959 dhis token for cho report re-direction
5Amogh Dec 8, 2025
565015c
Merge pull request #319 from PSMRI/amo-3.6
5Amogh Dec 9, 2025
0fb2ea5
fix: beneficiary history on revisit (#320)
vanitha1822 Dec 15, 2025
b4d7cb0
fix: call type mapper (#322)
vishwab1 Dec 16, 2025
2b23cd6
Enable SMS Functionality in MMU App to Send Prescriptions (#325)
vishwab1 Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.iemr.common-API</groupId>
<artifactId>common-api</artifactId>
<version>3.4.0</version>
<version>3.6.0</version>
<packaging>war</packaging>

<name>Common-API</name>
Expand Down Expand Up @@ -111,6 +111,12 @@

</exclusions>
</dependency>

<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-admin</artifactId>
<version>9.4.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand Down Expand Up @@ -257,7 +263,7 @@
<artifactId>logback-core</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
Expand Down
24 changes: 21 additions & 3 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ identity-1097-api-url = @env.IDENTITY_1097_API_URL@
send-sms=@env.SEND_SMS@
sendSMSUrl = @env.SEND_SMS_URL@
source-address=@env.SMS_SOURCE_ADDRESS@
sms-consent-source-address = @env.SMS_CONSENT_SOURCE_ADDRESS@
sms-username=@env.SMS_USERNAME@
sms-password=@env.SMS_PASSWORD@
send-message-url=@env.SMS_MESSAGE_URL@
Expand All @@ -40,6 +41,11 @@ send-message-url=@env.SMS_MESSAGE_URL@
start-sms-scheduler=true
cron-scheduler-sms=0 0/1 * * * ? *

# Firebase Configuration
firebase.enabled=@env.FIREBASE_ENABLE@
# if using file
firebase.credential-file=@env.FIREBASE_CREDENTIAL@

#### Email Configuration
send-email=@env.SEND_EMAIL@
spring.mail.host=@env.MAIL_HOST@
Expand Down Expand Up @@ -167,8 +173,8 @@ grievancePassword = @env.GRIEVANCE_PASSWORD@
grievanceUserAuthenticate = @env.GRIEVANCE_USER_AUTHENTICATE@
grievanceDataSyncDuration = @env.GRIEVANCE_DATA_SYNC_DURATION@

springdoc.api-docs.enabled=false
springdoc.swagger-ui.enabled=false
springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@


isProduction=@env.IS_PRODUCTION@
Expand All @@ -185,4 +191,16 @@ cors.allowed-origins=@env.CORS_ALLOWED_ORIGINS@

video-call-url=@env.VIDEO_CALL_URL@
jibri.output.path=@env.JIBRI_OUTPUT_PATH@
video.recording.path=@env.VIDEO_RECORDING_PATH@
video.recording.path=@env.VIDEO_RECORDING_PATH@

platform.feedback.ratelimit.enabled=@env.PLATFORM_FEEDBACK_RATELIMIT_ENABLED@
platform.feedback.ratelimit.pepper=@env.PLATFORM_FEEDBACK_RATELIMIT_PEPPER@
platform.feedback.ratelimit.trust-forwarded-for=@env.PLATFORM_FEEDBACK_RATELIMIT_TRUST_FORWARDED_FOR@
platform.feedback.ratelimit.forwarded-for-header=@env.PLATFORM_FEEDBACK_RATELIMIT_FORWARDED_FOR_HEADER@
platform.feedback.ratelimit.minute-limit=@env.PLATFORM_FEEDBACK_RATELIMIT_MINUTE_LIMIT@
platform.feedback.ratelimit.day-limit=@env.PLATFORM_FEEDBACK_RATELIMIT_DAY_LIMIT@
platform.feedback.ratelimit.user-day-limit=@env.PLATFORM_FEEDBACK_RATELIMIT_USER_DAY_LIMIT@
platform.feedback.ratelimit.fail-window-minutes=@env.PLATFORM_FEEDBACK_RATELIMIT_FAIL_WINDOW_MINUTES@
platform.feedback.ratelimit.backoff-minutes=@env.PLATFORM_FEEDBACK_RATELIMIT_BACKOFF_MINUTES@
generateBeneficiaryIDs-api-url=@env.GEN_BENEFICIARY_IDS_API_URL@

25 changes: 22 additions & 3 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ identity-1097-api-url = ${IDENTITY_1097_API_URL}
send-sms=${SEND_SMS}
sendSMSUrl = ${SEND_SMS_URL}
source-address=${SMS_SOURCE_ADDRESS}
sms-consent-source-address=${SMS_CONSENT_SOURCE_ADDRESS}
sms-username=${SMS_USERNAME}
sms-password=${SMS_PASSWORD}
send-message-url=${SMS_MESSAGE_URL}
Expand Down Expand Up @@ -169,8 +170,8 @@ grievancePassword = ${GRIEVANCE_PASSWORD}
grievanceUserAuthenticate = ${GRIEVANCE_USER_AUTHENTICATE}
grievanceDataSyncDuration = ${GRIEVANCE_DATA_SYNC_DURATION}

springdoc.api-docs.enabled=false
springdoc.swagger-ui.enabled=false
springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}


isProduction=${IS_PRODUCTION}
Expand All @@ -185,6 +186,24 @@ captcha.enable-captcha=${ENABLE_CAPTCHA}

cors.allowed-origins=${CORS_ALLOWED_ORIGINS}

# # Firebase Configuration
firebase.enabled=${FIREBASE_ENABLE}
# # if using file
firebase.credential-file=${FIREBASE_CREDENTIAL}


video-call-url=${VIDEO_CALL_URL}
jibri.output.path={JIBRI_OUTPUT_PATH}
video.recording.path={VIDEO_RECORDING_PATH}
video.recording.path={VIDEO_RECORDING_PATH}

# Platform Feedback module
platform.feedback.ratelimit.enabled=${PLATFORM_FEEDBACK_RATELIMIT_ENABLED}
platform.feedback.ratelimit.pepper=${PLATFORM_FEEDBACK_RATELIMIT_PEPPER}
platform.feedback.ratelimit.trust-forwarded-for=${PLATFORM_FEEDBACK_RATELIMIT_TRUST_FORWARDED_FOR}
platform.feedback.ratelimit.forwarded-for-header=${PLATFORM_FEEDBACK_RATELIMIT_FORWARDED_FOR_HEADER}
platform.feedback.ratelimit.minute-limit=${PLATFORM_FEEDBACK_RATELIMIT_MINUTE_LIMIT}
platform.feedback.ratelimit.day-limit=${PLATFORM_FEEDBACK_RATELIMIT_DAY_LIMIT}
platform.feedback.ratelimit.user-day-limit=${PLATFORM_FEEDBACK_RATELIMIT_USER_DAY_LIMIT}
platform.feedback.ratelimit.fail-window-minutes=${PLATFORM_FEEDBACK_RATELIMIT_FAIL_WINDOW_MINUTES}
platform.feedback.ratelimit.backoff-minutes=${PLATFORM_FEEDBACK_RATELIMIT_BACKOFF_MINUTES}
generateBeneficiaryIDs-api-url={GEN_BENEFICIARY_IDS_API_URL}
18 changes: 18 additions & 0 deletions src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,21 @@ captcha.enable-captcha=true

cors.allowed-origins=http://localhost:*

# ---Platform Feedback module ---
# Rate limiter OFF locally (no Redis required)
platform.feedback.ratelimit.enabled=true
platform.feedback.ratelimit.pepper=dev-pepper-123 # dummy

# trust forwarded-for locally is harmless (localhost only)
platform.feedback.ratelimit.trust-forwarded-for=false
platform.feedback.ratelimit.forwarded-for-header=X-Forwarded-For

# Optional overrides (not needed if disabled)
platform.feedback.ratelimit.minute-limit=10
platform.feedback.ratelimit.day-limit=100
platform.feedback.ratelimit.user-day-limit=50
platform.feedback.ratelimit.fail-window-minutes=5
platform.feedback.ratelimit.backoff-minutes=15

### generate Beneficiary IDs URL
generateBeneficiaryIDs-api-url=/generateBeneficiaryController/generateBeneficiaryIDs
1 change: 0 additions & 1 deletion src/main/java/com/iemr/common/CommonApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/iemr/common/config/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ public class CorsConfig implements WebMvcConfigurer {

@Value("${cors.allowed-origins}")
private String allowedOrigins;

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOriginPatterns(
Arrays.stream(allowedOrigins.split(","))
.map(String::trim)
.toArray(String[]::new))
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
.allowedHeaders("*")
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")
.allowedHeaders("Authorization", "Content-Type", "Accept", "Jwttoken",
"serverAuthorization", "ServerAuthorization", "serverauthorization", "Serverauthorization")
.exposedHeaders("Authorization", "Jwttoken")
.allowCredentials(true)
.maxAge(3600);
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/iemr/common/config/RedisConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.iemr.common.data.users.User;
import org.springframework.data.redis.core.StringRedisTemplate;

@Configuration
public class RedisConfig {
Expand All @@ -57,4 +58,10 @@ public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory factor
return template;
}

// new bean for rate limiting & counters
@Bean
public StringRedisTemplate stringRedisTemplate(RedisConnectionFactory factory) {
return new StringRedisTemplate(factory);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.iemr.common.config.firebase;

import com.google.auth.oauth2.GoogleCredentials;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseOptions;
import com.google.firebase.messaging.FirebaseMessaging;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;

import java.io.ByteArrayInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Base64;

@Configuration
public class FirebaseMessagingConfig {
private Logger logger = LoggerFactory.getLogger(this.getClass().getSimpleName());

@Value("${firebase.enabled:false}")
private boolean firebaseEnabled;

@Value("${firebase.credential-file:}")
private String firebaseCredentialFile;


@Bean
@ConditionalOnProperty(name = "firebase.enabled", havingValue = "true")
public FirebaseMessaging firebaseMessaging() throws IOException {
if (!firebaseEnabled) {
logger.error("⚠️ Firebase disabled by config");
return null;
}

try {
if (firebaseCredentialFile == null || firebaseCredentialFile.isBlank()) {
logger.error("⚠️ No Firebase credentials path provided");
return null; // don't throw, app will still start
}

GoogleCredentials credentials = GoogleCredentials.fromStream(
new ClassPathResource(firebaseCredentialFile).getInputStream()
);
FirebaseOptions options = FirebaseOptions.builder()
.setCredentials(credentials)
.build();

FirebaseApp firebaseApp = FirebaseApp.getApps().isEmpty()
? FirebaseApp.initializeApp(options)
: FirebaseApp.getInstance();

return FirebaseMessaging.getInstance(firebaseApp);

} catch (Exception e) {
logger.error("⚠️ Firebase init failed: " + e.getMessage());
return null; // keep app running
}
Comment on lines +31 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

Spring @Bean method return null BeanCreationException

💡 Result:

Cause

  • Spring does not accept a null from a @bean factory: if your @bean method returns null the container treats that as a failed bean creation and you get a BeanCreationException/BeanCurrentlyInCreationException. [1][2]

How to fix (pick one)

  • Never return null from a @bean method. Return a real instance or throw an exception when creation fails. [1][2]
  • Make the bean conditional so it is not defined when you would otherwise return null (use @conditional / @ConditionalOnX / configuration properties checks) so Spring simply doesn't register the bean. [2]
  • Return a wrapper instead of null: Optional, Supplier, or a custom holder object and let callers handle absence. Inject Optional or Supplier where appropriate. [1]
  • Programmatically skip registration (BeanDefinitionRegistry / BeanFactoryPostProcessor) so no bean is created when you don't want one.
  • If you must signal “no bean” from FactoryBean logic, Spring internally substitutes a NullBean; but returning null directly from a @bean method is not allowed. See FactoryBean/NullBean handling in Spring source. [3]

References

  • StackOverflow discussion on returning null from @bean and resulting exceptions. [1]
  • Spring Framework reference (bean/factory method behavior). [2]
  • Spring source / posts showing FactoryBean/NullBean handling when getObject returns null. [3]

🌐 Web query:

Spring @ConditionalOnProperty bean instantiation behavior

💡 Result:

Summary — how @ConditionalOnProperty works and when beans are created:

  • The condition is evaluated at configuration time (when Spring processes configuration/auto-configuration). If the condition does NOT match, the bean definition is not registered (so the bean is not created). If it matches, the bean definition is registered and the bean is instantiated as usual during context initialization. [1][2]

  • Matching rules:

    • By default a property "matches" if it exists and its value is not "false".
    • Use havingValue to require a specific value.
    • If the property is absent, matchIfMissing (default = false) determines whether absence counts as a match. [1]
  • Class-level vs method-level:

    • Placing the annotation on a @Configuration/@autoConfiguration class prevents registration of that configuration as a bean if the condition fails. Placing it on individual @bean methods prevents registration of those bean definitions only. Be careful about order of bean-definition processing — some bean conditions depend on what’s already been processed. [2]
  • Practical note: @ConditionalOnProperty simply prevents registration when the condition fails (it does not throw by default); other configuration and beans continue to be processed. [3]

Sources: Spring Boot API and reference docs for ConditionalOnProperty; community explanation. [1][2][3]


🏁 Script executed:

# First, let's examine the actual file to understand the context better
cat -n src/main/java/com/iemr/common/config/firebase/FirebaseMessagingConfig.java

Repository: PSMRI/Common-API

Length of output: 2803


Remove null returns from @Bean method; they cause BeanCreationException

Spring does not accept null from @Bean factory methods—returning null triggers a BeanCreationException during startup. The current code returns null in three paths (lines 36, 42, 60), which will fail bean initialization and crash the application.

Additionally, the @ConditionalOnProperty(firebase.enabled) annotation already handles the enable/disable logic: if firebase.enabled ≠ true, Spring skips bean registration entirely. The redundant check at line 34–36 is unnecessary.

Replace null returns with exceptions:

  • Line 34–36: Remove the redundant firebaseEnabled check (the @ConditionalOnProperty already covers this).
  • Line 42: Throw IllegalStateException("Firebase credentials path not configured") instead of returning null.
  • Line 60: Throw the exception instead of returning null; optionally wrap with context: throw new IllegalStateException("Firebase initialization failed", e).

This ensures deterministic startup behaviour: either a valid bean is created, or startup fails with a clear error message pointing to the actual misconfiguration.

🤖 Prompt for AI Agents
In src/main/java/com/iemr/common/config/firebase/FirebaseMessagingConfig.java
around lines 31 to 61, the @Bean method returns null in several branches which
causes BeanCreationException; remove the redundant firebaseEnabled check (the
@ConditionalOnProperty already handles skipping bean registration), replace the
null return at the credentials check with throwing new
IllegalStateException("Firebase credentials path not configured"), and on catch
rethrow a clear exception (for example throw new IllegalStateException("Firebase
initialization failed", e)) instead of returning null so bean creation fails
deterministically with a helpful error.


}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ public void execute() {
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public class BeneficiaryRegistrationController {
private BeneficiaryOccupationService beneficiaryOccupationService;
private GovtIdentityTypeService govtIdentityTypeService;


@Autowired
public void setBenRelationshipTypeService(BenRelationshipTypeService benRelationshipTypeService) {
this.benRelationshipTypeService = benRelationshipTypeService;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*
* AMRIT – Accessible Medical Records via Integrated Technology
* Integrated EHR (Electronic Health Records) Solution
*
* Copyright (C) "Piramal Swasthya Management and Research Institute"
*
* This file is part of AMRIT.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
package com.iemr.common.controller.beneficiaryConsent;

import com.iemr.common.data.beneficiaryConsent.BeneficiaryConsentRequest;
import com.iemr.common.service.beneficiaryOTPHandler.BeneficiaryOTPHandler;
import com.iemr.common.utils.mapper.InputMapper;
import com.iemr.common.utils.response.OutputResponse;
import io.lettuce.core.dynamic.annotation.Param;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.ws.rs.core.MediaType;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping(value = { "/beneficiaryConsent" })
@RestController
public class BeneficiaryConsentController {
final Logger logger = LoggerFactory.getLogger(this.getClass().getName());

@Autowired
private BeneficiaryOTPHandler beneficiaryOTPHandler;

@Operation(summary = "Send Consent")
@RequestMapping(value = "/sendConsent", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON)
public String sendConsent(@Param(value = "{\"mobNo\":\"String\"}") @RequestBody String requestOBJ) {

OutputResponse response = new OutputResponse();

try {
BeneficiaryConsentRequest obj = InputMapper.gson().fromJson(requestOBJ, BeneficiaryConsentRequest.class);

String success = beneficiaryOTPHandler.sendOTP(obj); // method name unchanged if internal logic still uses 'OTP'
logger.info(success.toString());
response.setResponse(success);


} catch (Exception e) {
response.setError(500, "error : " + e);
}
return response.toString();
}

@Operation(summary = "Validate Consent")
@RequestMapping(value = "/validateConsent", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON)
public String validateConsent(@Param(value = "{\"mobNo\":\"String\",\"otp\":\"Integer\"}") @RequestBody String requestOBJ) {

OutputResponse response = new OutputResponse();

try {
BeneficiaryConsentRequest obj = InputMapper.gson().fromJson(requestOBJ, BeneficiaryConsentRequest.class);

JSONObject responseOBJ = beneficiaryOTPHandler.validateOTP(obj);
if (responseOBJ != null)
response.setResponse(responseOBJ.toString());
else
response.setError(500, "failure");

} catch (Exception e) {
logger.error("error in validating Consent : " + e);
response.setError(500, "error : " + e);
}
return response.toString();
}

@Operation(summary = "Resend Consent")
@RequestMapping(value = "/resendConsent", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON, produces = MediaType.APPLICATION_JSON)
public String resendConsent(@Param(value = "{\"mobNo\":\"String\"}") @RequestBody String requestOBJ) {
logger.info(requestOBJ.toString());

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarQube Cloud

OutputResponse response = new OutputResponse();

try {
BeneficiaryConsentRequest obj = InputMapper.gson().fromJson(requestOBJ, BeneficiaryConsentRequest.class);

String success = beneficiaryOTPHandler.resendOTP(obj);
logger.info(success.toString());

if (success.contains("otp"))
response.setResponse(success);
else
response.setError(500, "failure");

} catch (Exception e) {
logger.error("error in re-sending Consent : " + e);
response.setError(500, "error : " + e);
}
return response.toString();
}


}


Loading
Loading