Skip to content
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

[MOSIP-33145] Merge to develop from develop-java21 #132

Merged
merged 81 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
7737167
slack notification for mosip-ref-impl
harishmejari8496 Jun 3, 2021
0786037
Added Child Auth Filter ref impl
Jul 19, 2021
d6c11cf
added missed semicolon.
Jul 27, 2021
d08a759
adding MOSIP-11719 branch
Ajay1596 Aug 17, 2021
4346567
Removed pre-reg-ui build from trigger
Aug 26, 2021
6f35084
BioSDK spec. updated
ankitvaishnav Oct 6, 2021
e5a58fc
BioSDK spec doc updated
ankitvaishnav Oct 6, 2021
30e7422
Added Access_roles and DTO files for access roles
Mahesh-Binayak Oct 11, 2021
4abe9a0
Revert "Added Access_roles and DTO files for access roles"
Mahesh-Binayak Oct 27, 2021
cb2ef92
Added access roles and properties in local application.properties.
Mahesh-Binayak Oct 28, 2021
145e6e8
Removed extra properties in local application.properties.
Mahesh-Binayak Oct 28, 2021
2aaa184
Flow change for admin-ui build
Nov 19, 2021
593b81c
Flow change for admin-ui build
Nov 19, 2021
3d25d5d
Update push_trigger.yml
mandeepdhiman123 Nov 19, 2021
abf0938
Update push_trigger.yml
mandeepdhiman123 Nov 19, 2021
a798150
Reverted admin-ui build changes
ase-101 Nov 19, 2021
802f433
removed admin-ui build.
Nov 29, 2021
c54fa85
added new gpg keys
Jan 10, 2022
602b418
[MOSIP-19482] Resolved dependency management for jackson ObjectMapper
manojsp12 Jan 11, 2022
91c3302
[MOSIP-33145] Merge to develop from develop-java21
JanardhanBS-SyncByte Jun 18, 2024
25541de
Update README.md
loganathan-sekaran Feb 9, 2022
2eeb5a5
updated with the doc link
SwatiPeriwal Feb 10, 2022
e079bfc
Update README.md
ckm007 Feb 10, 2022
fb35878
[MOSIP-19910] updated badges
ckm007 Feb 10, 2022
ba3f268
[MOSIP-19910] updaed badges
ckm007 Feb 10, 2022
a9ff13d
Update Dockerfile
Feb 28, 2022
d36c0a0
Update application.properties
Feb 28, 2022
ee4a765
Adding debug statements
Feb 28, 2022
0c96bd4
Updated docker to have option to specify the logger level.
loganathan-sekaran Feb 28, 2022
e1ae533
Update Dockerfile
Feb 28, 2022
d8fbb0a
Update application.properties
Feb 28, 2022
db099bc
Update README.md
ckm007 Jul 29, 2022
9a78226
[DSD-2478] added pom changes for 1.2.0.1-B2 release (#48)
ckm007 Apr 15, 2023
872ce1c
Update README.md (#52)
ckm007 Jun 21, 2023
b6b08cd
Handled nulls
Sep 4, 2023
f7f8eae
Handled nulls
Sep 4, 2023
c892f78
Fixed swagger-ui issue.
kameshsr May 26, 2022
4c56cfc
Added swagger base url
kameshsr May 25, 2022
85432cd
[MOSIP-19910] updated badges
ckm007 Feb 10, 2022
a33d0d5
[MOSIP-20028] added action for tagging
ckm007 Jul 18, 2022
57f4243
Delete tag.yaml
gsasikumar Sep 26, 2022
446f4f7
Delete README.md
gsasikumar Sep 26, 2022
c7c61e6
Updated readme
gsasikumar Sep 26, 2022
7b42df4
Update README.md
ckm007 Oct 26, 2022
6e41851
[DSD-2448]Fixed Duplication Tag Error in POM file (#50)
JanardhanBS-SyncByte Apr 20, 2023
4880727
Readme example changed
JanardhanBS-SyncByte May 3, 2023
800350b
MOSIP-28840 docker changes to read from config server
Aug 22, 2023
eddd7b0
MOSIP-28840 config fix
Aug 23, 2023
bbd7881
MOSIP-28840_develop name changes
Aug 23, 2023
1629038
MOSIP-28840 code fix
Aug 28, 2023
d334b37
[MOSIP-29207] Updated workflows as per reusable workflows templates (…
syedsalman3753 Sep 8, 2023
a01d8aa
Update README.md (#52)
ckm007 Jun 21, 2023
66498fb
Handled nulls
Sep 4, 2023
fd02c37
Handled nulls
Sep 4, 2023
e2cd202
MOSIP-32064
JanardhanBS-SyncByte May 14, 2024
993cae8
MOSIP-32064
JanardhanBS-SyncByte May 14, 2024
81b6fc4
Create temp-push-trigger.yml
ckm007 Sep 8, 2023
922d47e
Update temp-push-trigger.yml
ckm007 Sep 11, 2023
b2ef3a7
removed cache for maven build
ckm007 Sep 11, 2023
b9618a4
[MOSIP-29207] Updated workflows as per reusable workflows templates (…
syedsalman3753 Sep 26, 2023
f1bf4b6
Delete .github/workflows/temp-push-trigger.yml
ckm007 Sep 28, 2023
7cdc911
[MOSIP-29095]
ckm007 Sep 29, 2023
103dcc3
Update tag.yml (#89)
shubham17998 Nov 21, 2023
2612535
[MOSIP-29961] Updated push-trigger.yml (#98)
Rakshithb1 Dec 13, 2023
55ff882
[DSD-3932] removed release-changes.yml, tag.yml and updated push-trig…
Prafulrakhade Dec 20, 2023
14a7e4a
Sonar analysis in biosdk fixed in develop
JayaSaiKrishna11 Feb 14, 2024
d5421dc
Sonar changes regarding the DSD-4595
JayaSaiKrishna11 Feb 19, 2024
b35d7a6
Revert csrf fix
Feb 22, 2024
5498907
MOSIP-32064
JanardhanBS-SyncByte May 14, 2024
5f763f3
MOSIP-32064
JanardhanBS-SyncByte May 14, 2024
dafe886
MOSIP-32064
JanardhanBS-SyncByte May 14, 2024
f9a2a41
[MOSIP-32064] Update run_local.bat
ckm007 May 14, 2024
55ffa14
Create temp-push-trigger.yml
ckm007 Sep 8, 2023
2555f5e
Update temp-push-trigger.yml
ckm007 Sep 11, 2023
e72c678
removed cache for maven build
ckm007 Sep 11, 2023
0aa1f3a
Delete .github/workflows/temp-push-trigger.yml
ckm007 Sep 28, 2023
c37f603
Sonar analysis in biosdk fixed in develop
JayaSaiKrishna11 Feb 14, 2024
c3b1d9a
Sonar changes regarding the DSD-4595
JayaSaiKrishna11 Feb 19, 2024
8026d8b
Revert csrf fix
Feb 22, 2024
d49029d
[MOSIP-33145] Merge to develop from develop-java21
JanardhanBS-SyncByte Jun 18, 2024
ac38123
Merge branch 'develop' into develop
JanardhanBS-SyncByte Jun 18, 2024
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: 5 additions & 5 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ on:
- release*
- master
- 1.*
- develop
- develop*
- MOSIP*

jobs:
build-biosdk-services:
uses: mosip/kattu/.github/workflows/maven-build.yml@master
uses: mosip/kattu/.github/workflows/maven-build.yml@master-java21
with:
SERVICE_LOCATION: ./biosdk-services
BUILD_ARTIFACT: biosdk-services
Expand All @@ -37,7 +37,7 @@ jobs:
publish_to_nexus:
if: "${{ !contains(github.ref, 'master') && github.event_name != 'pull_request' && github.event_name != 'release' && github.event_name != 'prerelease' && github.event_name != 'publish' }}"
needs: build-biosdk-services
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master
uses: mosip/kattu/.github/workflows/maven-publish-to-nexus.yml@master-java21
with:
SERVICE_LOCATION: ./biosdk-services
secrets:
Expand All @@ -51,7 +51,7 @@ jobs:
sonar_analysis:
needs: build-biosdk-services
if: "${{ github.event_name != 'pull_request' }}"
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master
uses: mosip/kattu/.github/workflows/maven-sonar-analysis.yml@master-java21
with:
SERVICE_LOCATION: ./biosdk-services
secrets:
Expand All @@ -72,7 +72,7 @@ jobs:
SERVICE_NAME: 'biosdk-server'
BUILD_ARTIFACT: 'biosdk-services'
fail-fast: false
uses: mosip/kattu/.github/workflows/docker-build.yml@master
uses: mosip/kattu/.github/workflows/docker-build.yml@master-java21
name: ${{ matrix.SERVICE_NAME }}
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[![Maven Package upon a push](https://github.com/mosip/biosdk-services/actions/workflows/push_trigger.yml/badge.svg?branch=develop)](https://github.com/mosip/biosdk-services/actions/workflows/push_trigger.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=develop&project=mosip_biosdk-services&metric=alert_status)](https://sonarcloud.io/dashboard?branch=develop&id=mosip_biosdk-services)


[![Maven Package upon a push](https://github.com/mosip/biosdk-services/actions/workflows/push_trigger.yml/badge.svg?branch=develop-java21)](https://github.com/mosip/biosdk-services/actions/workflows/push_trigger.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=develop-java21&project=mosip_biosdk-services&metric=alert_status)](https://sonarcloud.io/dashboard?branch=develop-java21&id=mosip_biosdk-services)

# Bio-SDK Service

## Overview
This is reference service and provides a mock implementation of Bio-SDK REST Service. By default loads [Mock BIO SDK](https://github.com/mosip/mosip-mock-services/tree/master/mock-sdk) internally on the startup and exposes the endpoints to perform 1:1 match, extraction as per the [IBioAPI](https://github.com/mosip/commons/blob/master/kernel/kernel-biometrics-api/src/main/java/io/mosip/kernel/biometrics/spi/IBioApi.java).
This is reference service and provides a mock implementation of Bio-SDK REST Service. By default loads [Mock BIO SDK](https://github.com/mosip/mosip-mock-services/tree/master/mock-sdk) internally on the startup and exposes the endpoints to perform 1:1 match, extraction as per the [IBioAPIV2](https://github.com/mosip/commons/blob/master/kernel/kernel-biometrics-api/src/main/java/io/mosip/kernel/biometrics/spi/IBioApiV2.java).

To know more about Biometric SDK, refer [biometric-sdk](https://docs.mosip.io/1.2.0/biometrics/biometric-sdk).

Expand Down
64 changes: 26 additions & 38 deletions biosdk-services/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
FROM openjdk:11
FROM mosipdev/openjdk-21-jre:latest

# label to be assigned along with Docker build [Mandatory]
ARG SOURCE
ARG COMMIT_HASH
ARG COMMIT_ID
ARG BUILD_TIME
LABEL source=${SOURCE}
LABEL commit_hash=${COMMIT_HASH}
LABEL commit_id=${COMMIT_ID}
LABEL build_time=${BUILD_TIME}

# can be passed during Docker build as build time environment for github branch to pickup configuration from.
ARG spring_config_label
Expand All @@ -9,33 +19,13 @@ ARG active_profile
# can be passed during Docker build as build time environment for config server URL
ARG spring_config_url

# can be passed during Docker build as build time environment for application name
ARG spring_application_name

# can be passed during Docker build as build time environment for config name
ARG spring_cloud_config_name

# can be passed during Docker build as build time environment for context path
ARG server_servlet_context

# environment variable to pass github branch to pickup configuration from, at docker runtime
ENV spring_config_label_env=${spring_config_label}

# environment variable to pass active profile such as DEV, QA etc at docker runtime
ENV active_profile_env=${active_profile}

# environment variable to pass spring configuration url, at docker runtime
ENV spring_config_url_env=${spring_config_url}

# environment variable to pass spring application name, at docker runtime
ENV spring_application_name_env=${spring_application_name}

# environment variable to pass spring config name, at docker runtime
ENV spring_cloud_config_name_env=${spring_cloud_config_name}

# environment variable to pass spring context path , at docker runtime
ENV server_servlet_context_env=${server_servlet_context}

ARG biosdk_zip_url

ENV biosdk_zip_file_path=${biosdk_zip_url}
Expand Down Expand Up @@ -65,44 +55,42 @@ ARG container_user_uid=1001
# can be passed during Docker build as build time environment for github branch to pickup configuration from.
ARG container_user_gid=1001

# install packages and create user
RUN apt-get -y update \
&& apt-get install -y unzip sudo\
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user}

# set working directory for the user
WORKDIR /home/${container_user}

ENV work_dir=/home/${container_user}

ARG loader_path=${work_dir}/additional_jars/

RUN mkdir -p ${loader_path}

ENV loader_path_env=${loader_path}

ARG logging_level_root=INFO

ENV logging_level_root_env=${logging_level_root}

ADD ./target/biosdk-services-*.jar biosdk-services.jar

ADD ./configure_biosdk.sh configure_biosdk.sh
# install packages and create user for ubunutu latest
RUN apt-get update && \
apt-get install -y --no-install-recommends sudo && \
groupadd -g ${container_user_gid} ${container_user_group} && \
useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/bash -m ${container_user} && \
mkdir -p /home/${container_user} ${loader_path}


RUN chmod 775 biosdk-services.jar
ADD configure_biosdk.sh /home/${container_user}/configure_biosdk.sh

RUN chmod +x configure_biosdk.sh
ADD ./target/biosdk-services-*.jar biosdk-services.jar

# change permissions of file inside working dir
RUN chown -R ${container_user}:${container_user} /home/${container_user}
RUN chmod +x /home/${container_user}/configure_biosdk.sh \
&& chmod a-w /home/${container_user}/configure_biosdk.sh \
&& chmod 775 biosdk-services.jar \
&& chown -R ${container_user}:${container_user} /home/${container_user}

# select container user for all tasks
USER ${container_user_uid}:${container_user_gid}

EXPOSE 9099

ENTRYPOINT [ "./configure_biosdk.sh" ]
ENTRYPOINT ["./configure_biosdk.sh"]

CMD echo $biosdk_bioapi_impl ; \
java -Dloader.path="${loader_path_env}" -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -jar biosdk-services.jar
java -Dloader.path="${loader_path_env}" -Dserver.servlet.context-path="${service_context_env}" -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" --add-modules=ALL-SYSTEM --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.stream=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/java.time.LocalDate=ALL-UNNAMED --add-opens java.base/java.time.LocalDateTime=ALL-UNNAMED --add-opens java.base/java.time.LocalDateTime.date=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect.DirectMethodHandleAccessor=ALL-UNNAMED -jar biosdk-services.jar
8 changes: 4 additions & 4 deletions biosdk-services/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Bio SDK services

This service provides a mock implementation of Bio-SDK REST Service. It by default loads [Mock BIO SDK](https://github.com/mosip/mosip-mock-services/tree/master/mock-sdk) internally on the startup and exposes the endpoints to perform 1:N match, segmentation, extraction as per the [IBioAPI](https://github.com/mosip/commons/blob/master/kernel/kernel-biometrics-api/src/main/java/io/mosip/kernel/biometrics/spi/IBioApi.java). This can be configured to load a different JAR that has a different implementation of `IBioAPI`, provided its dependencies are in place.
This service provides a mock implementation of Bio-SDK REST Service. It by default loads [Mock BIO SDK](https://github.com/mosip/mosip-mock-services/tree/master/mock-sdk) internally on the startup and exposes the endpoints to perform 1:N match, segmentation, extraction as per the [IBioAPI](https://github.com/mosip/commons/blob/master/kernel/kernel-biometrics-api/src/main/java/io/mosip/kernel/biometrics/spi/IBioApiV2.java). This can be configured to load a different JAR that has a different implementation of `IBioAPIV2`, provided its dependencies are in place.

## Requirements:
* Java version = 11.X.X
* Maven version >= 3.6
* Java version = 21.X.X
* Maven version >= 3.9.6

## Run jar directly

Expand All @@ -18,7 +18,7 @@ mvn clean install
### Run jar

```text
java -Dloader.path=<biosdk jar provided by third-party vendors> -Dbiosdk_bioapi_impl=<classpath of class that implements IBioApi interface> -jar biosdk-services-<version>.jar
java -Dloader.path=<biosdk jar provided by third-party vendors> -Dbiosdk_bioapi_impl=<classpath of class that implements IBioApi interface> --add-modules=ALL-SYSTEM --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.lang.stream=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/java.time.LocalDate=ALL-UNNAMED --add-opens java.base/java.time.LocalDateTime=ALL-UNNAMED --add-opens java.base/java.time.LocalDateTime.date=ALL-UNNAMED -jar biosdk-services-<version>.jar
```

For example:
Expand Down
5 changes: 3 additions & 2 deletions biosdk-services/configure_biosdk.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash
#!/bin/sh
# Built by MOSIP team
# Script to configure the BioSDK
set -e

echo "starting downloading zip file $biosdk_zip_file_path"

wget -q --show-progress "$biosdk_zip_file_path"
wget -q "$biosdk_zip_file_path"

echo "Downloaded $biosdk_zip_file_path"

FILE_NAME=${biosdk_zip_file_path##*/}
Expand Down
Loading
Loading