Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
163df8c
Readme file added (#1)
mahimaeg Jun 5, 2023
d5ca79d
Removed unnecessary dependencies from pom.xml (#2)
swetatech24 Jun 7, 2023
03bf370
updated code-of-conduct, copying, contributing, readme (#3)
swetatech24 Jun 8, 2023
eccad20
modified .gitignore file (#4)
Vidyaaa24 Jun 9, 2023
814fa93
code smell fixes (#6)
swetatech24 Jun 14, 2023
d7828f6
Added copyright text (#7)
Anjana2310 Jun 15, 2023
dd0ec15
code smell fix (#8)
swetatech24 Jun 15, 2023
c9c75f4
Swagger changes (#9)
Anjana2310 Jun 15, 2023
4e28fe2
Code smell fix (#10)
swetatech24 Jun 16, 2023
4a81aed
code smell fixes (#11)
swetatech24 Jun 20, 2023
bba7258
Create sast-and-package-prod.yml (#12)
Vidyaaa24 Jun 21, 2023
29d3a17
Code smell changes (#13)
swetatech24 Jun 21, 2023
53a5cd3
Update README.md
harimohanr Jun 21, 2023
15b5356
code smell fixes
swetatech24 Jun 22, 2023
8a0c9d5
Merge pull request #14 from swetatech24/codesmells
Vidyaaa24 Jun 22, 2023
8a24b2f
Added environment variable
Anjana2310 Jun 23, 2023
fd58711
Merge pull request #15 from PSMRI/flow
ravishanigarapu Jun 23, 2023
d58d096
Added password changes & edit environment variable (#16)
Anjana2310 Jun 26, 2023
97d4b37
Passing environment variable
Anjana2310 Jun 27, 2023
dc537c8
Passing environment variable (#17)
Anjana2310 Jun 27, 2023
4c515e5
Passing environment variable
Anjana2310 Jun 27, 2023
431db69
Merge pull request #18 from Anjana2310/develop
Vidyaaa24 Jun 27, 2023
f0851e1
Passing environment variable (#19)
Anjana2310 Jun 27, 2023
8e70c6e
Passing environment variable (#20)
Anjana2310 Jun 28, 2023
4762e25
Workflow change (#21)
Vidyaaa24 Jun 30, 2023
1fdeb90
CreatedDate filed for Identity (#22)
mukul5947 Jun 30, 2023
957e8eb
Send SMS null Id issue (#23)
mukul5947 Jul 10, 2023
ff279d4
mmu cr changes
Jul 11, 2023
8e2bb8a
update changes
ravishanigarapu Jul 12, 2023
69dcafc
Merge pull request #24 from ravishanigarapu/develop
devikasuresh20 Jul 12, 2023
8f703c9
Merge branch 'PSMRI:develop' into develop
indraniBan Jul 13, 2023
55922d5
changes mmu cr
Jul 17, 2023
b155b95
Merge pull request #25 from indraniBan/develop
devikasuresh20 Jul 27, 2023
6bc0ead
Update sast-and-package-prod.yml (#26)
Vidyaaa24 Aug 1, 2023
78290a0
edit api changes
Aug 3, 2023
5b754e8
Identity API cleanup and password masking
Anjana2310 Aug 4, 2023
e0148c5
Merge pull request #28 from Anjana2310/develop
Vidyaaa24 Aug 7, 2023
8b4e2fd
Updated the language option for codeql and added maven test
sunil-beehyv Aug 8, 2023
cf0d92e
Added CodeQl tool to do static code analysis on pull request
sunil-beehyv Aug 8, 2023
26f807b
Merge pull request #1 from beehyv/pipeline
roopesh-beehyv Aug 8, 2023
e61c872
Merge pull request #27 from indraniBan/develop
helenKaryamsetty Aug 10, 2023
67fc78b
Implementing Basic reverse sync operation
babs93 Aug 11, 2023
c3611d9
Fix issue on controller
babs93 Aug 16, 2023
1cd247c
Merge pull request #2 from beehyv/develop_babs
roopesh-beehyv Aug 17, 2023
8d6a700
Updated the language option for codeql and added maven test
sunil-beehyv Aug 8, 2023
6a9f5d8
Added CodeQl tool to do static code analysis on pull request
sunil-beehyv Aug 8, 2023
65a25fb
Implementing Basic reverse sync operation
babs93 Aug 11, 2023
b32ed99
Fix issue on controller
babs93 Aug 16, 2023
21b700f
Identity API cleanup and password masking
Anjana2310 Aug 4, 2023
c482471
edit api changes
Aug 3, 2023
765d02c
Merge pull request #3 from beehyv/confiltResole
roopesh-beehyv Aug 22, 2023
4bd5c8c
Merge pull request #29 from beehyv/develop
devikasuresh20 Aug 25, 2023
1d442c3
change made in description of identity controller (#30)
Vidyaaa24 Sep 4, 2023
c371f5f
Multiple beneficiaries sync issue changes for FLW (#31)
devikasuresh20 Sep 12, 2023
841b5c4
Delete .github/workflows/sast-and-package-prod.yml
Vidyaaa24 Sep 15, 2023
6f7f089
Delete .github/workflows/sast-and-package.yml
Vidyaaa24 Sep 15, 2023
f1973f3
Create package-prod.yml
Vidyaaa24 Sep 15, 2023
d5a3d40
Create package.yml
Vidyaaa24 Sep 15, 2023
05eaa5f
Create sast.yml
Vidyaaa24 Sep 15, 2023
c808596
Use a logger to log this exception (#32)
swetatech24 Oct 5, 2023
7f09523
Added Pull Request template, added placeholders in properties file, a…
swetatech24 Oct 6, 2023
4d125dc
Add CI build properties, add pom.xml plugins to tweak build process (…
drtechie Oct 19, 2023
2ed4168
http insecure changes (#39)
bshivani7 Nov 27, 2023
c5e2d35
Merge branch 'master' (#40)
helenKaryamsetty Dec 14, 2023
ca41970
Merge conflict resolution prior to develop -> master merge (#42)
harimohanr Dec 14, 2023
c5a8c7d
Merge remote-tracking branch 'origin/master' into develop
harimohanr Dec 14, 2023
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
2 changes: 0 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Package

on:
Expand Down Expand Up @@ -29,7 +28,6 @@ jobs:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/sast-and-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ jobs:

- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK 8
uses: actions/setup-java@v2
with:
java-version: 8
distribution: 'adopt'


- name: Build with Maven
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }}
Expand Down
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.8
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ This service has been tested on Wildfly as the application server.
* Redis
* MySQL Database

## Environment and setup

1. Install dependencies `mvn clean install`
2. You can copy `common_example.properties` to `common_local.properties` and edit the file accordingly. The file is under `src/main/environment` folder.
3. Run the spring server with local configuration `mvn spring-boot:run -DENV_VAR=local`

## Integrations
* RMNCH (Reproductive, Maternal, Newborn, and Child Health)

## Usage
All features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.

50 changes: 44 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<org.projectlombok.version>1.16.18</org.projectlombok.version>
<environment>${ENV_VAR}</environment>
<target-properties>target/classes/application.properties</target-properties>
<source-properties>src/main/environment/common_${environment}.properties</source-properties>
<source-properties>target/classes/common_${environment}.properties</source-properties>
<maven.test.skip>true</maven.test.skip>
<sonar.java.binaries>target</sonar.java.binaries>
</properties>
Expand Down Expand Up @@ -211,16 +211,14 @@
<properties>
<final-name>1097identityapi-v1.0</final-name>
<target-properties>target/classes/application.properties</target-properties>
<source-properties>src/main/environment/1097_${environment}.properties</source-properties>
<source-properties>target/classes/1097_${environment}.properties</source-properties>
</properties>
<build>
<finalName>1097identityapi-v1.0</finalName>
</build>
</profile>
</profiles>



<build>
<finalName>identity-0.0.1</finalName>
<plugins>
Expand Down Expand Up @@ -255,6 +253,32 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>filter-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<delimiters>@</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
<resources>
<resource>
<directory>src/main/environment</directory>
<filtering>true</filtering>
<includes>
<include>common_${environment}.properties</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand All @@ -265,11 +289,11 @@
<goals>
<goal>run</goal>
</goals>
<id>properties-updated</id>
<id>merge-properties</id>
<configuration>
<target>
<echo>
concatinating properties file ${target-properties} and
concatenating properties file ${target-properties} and
${source-properties}
</echo>
<concat destfile="${target-properties}" append="yes"
Expand All @@ -280,6 +304,20 @@
</target>
</configuration>
</execution>
<execution>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<id>clean-property-files</id>
<configuration>
<tasks>
<delete>
<file file="${source-properties}"/>
</delete>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down
5 changes: 5 additions & 0 deletions src/main/environment/1097_ci.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=@env.DATABASE_URL@
spring.datasource.username=@env.DATABASE_USERNAME@
spring.datasource.password=@env.DATABASE_PASSWORD@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
5 changes: 5 additions & 0 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=@env.DATABASE_URL@
spring.datasource.username=@env.DATABASE_USERNAME@
spring.datasource.password=@env.DATABASE_PASSWORD@
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
5 changes: 5 additions & 0 deletions src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
3 changes: 0 additions & 3 deletions src/main/environment/common_test.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# DataSource settings: set here your own configurations for the database

spring.datasource.url=<Enter AMRIT DB_IDENTITY URL here>
spring.datasource.username=<Enter your AMRIT DB_IDENTITY username>
spring.datasource.password=<Enter your AMRIT DB_IDENTITY password>
spring.datasource.driver-class-name=com.mysql.jdbc.Driver


Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.iemr.common.identity.config;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

public class BlockingHttpMethodInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String method = request.getMethod();
if (!("GET".equals(method) || "POST".equals(method))) {
response.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
return false;
}
return true;
}

@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
// TODO Auto-generated method stub

}

@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
throws Exception {
// TODO Auto-generated method stub

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ public class InterceptorConfig extends WebMvcConfigurerAdapter
@Autowired
HTTPRequestInterceptor requestInterceptor;

// @Override
// public void addInterceptors(InterceptorRegistry registry)
// {
// registry.addInterceptor(requestInterceptor);
// }

@Override
public void addInterceptors(InterceptorRegistry registry)
{
registry.addInterceptor(requestInterceptor);
registry.addInterceptor(new BlockingHttpMethodInterceptor())
.addPathPatterns("/**");
}
}
55 changes: 0 additions & 55 deletions src/main/java/com/iemr/common/identity/utils/CryptoUtil.java

This file was deleted.