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

cherry-picked esignet wrapper zip creation logic #456

Open
wants to merge 5 commits into
base: release-1.2.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 27 additions & 15 deletions artifacts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ RUN apt-get -y update &&\
apt-get install -y --no-install-recommends unzip wget zip tree openjdk-11-jdk &&\
groupadd -g ${container_user_gid} ${container_user_group} &&\
rm -rf /var/lib/apt/lists/* &&\
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz &&\
tar -xzf apache-maven-3.8.8-bin.tar.gz && mv apache-maven-3.8.8 /usr/local/maven && rm apache-maven-3.8.8-bin.tar.gz &&\
wget https://dlcdn.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz &&\
tar -xzf apache-maven-3.8.7-bin.tar.gz && mv apache-maven-3.8.7 /usr/local/maven && rm apache-maven-3.8.7-bin.tar.gz &&\
useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} \
&& mkdir -p /var/run/nginx /var/tmp/nginx \
&& chown -R ${container_user}:${container_user} /usr/share/nginx /var/run/nginx /var/tmp/nginx


COPY ./nginx.conf /etc/nginx/nginx.conf

ENV MAVEN_HOME /usr/local/maven
Expand Down Expand Up @@ -74,33 +73,40 @@ ENV test_jar_path=${base_path}/libs-release-local/io/mosip/testing/
# environment variable for ref-idobjectvalidator jar
ENV idobject_jar_path=${base_path}/libs-release-local/io/mosip/kernel/kernel-ref-idobjectvalidator

# environment variable for regproc auth jar
ENV regproc_jar_path=${base_path}/libs-release-local/io/mosip/kernel/kernel-auth-adapter

# environment variable for prereg transliteration jar path
ENV icu4j_jar_path=${base_path}/libs-release-local/icu4j

# environment variable for i18n zip path
ENV i18n_zip_path=${base_path}/libs-release-local/i18n

# environment variable for idp auth wrapper jar path
ENV idp_auth_wrapper_jar_path=${base_path}/libs-release-local/idp/idp-auth-wrapper
# environment variable for idp auth wrapper zip path
ENV idp_auth_wrapper_lib_zip_path=${base_path}/libs-release-local/idp/idp-auth-wrapper

# environment variable for esignet auth wrapper jar path
ENV esignet_auth_wrapper_jar_path=${base_path}/libs-release-local/esignet/esignet-auth-wrapper
# environment variable for esignet wrappers zip path
ENV esignet_wrapper_lib_zip_path=${base_path}/libs-release-local/esignet

# environment variable for Clamav dependency
ENV clamav_path=${base_path}/libs-release-local/clamav

ENV regclient_jar_path=${base_path}/libs-release-local

ENV master_template_path=${base_path}/libs-release-local/master-templates

# environment variable for child auth filter jar path
ENV child_auth_filter_jar_path=${base_path}/libs-release-local/io/mosip/authentication/authentication-ref-impl

ENV master_template_path=${base_path}/libs-release-local/master-templates

# environment variable for script path
ENV scripts_path=/home/mosip/scripts

# Create all the Jar paths
RUN mkdir -p ${biosdk_client_zip_path}/biosdk-client ${demosdk_zip_path}/demosdk ${biosdk_lib_zip_path}/biosdk-lib ${cache_path} ${ida_sh_path} ${hsm_client_path} ${kernel_jar_path} ${test_jar_path} ${idobject_jar_path} ${sdk_path} ${icu4j_jar_path} ${clamav_path} ${i18n_zip_path} ${child_auth_filter_jar_path} ${jpeg_sdk_path} ${jpegsdk_lib_zip_path}/jpeg-sdk-lib ${base_path}/libs-release-local/reg-client ${master_template_path} ${idp_auth_wrapper_jar_path} ${esignet_auth_wrapper_jar_path}
# environment variable for jar version to be downloaed, this needed to be passed buildtime
ENV version=1.2.1-SNAPSHOT
ENV idp_auth_wrapper_version=0.0.1-SNAPSHOT

# Create all the jar paths.
RUN mkdir -p ${biosdk_client_zip_path}/biosdk-client ${demosdk_zip_path}/demosdk ${biosdk_lib_zip_path}/biosdk-lib ${cache_path} ${ida_sh_path} ${hsm_client_path} ${kernel_jar_path} ${test_jar_path} ${idobject_jar_path} ${regproc_jar_path} ${sdk_path} ${icu4j_jar_path} ${clamav_path} ${i18n_zip_path} ${child_auth_filter_jar_path} ${base_path}/libs-release-local/reg-client ${scripts_path} ${master_template_path} ${jpeg_sdk_path} ${jpegsdk_lib_zip_path}/jpeg-sdk-lib/ ${idp_auth_wrapper_lib_zip_path} ${esignet_wrapper_lib_zip_path}/esignet-wrapper

# Copy all the respective jars to the location

Expand All @@ -126,20 +132,24 @@ COPY /src/i18n/pmp-entity-spec-bundle/* ${work_dir}/pmp-entity-spec-bundle/

COPY /src/i18n/pmp-i18n-bundle/* ${work_dir}/pmp-i18n-bundle/

COPY /src/i18n/idp-i18n-bundle/* ${work_dir}/idp-i18n-bundle/
COPY /src/i18n/pre-registration-i18n-bundle/* ${work_dir}/pre-registration-i18n-bundle/

COPY /src/master-templates/* ${work_dir}/master-templates/

COPY /src/i18n/idp-i18n-bundle/* ${work_dir}/idp-i18n-bundle/

COPY /src/i18n/oidc-demo-i18n-bundle/* ${work_dir}/oidc-demo-i18n-bundle/

COPY /src/i18n/mock-relying-party-i18n-bundle/* ${work_dir}/mock-relying-party-i18n-bundle/

COPY /src/i18n/pre-registration-i18n-bundle/* ${work_dir}/pre-registration-i18n-bundle/

COPY /src/master-templates/* ${work_dir}/master-templates/
COPY /src/i18n/esignet-i18n-bundle/* ${work_dir}/esignet-i18n-bundle/

COPY /src/jre/zulu11.41.23-ca-fx-jre11.0.8-win_x64.zip ${regclient_jar_path}/zulu11.41.23-ca-fx-jre11.0.8-win_x64.zip

COPY /src/icu4j/* ${icu4j_jar_path}/

COPY /src/auth/* ${regproc_jar_path}/

COPY ./configure.sh ${work_dir}/

COPY pom.xml ${work_dir}/
Expand All @@ -156,3 +166,5 @@ USER ${container_user_uid}:${container_user_gid}
EXPOSE 8080

CMD ["nginx", "-g", "daemon off;"]


5 changes: 5 additions & 0 deletions artifacts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ zip -r -j ${demosdk_zip_path}/demosdk.zip ${demosdk_zip_path}/demosdk/*
rm -rf ${demosdk_zip_path}/demosdk
echo demosdk-client zip creation completed

echo esignet-wrappers zip creation started
zip -r -j ${esignet_wrapper_lib_zip_path}/esignet-wrapper.zip ${esignet_wrapper_lib_zip_path}/esignet-wrapper/*
rm -rf ${esignet_wrapper_lib_zip_path}/esignet-wrapper
echo esignet-wrapper zip creation completed

echo Creating resources.zip file for all the resources provided
zip -r -j ${base_path}/libs-release-local/reg-client/resources.zip ${work_dir}/resources
rm -rf ${work_dir}/resources
Expand Down
31 changes: 21 additions & 10 deletions artifacts/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,13 @@
<authentication-wrapper.version>0.9.0</authentication-wrapper.version>
<authentication-wrapper.location>/usr/share/nginx/html/artifactory/libs-release-local/idp/idp-auth-wrapper</authentication-wrapper.location>
<authentication-wrapper.fileName>authentication-wrapper.jar</authentication-wrapper.fileName>
<!-- esignet authentication wrapper -->
<esignet-authentication-wrapper.version>1.0.0-SNAPSHOT</esignet-authentication-wrapper.version>
<esignet-authentication-wrapper.location>/usr/share/nginx/html/artifactory/libs-release-local/esignet/esignet-auth-wrapper</esignet-authentication-wrapper.location>
<esignet-authentication-wrapper.fileName>esignet-authentication-wrapper.jar</esignet-authentication-wrapper.fileName>
<!-- esignet mock authentication wrapper -->
<esignet-wrapper.location>/usr/share/nginx/html/artifactory/libs-release-local/esignet/esignet-wrapper</esignet-wrapper.location>
<esignet-mock-wrapper.version>0.9.0-SNAPSHOT</esignet-mock-wrapper.version>
<esignet-mock-wrapper.fileName>esignet-mock-wrapper.jar</esignet-mock-wrapper.fileName>
<!-- esignet IDA wrapper -->
<esignet-ida-wrapper.version>1.2.0.1-B3-SNAPSHOT</esignet-ida-wrapper.version>
<esignet-ida-wrapper.fileName>esignet-ida-wrapper.jar</esignet-ida-wrapper.fileName>
</properties>

<build>
Expand Down Expand Up @@ -279,7 +282,7 @@
<destFileName>${hazelcast.fileName}</destFileName>
<type>jar</type>
</artifactItem>
<!-- artifactItem section for idp authentication wrapper -->
<!-- artifactItem section for idp authentication wrapper - only required for idp v090-->
<artifactItem>
<groupId>io.mosip.idp</groupId>
<artifactId>authentication-wrapper</artifactId>
Expand All @@ -290,13 +293,21 @@
</artifactItem>
<!-- artifactItem section for esignet authentication wrapper -->
<artifactItem>
<groupId>io.mosip.idp</groupId>
<artifactId>authentication-wrapper</artifactId>
<version>${esignet-authentication-wrapper.version}</version>
<outputDirectory>${esignet-authentication-wrapper.location}</outputDirectory>
<destFileName>${esignet-authentication-wrapper.fileName}</destFileName>
<groupId>io.mosip.esignet.mock</groupId>
<artifactId>mock-esignet-integration-impl</artifactId>
<version>${esignet-mock-wrapper.version}</version>
<outputDirectory>${esignet-wrapper.location}</outputDirectory>
<destFileName>${esignet-mock-wrapper.fileName}</destFileName>
<type>jar</type>
</artifactItem>
<artifactItem>
<groupId>io.mosip.authentication</groupId>
<artifactId>esignet-integration-impl</artifactId>
<version>${esignet-ida-wrapper.version}</version>
<outputDirectory>${esignet-wrapper.location}</outputDirectory>
<destFileName>${esignet-ida-wrapper.fileName}</destFileName>
<type>jar</type>
</artifactItem>
</artifactItems>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
Expand Down
5 changes: 4 additions & 1 deletion artifacts/src/i18n/esignet-i18n-bundle/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@
"IDA-RST-005": "المهلة غير صالحة",
"IDA-RST-006": "4XX - حدث خطأ في العميل",
"IDA-RST-007": "5XX - حدث خطأ في الخادم",
"IDA-RST-008": "انتهت مدة الاتصال"
"IDA-RST-008": "انتهت مدة الاتصال",
"IDA-KBT-001": "لم يتم العثور على الشهادة المنضمة",
"IDA-KBT-002": "الرمز المميز الموقع الصادر في (iat) ليس في النطاق الزمني المسموح به.",
"IDA-KBT-003": "خطأ في التحقق من الرمز المميز المرتبط بالمفتاح."
}
}
5 changes: 4 additions & 1 deletion artifacts/src/i18n/esignet-i18n-bundle/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@
"IDA-RST-005": "Timeout is invalid",
"IDA-RST-006": "4XX - Client Error occurred",
"IDA-RST-007": "5XX - Server Error occurred",
"IDA-RST-008": "Connection timed out"
"IDA-RST-008": "Connection timed out",
"IDA-KBT-001": "Bound certificate not found",
"IDA-KBT-002": "Signed token issued at (iat) is not in allowed time range.",
"IDA-KBT-003": "Error verifying key binded token."
}
}
5 changes: 4 additions & 1 deletion artifacts/src/i18n/esignet-i18n-bundle/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@
"IDA-RST-005": "समय समाप्त अमान्य है",
"IDA-RST-006": "4XX - क्लाइंट त्रुटि हुई",
"IDA-RST-007": "5XX - सर्वर त्रुटि हुई",
"IDA-RST-008": "कनेक्शन का समय समाप्त"
"IDA-RST-008": "कनेक्शन का समय समाप्त",
"IDA-KBT-001": "बाध्य प्रमाण पत्र नहीं मिला",
"IDA-KBT-002": "टोकन (iat) पर जारी हस्ताक्षरित अनुमत समय सीमा में नहीं है",
"IDA-KBT-003": "टोकन की जाँच करने में त्रुटि"
}
}
5 changes: 4 additions & 1 deletion artifacts/src/i18n/esignet-i18n-bundle/kn.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@
"IDA-RST-005": "ಅವಧಿ ಮೀರಿದ್ದು ಅಮಾನ್ಯವಾಗಿದೆ",
"IDA-RST-006": "4XX - ಕ್ಲೈಂಟ್ ದೋಷ ಸಂಭವಿಸಿದೆ",
"IDA-RST-007": "5XX - ಸರ್ವರ್ ದೋಷ ಸಂಭವಿಸಿದೆ",
"IDA-RST-008": "ಸಂಪರ್ಕ ಸಮಯ ಮೀರಿದೆ"
"IDA-RST-008": "ಸಂಪರ್ಕ ಸಮಯ ಮೀರಿದೆ",
"IDA-KBT-001": "ಬೌಂಡ್ ಪ್ರಮಾಣಪತ್ರ ದೊರೆಯಲಿಲ್ಲ",
"IDA-KBT-002": "ಟೋಕನ್ (iat) ನಲ್ಲಿ ನೀಡಲಾದ ಸಹಿ ಮಾಡಿದ ಟೋಕನ್ ಅನುಮತಿಸಲಾದ ಸಮಯ ವ್ಯಾಪ್ತಿಯಲ್ಲಿಲ್ಲ.",
"IDA-KBT-003": "ಟೋಕನ್ ಪರಿಶೀಲಿಸುವಲ್ಲಿ ದೋಷ."
}
}
5 changes: 4 additions & 1 deletion artifacts/src/i18n/esignet-i18n-bundle/ta.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@
"IDA-RST-005": "நேரம் முடிந்தது தவறானது",
"IDA-RST-006": "4XX - கிளையண்ட் பிழை ஏற்பட்டது",
"IDA-RST-007": "5XX - சர்வர் பிழை ஏற்பட்டது",
"IDA-RST-008": "இணைப்பின் நேரம் முடிந்தது"
"IDA-RST-008": "இணைப்பின் நேரம் முடிந்தது",
"IDA-KBT-001": "வரையறுக்கப்பட்ட சான்றிதழ் காணப்படவில்லை",
"IDA-KBT-002": "(iat)யில் வழங்கப்பட்ட கையொப்பமிடப்பட்ட டோக்கன் அனுமதிக்கப்பட்ட கால வரம்பில் இல்லை.",
"IDA-KBT-003": "விசை இணைக்கப்பட்ட டோக்கனை சரிபார்ப்பதில் பிழை."
}
}