Skip to content

Commit

Permalink
chore(docker-jans): sync schema, templates, and config from upstream (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
iromli committed Jan 25, 2023
1 parent 69837cd commit 5ba6c35
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 29 deletions.
8 changes: 4 additions & 4 deletions docker-jans-auth-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN /opt/jython/bin/pip uninstall -y pip
# ===========

ENV CN_VERSION=1.0.7-SNAPSHOT
ENV CN_BUILD_DATE='2023-01-09 12:19'
ENV CN_BUILD_DATE='2023-01-24 11:16'
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-auth-server/${CN_VERSION}/jans-auth-server-${CN_VERSION}.war

# Install Jans Auth
Expand Down Expand Up @@ -84,12 +84,12 @@ RUN wget -q https://repo1.maven.org/maven2/org/jsmpp/jsmpp/${JSMPP_VERSION}/jsmp

# This will later be refactored and moved to be pulled from persitence or a central bucket
ARG CASA_CONFIG_VERSION=5.0.0-SNAPSHOT
ARG CASA_CONFIG_BUILD_DATE="2022-05-26 13:56"
ARG CASA_CONFIG_BUILD_DATE="2022-12-27 19:26"
RUN wget -q https://jenkins.gluu.org/maven/org/gluu/casa-config/${CASA_CONFIG_VERSION}/casa-config-${CASA_CONFIG_VERSION}.jar -P /usr/share/java/

# A workaround for Fido2 integration
ARG FIDO2_CLIENT_VERSION=1.0.7-SNAPSHOT
ARG FIDO2_CLIENT_BUILD_DATE="2022-12-27 10:01"
ARG FIDO2_CLIENT_BUILD_DATE="2023-01-24 08:15"
RUN wget -q https://jenkins.jans.io/maven/io/jans/jans-fido2-client/${FIDO2_CLIENT_VERSION}/jans-fido2-client-${FIDO2_CLIENT_VERSION}.jar -P /usr/share/java/

# =====================
Expand Down Expand Up @@ -118,7 +118,7 @@ RUN mkdir -p ${JETTY_BASE}/jans-auth/agama/fl \
${JETTY_BASE}/jans-auth/agama/scripts

# janssenproject/jans SHA commit
ENV JANS_SOURCE_VERSION=a970d88d81f920973f3ba812db97448f135090a9
ENV JANS_SOURCE_VERSION=cee252522061b43065eddbdc70d51bda9e2e85d7

# note that as we're pulling from a monorepo (with multiple project in it)
# we are using partial-clone and sparse-checkout to get the agama code
Expand Down
12 changes: 6 additions & 6 deletions docker-jans-config-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RUN wget -q https://maven.jans.io/maven/io/jans/jython-installer/${JYTHON_VERSIO
# ==========

ENV CN_VERSION=1.0.7-SNAPSHOT
ENV CN_BUILD_DATE='2023-01-09 12:22'
ENV CN_BUILD_DATE='2023-01-24 10:04'
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api-server/${CN_VERSION}/jans-config-api-server-${CN_VERSION}.war

# Install Jans Config API
Expand Down Expand Up @@ -74,19 +74,19 @@ RUN wget -q https://github.com/GluuFederation/gluu-snap/raw/${PYFACTER_VERSION}/

RUN mkdir -p /usr/share/java

ENV SCIM_PLUGIN_BUILD_DATE='2023-01-09 12:23'
ENV SCIM_PLUGIN_BUILD_DATE='2023-01-24 10:04'
ENV SCIM_PLUGIN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api/plugins/scim-plugin/${CN_VERSION}/scim-plugin-${CN_VERSION}-distribution.jar
RUN wget -q ${SCIM_PLUGIN_SOURCE_URL} -O /usr/share/java/scim-plugin.jar

ENV ADMIN_UI_PLUGIN_BUILD_DATE='2023-01-09 12:22'
ENV ADMIN_UI_PLUGIN_BUILD_DATE='2023-01-24 10:04'
ENV ADMIN_UI_PLUGIN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api/plugins/admin-ui-plugin/${CN_VERSION}/admin-ui-plugin-${CN_VERSION}-distribution.jar
RUN wget -q ${ADMIN_UI_PLUGIN_SOURCE_URL} -O /usr/share/java/admin-ui-plugin.jar

ENV FIDO2_PLUGIN_BUILD_DATE='2023-01-09 12:23'
ENV FIDO2_PLUGIN_BUILD_DATE='2023-01-24 10:04'
ENV FIDO2_PLUGIN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api/plugins/fido2-plugin/${CN_VERSION}/fido2-plugin-${CN_VERSION}-distribution.jar
RUN wget -q ${FIDO2_PLUGIN_SOURCE_URL} -O /usr/share/java/fido2-plugin.jar

ENV USER_MGT_PLUGIN_BUILD_DATE='2023-01-09 12:23'
ENV USER_MGT_PLUGIN_BUILD_DATE='2023-01-24 10:04'
ENV USER_MGT_PLUGIN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-config-api/plugins/user-mgt-plugin/${CN_VERSION}/user-mgt-plugin-${CN_VERSION}-distribution.jar
RUN wget -q ${USER_MGT_PLUGIN_SOURCE_URL} -O /usr/share/java/user-mgt-plugin.jar

Expand All @@ -110,7 +110,7 @@ COPY conf/prometheus-config.yaml /opt/prometheus/
# jans-linux-setup sync
# =====================

ENV JANS_SOURCE_VERSION=a970d88d81f920973f3ba812db97448f135090a9
ENV JANS_SOURCE_VERSION=cee252522061b43065eddbdc70d51bda9e2e85d7
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
ARG JANS_CONFIG_API_RESOURCES=jans-config-api/server/src/main/resources

Expand Down
34 changes: 34 additions & 0 deletions docker-jans-config-api/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,40 @@ def _transform_api_dynamic_config(conf):
"headerAttributes": ["User-inum"],
}
should_update = True

if "dataFormatConversionConf" not in conf:
conf["dataFormatConversionConf"] = {
"enabled": True,
"ignoreHttpMethod": [
"@jakarta.ws.rs.GET()",
],
}
should_update = True

if "plugins" not in conf:
conf["plugins"] = [
{
"name": "admin",
"description": "admin-ui plugin",
"className": "io.jans.ca.plugin.adminui.rest.ApiApplication",
},
{
"name": "fido2",
"description": "fido2 plugin",
"className": "io.jans.configapi.plugin.fido2.rest.ApiApplication",
},
{
"name": "scim",
"description": "scim plugin",
"className": "io.jans.configapi.plugin.scim.rest.ApiApplication",
},
{
"name": "user-management",
"description": "user-management plugin",
"className": "io.jans.configapi.plugin.mgt.rest.ApiApplication",
},
]
should_update = True
return conf, should_update


Expand Down
4 changes: 2 additions & 2 deletions docker-jans-fido2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ EXPOSE 8080
# =====

ENV CN_VERSION=1.0.7-SNAPSHOT
ENV CN_BUILD_DATE='2023-01-09 12:20'
ENV CN_BUILD_DATE='2023-01-24 08:16'
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-fido2-server/${CN_VERSION}/jans-fido2-server-${CN_VERSION}.war

# Install FIDO2
Expand All @@ -54,7 +54,7 @@ RUN mkdir -p ${JETTY_BASE}/jans-fido2/webapps \
# jans-linux-setup sync
# =====================

ENV JANS_SOURCE_VERSION=a970d88d81f920973f3ba812db97448f135090a9
ENV JANS_SOURCE_VERSION=cee252522061b43065eddbdc70d51bda9e2e85d7
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# note that as we're pulling from a monorepo (with multiple project in it)
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-monolith/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EXPOSE 443 8080 1636
# jans-linux-setup
# =====================

ENV JANS_SOURCE_VERSION=a970d88d81f920973f3ba812db97448f135090a9
ENV JANS_SOURCE_VERSION=cee252522061b43065eddbdc70d51bda9e2e85d7

# cleanup
RUN rm -rf /tmp/jans
Expand Down
2 changes: 1 addition & 1 deletion docker-jans-persistence-loader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN python3 -m ensurepip \
# =====================

# janssenproject/jans SHA commit
ENV JANS_SOURCE_VERSION=b331ef32b49c870e0a972fc0463e954939317f88
ENV JANS_SOURCE_VERSION=cee252522061b43065eddbdc70d51bda9e2e85d7
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
ARG JANS_SCRIPT_CATALOG_DIR=docs/script-catalog
ARG JANS_CONFIG_API_RESOURCES=jans-config-api/server/src/main/resources
Expand Down
11 changes: 6 additions & 5 deletions docker-jans-persistence-loader/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ def _transform_auth_dynamic_config(conf):
conf["blockWebviewAuthorizationEnabled"] = False
should_update = True

if "userInfoConfiguration" not in conf:
conf["userInfoConfiguration"] = {
"dateFormatterPattern": {
"birthdate": "yyyy-MM-dd",
},
if "dateFormatterPatterns" not in conf:
# remove old config
conf.pop("userInfoConfiguration", None)
conf["dateFormatterPatterns"] = {
"birthdate": "yyyy-MM-dd",
}
should_update = True

# specific config per distribution
if distribution == "openbanking":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,7 @@
}
},
"blockWebviewAuthorizationEnabled": false,
"userInfoConfiguration": {
"dateFormatterPattern": {
"birthdate": "yyyy-MM-dd"
}
"dateFormatterPatterns": {
"birthdate": "yyyy-MM-dd"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,7 @@
"redirectUrisRegexEnabled": false,
"useHighestLevelScriptIfAcrScriptNotFound": true,
"blockWebviewAuthorizationEnabled": false,
"userInfoConfiguration": {
"dateFormatterPattern": {
"birthdate": "yyyy-MM-dd"
}
"dateFormatterPatterns": {
"birthdate": "yyyy-MM-dd"
}
}
4 changes: 2 additions & 2 deletions docker-jans-scim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN wget -q https://maven.jans.io/maven/io/jans/jython-installer/${JYTHON_VERSIO
# ====

ENV CN_VERSION=1.0.7-SNAPSHOT
ENV CN_BUILD_DATE='2023-01-09 12:21'
ENV CN_BUILD_DATE='2023-01-24 10:01'
ENV CN_SOURCE_URL=https://jenkins.jans.io/maven/io/jans/jans-scim-server/${CN_VERSION}/jans-scim-server-${CN_VERSION}.war

# Install SCIM
Expand Down Expand Up @@ -80,7 +80,7 @@ COPY conf/prometheus-config.yaml /opt/prometheus/
# jans-linux-setup sync
# =====================

ENV JANS_SOURCE_VERSION=a970d88d81f920973f3ba812db97448f135090a9
ENV JANS_SOURCE_VERSION=cee252522061b43065eddbdc70d51bda9e2e85d7
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
ARG JANS_SCIM_RESOURCE_DIR=jans-scim/server/src/main/resources

Expand Down

0 comments on commit 5ba6c35

Please sign in to comment.