diff --git a/authentication/authentication-childauthfilter-impl/pom.xml b/authentication/authentication-childauthfilter-impl/pom.xml index df5f33f284..c3c7d628ab 100644 --- a/authentication/authentication-childauthfilter-impl/pom.xml +++ b/authentication/authentication-childauthfilter-impl/pom.xml @@ -1,298 +1,298 @@ - - 4.0.0 - - io.mosip.authentication - authentication-ref-impl-parent - 1.2.1-java21-SNAPSHOT - - 1.2.1-java21-SNAPSHOT - authentication-childauthfilter-impl - authentication-childauthfilter-impl - ID Authentication Filter reference Implementation to check allowed auth types for child - https://github.com/mosip/commons - jar - - - UTF-8 - - - 21 - 21 - 3.8.0 - - 3.0.2 - 3.1.0 - 3.2.0 - 2.3 - - - - - - - io.mosip.kernel - kernel-bom - 1.2.1-java21-SNAPSHOT - pom - import - - - - - - - org.projectlombok - lombok - compile - - - io.mosip.kernel - kernel-core - ${kernel-core.version} - - - org.springframework.boot - - spring-boot-starter-security - - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-annotations - - - - - io.mosip.authentication - authentication-core - ${authentication-core.version} - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-annotations - - - - - io.mosip.authentication - authentication-common - ${authentication-common.version} - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.core - jackson-core - - - - - io.mosip.authentication - authentication-filter-api - ${authentication-filter-api.version} - - - io.mosip.kernel - kernel-logger-logback - ${kernel-logger-logback.version} - - - org.springframework.boot - - spring-boot-starter-security - - - - com.fasterxml.jackson.core - jackson-databind - - - - - org.springframework.boot - spring-boot-starter-webflux - ${spring.boot.version} - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-core - - - - - io.springfox - springfox-swagger2 - ${maven.swagger.version} - - - com.fasterxml.jackson.core - jackson-annotations - - - - - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - maven-deploy-plugin - 2.8.1 - - - default-deploy - deploy - - deploy - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - - default-deploy - deploy - - deploy - - - - - ossrh - https://oss.sonatype.org/ - false - - - - - org.apache.maven.plugins - maven-source-plugin - true - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - - attach-javadocs - - jar - - - - - none - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - --pinentry-mode - loopback - - - - - - - pl.project13.maven - git-commit-id-plugin - 3.0.1 - - - get-the-git-infos - - revision - - validate - - - - true - ${project.build.outputDirectory}/git.properties - - ^git.build.(time|version)$ - ^git.commit.id.(abbrev|full)$ - - full - ${project.basedir}/.git - - - - - - - scm:git:git://github.com/mosip/commons.git - scm:git:ssh://github.com:mosip/commons.git - https://github.com/mosip/commons - HEAD - - - - MPL 2.0 - https://www.mozilla.org/en-US/MPL/2.0/ - - - - - Mosip - mosip.emailnotifier@gmail.com - io.mosip - https://github.com/mosip/commons - - - - + + 4.0.0 + + io.mosip.authentication + authentication-ref-impl-parent + 1.2.1-SNAPSHOT + + 1.2.1-SNAPSHOT + authentication-childauthfilter-impl + authentication-childauthfilter-impl + ID Authentication Filter reference Implementation to check allowed auth types for child + https://github.com/mosip/commons + jar + + + UTF-8 + + + 21 + 21 + 3.8.0 + + 3.0.2 + 3.1.0 + 3.2.0 + 2.3 + + + + + + + io.mosip.kernel + kernel-bom + 1.2.1-SNAPSHOT + pom + import + + + + + + + org.projectlombok + lombok + compile + + + io.mosip.kernel + kernel-core + ${kernel-core.version} + + + org.springframework.boot + + spring-boot-starter-security + + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.mosip.authentication + authentication-core + ${authentication-core.version} + + + com.fasterxml.jackson.core + jackson-core + + + com.fasterxml.jackson.core + jackson-annotations + + + + + io.mosip.authentication + authentication-common + ${authentication-common.version} + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-core + + + + + io.mosip.authentication + authentication-filter-api + ${authentication-filter-api.version} + + + io.mosip.kernel + kernel-logger-logback + ${kernel-logger-logback.version} + + + org.springframework.boot + + spring-boot-starter-security + + + + com.fasterxml.jackson.core + jackson-databind + + + + + org.springframework.boot + spring-boot-starter-webflux + ${spring.boot.version} + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.core + jackson-core + + + + + io.springfox + springfox-swagger2 + ${maven.swagger.version} + + + com.fasterxml.jackson.core + jackson-annotations + + + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + maven-deploy-plugin + 2.8.1 + + + default-deploy + deploy + + deploy + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + + default-deploy + deploy + + deploy + + + + + ossrh + https://oss.sonatype.org/ + false + + + + + org.apache.maven.plugins + maven-source-plugin + true + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + attach-javadocs + + jar + + + + + none + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + pl.project13.maven + git-commit-id-plugin + 3.0.1 + + + get-the-git-infos + + revision + + validate + + + + true + ${project.build.outputDirectory}/git.properties + + ^git.build.(time|version)$ + ^git.commit.id.(abbrev|full)$ + + full + ${project.basedir}/.git + + + + + + + scm:git:git://github.com/mosip/commons.git + scm:git:ssh://github.com:mosip/commons.git + https://github.com/mosip/commons + HEAD + + + + MPL 2.0 + https://www.mozilla.org/en-US/MPL/2.0/ + + + + + Mosip + mosip.emailnotifier@gmail.com + io.mosip + https://github.com/mosip/commons + + + + diff --git a/authentication/pom.xml b/authentication/pom.xml index bd80876cfb..eb89ca73f5 100644 --- a/authentication/pom.xml +++ b/authentication/pom.xml @@ -117,7 +117,7 @@ io.mosip.kernel kernel-bom - 1.2.1-java21-SNAPSHOT + 1.2.1-SNAPSHOT pom import diff --git a/registration-processor/registration-processor-external-integration-service/Dockerfile b/registration-processor/registration-processor-external-integration-service/Dockerfile index 313b1601eb..8c3c13908a 100644 --- a/registration-processor/registration-processor-external-integration-service/Dockerfile +++ b/registration-processor/registration-processor-external-integration-service/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:11 +FROM eclipse-temurin:21-jre-alpine ARG SOURCE ARG COMMIT_HASH @@ -49,16 +49,17 @@ ARG container_user=mosip ARG container_user_group=mosip # can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG container_user_uid=1001 +ARG container_user_uid=1002 # 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 \ -&& groupadd -g ${container_user_gid} ${container_user_group} \ -&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} +RUN apk -q update \ +&& apk add -q unzip sudo findutils \ +&& addgroup -g ${container_user_gid} ${container_user_group} \ +&& adduser -s /bin/sh -u ${container_user_uid} -G ${container_user_group} -h /home/${container_user} --disabled-password ${container_user} \ +&& addgroup sudo \ +&& adduser ${container_user} sudo # set working directory for the user WORKDIR /home/${container_user} diff --git a/registration-processor/registration-processor-external-integration-service/pom.xml b/registration-processor/registration-processor-external-integration-service/pom.xml index f47041c6bc..6c83a4b7e1 100644 --- a/registration-processor/registration-processor-external-integration-service/pom.xml +++ b/registration-processor/registration-processor-external-integration-service/pom.xml @@ -35,10 +35,8 @@ UTF-8 UTF-8 2.22.0 - 0.8.5 + 0.8.11 3.7.0.1746 - 1.4.2 - 1.5.10 **/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/verticle/**,**/spi/**,"**/proxy/**","**/entities/**","**/filter/**","**/util/**","**/verifier/**" @@ -50,12 +48,10 @@ org.springframework.boot spring-boot-starter-actuator - ${spring.boot.version} org.springframework.cloud spring-cloud-starter-config - ${spring-cloud-config.version} org.springframework.boot @@ -65,29 +61,43 @@ org.projectlombok lombok - ${lombok.version} io.micrometer micrometer-core - ${io.micrometer.prometheus.version} io.micrometer micrometer-registry-prometheus - ${io.micrometer.prometheus.version} org.springdoc springdoc-openapi-ui - ${springdoc.version} org.springframework.boot spring-boot-configuration-processor - ${spring.boot.version} true + + org.mockito + mockito-core + ${mockito.version} + test + + + junit + junit + test + + + org.junit.vintage + junit-vintage-engine + + + org.springframework.cloud + spring-cloud-starter-bootstrap + @@ -158,7 +168,7 @@ true - ${project.build.outputDirectory}/git.properties + ${project.build.outputDirectory}/service-git.properties ^git.build.(time|version)$ ^git.commit.id.(abbrev|full)$ diff --git a/registration-processor/registration-processor-external-integration-service/src/test/resources/application.properties b/registration-processor/registration-processor-external-integration-service/src/test/resources/application.properties index b0910a8fe5..63981a47d4 100644 --- a/registration-processor/registration-processor-external-integration-service/src/test/resources/application.properties +++ b/registration-processor/registration-processor-external-integration-service/src/test/resources/application.properties @@ -10,4 +10,5 @@ mosipbox.public.url=http://localhost:${server.port} openapi.service.servers[0].url=${mosipbox.public.url}${server.servlet.path} openapi.service.servers[0].description=External Integration Service openapi.group.name=${openapi.info.title} -openapi.group.paths[0]=/** \ No newline at end of file +openapi.group.paths[0]=/** +spring.cloud.config.import-check.enabled=false \ No newline at end of file diff --git a/registration-processor/registration-processor-external-stage/Dockerfile b/registration-processor/registration-processor-external-stage/Dockerfile index f31160a55c..0a6159b9dd 100644 --- a/registration-processor/registration-processor-external-stage/Dockerfile +++ b/registration-processor/registration-processor-external-stage/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:11 +FROM eclipse-temurin:21-jre-alpine ARG SOURCE ARG COMMIT_HASH @@ -42,6 +42,9 @@ ENV is_glowroot_env=${is_glowroot} # environment variable to pass artifactory url, at docker runtime ENV artifactory_url_env=${artifactory_url} +# environment variable to pass iam_adapter url, at docker runtime +ENV iam_adapter_url_env=${iam_adapter_url} + # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG container_user=mosip @@ -49,16 +52,17 @@ ARG container_user=mosip ARG container_user_group=mosip # can be passed during Docker build as build time environment for github branch to pickup configuration from. -ARG container_user_uid=1001 +ARG container_user_uid=1002 # 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 \ -&& groupadd -g ${container_user_gid} ${container_user_group} \ -&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} +RUN apk -q update \ +&& apk add -q unzip sudo findutils \ +&& addgroup -g ${container_user_gid} ${container_user_group} \ +&& adduser -s /bin/sh -u ${container_user_uid} -G ${container_user_group} -h /home/${container_user} --disabled-password ${container_user} \ +&& addgroup sudo \ +&& adduser ${container_user} sudo # set working directory for the user WORKDIR /home/${container_user} @@ -91,14 +95,15 @@ RUN chown -R ${container_user}:${container_user} /home/${container_user} USER ${container_user_uid}:${container_user_gid} CMD if [ "$is_glowroot_env" = "present" ]; then \ + wget "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ wget "${artifactory_url_env}"/artifactory/libs-release-local/io/mosip/testing/glowroot.zip ; \ - apt-get update && apt-get install -y unzip ; \ + apt-get update && apk add -q unzip wget ; \ unzip glowroot.zip ; \ rm -rf glowroot.zip ; \ - sed -i 's//registration-processor-external-stage/g' glowroot/glowroot.properties ; \ java -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -jar -javaagent:glowroot/glowroot.jar registration-processor-external-stage.jar ; \ else \ + wget "${iam_adapter_url_env}" -O "${loader_path_env}"/kernel-auth-adapter.jar; \ java -Dspring.cloud.config.label="${spring_config_label_env}" -Dspring.profiles.active="${active_profile_env}" -Dspring.cloud.config.uri="${spring_config_url_env}" -jar registration-processor-external-stage.jar ; \ fi diff --git a/registration-processor/registration-processor-external-stage/pom.xml b/registration-processor/registration-processor-external-stage/pom.xml index 4c7e640bd6..56a5c71af6 100644 --- a/registration-processor/registration-processor-external-stage/pom.xml +++ b/registration-processor/registration-processor-external-stage/pom.xml @@ -26,7 +26,7 @@ io.mosip.registrationprocessor pre-processor - 1.2.0.1 + 1.2.1-SNAPSHOT registration-processor-external-stage @@ -35,16 +35,14 @@ UTF-8 2.22.0 - 0.8.5 + 0.8.11 3.7.0.1746 - 1.4.2 org.springframework.cloud spring-cloud-starter-config - ${spring-cloud-config.version} org.mockito @@ -55,7 +53,6 @@ io.vertx vertx-unit - ${vertx.version} test @@ -85,12 +82,10 @@ io.micrometer micrometer-core - 1.4.2 io.micrometer micrometer-registry-prometheus - 1.4.2 @@ -170,7 +165,7 @@ true - ${project.build.outputDirectory}/git.properties + ${project.build.outputDirectory}/service-git.properties ^git.build.(time|version)$ ^git.commit.id.(abbrev|full)$ diff --git a/registration-processor/registration-processor-external-stage/src/main/java/io/mosip/registrationprocessor/externalstage/ExternalStageApplication.java b/registration-processor/registration-processor-external-stage/src/main/java/io/mosip/registrationprocessor/externalstage/ExternalStageApplication.java index 457db1e85b..180dce9db6 100644 --- a/registration-processor/registration-processor-external-stage/src/main/java/io/mosip/registrationprocessor/externalstage/ExternalStageApplication.java +++ b/registration-processor/registration-processor-external-stage/src/main/java/io/mosip/registrationprocessor/externalstage/ExternalStageApplication.java @@ -2,6 +2,7 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import io.mosip.registration.processor.core.config.reader.ConfigPropertyReader; import io.mosip.registrationprocessor.externalstage.stage.ExternalStage; /** @@ -18,6 +19,7 @@ public class ExternalStageApplication { public static void main(String[] args) { AnnotationConfigApplicationContext configApplicationContext = new AnnotationConfigApplicationContext(); configApplicationContext.scan("io.mosip.registration.processor.core.config", + ConfigPropertyReader.getConfig("mosip.auth.adapter.impl.basepackage"), "io.mosip.registrationprocessor.externalstage.config", "io.mosip.registration.processor.core.config", "io.mosip.registration.processor.status.config", "io.mosip.registration.processor.core.kernel.beans", "io.mosip.registration.processor.rest.client.config");