Skip to content

Commit f996ddd

Browse files
authored
chore(cloud-native): add admin-ui and cedarling integration in OCI image (#2429)
Signed-off-by: iromli <isman.firmansyah@gmail.com>
1 parent dc807c4 commit f996ddd

File tree

4 files changed

+40
-32
lines changed

4 files changed

+40
-32
lines changed

docker-admin-ui/Dockerfile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d
1+
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
22

33
# ======
44
# alpine
@@ -20,49 +20,48 @@ EXPOSE 8080
2020
# Assets sync
2121
# ===========
2222

23-
ENV JANS_SOURCE_VERSION=408db95b458691c2b307b51fe180f9cc61b4eb95
23+
RUN mkdir -p /app/static/rdbm /app/schema /app/templates/admin-ui
2424

25+
ENV JANS_SOURCE_VERSION=04d297c046dd9d8ef54c0544e6187153b7ed87cf
2526
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
2627

2728
# note that as we're pulling from a monorepo (with multiple project in it)
2829
# we are using partial-clone and sparse-checkout to get the assets
2930
ARG GIT_CLONE_DEPTH=100
30-
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
31-
&& cd /tmp/jans \
31+
WORKDIR /tmp/jans
32+
33+
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/janssenproject/jans . \
3234
&& git sparse-checkout init --cone \
33-
&& git checkout ${JANS_SOURCE_VERSION} \
3435
&& git sparse-checkout add ${JANS_SETUP_DIR} \
35-
&& git sparse-checkout add jans-pycloudlib
36-
37-
RUN mkdir -p /app/static/rdbm /app/schema
38-
39-
# sync static files from linux-setup
40-
RUN cd /tmp/jans \
36+
&& git sparse-checkout add jans-pycloudlib \
37+
&& git checkout ${JANS_SOURCE_VERSION} \
4138
&& cp -R ${JANS_SETUP_DIR}/static/rdbm/sql_data_types.json /app/static/rdbm/ \
4239
&& cp -R ${JANS_SETUP_DIR}/static/rdbm/ldap_sql_data_type_mapping.json /app/static/rdbm/ \
4340
&& cp -R ${JANS_SETUP_DIR}/static/rdbm/opendj_attributes_syntax.json /app/static/rdbm/ \
4441
&& cp ${JANS_SETUP_DIR}/schema/jans_schema.json /app/schema/ \
4542
&& cp ${JANS_SETUP_DIR}/schema/custom_schema.json /app/schema/ \
4643
&& cp ${JANS_SETUP_DIR}/schema/opendj_types.json /app/schema/
4744

48-
ENV FLEX_SOURCE_VERSION=8f89839be812eb535929efd4088c8c7825103fca
45+
WORKDIR /tmp/flex
4946

50-
RUN mkdir -p /app/templates/admin-ui
47+
ENV FLEX_SOURCE_VERSION=dc807c4e8678477258e730206ab89da412b13594
48+
ARG FLEX_SETUP_DIR=flex-linux-setup/flex_linux_setup
5149

52-
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/GluuFederation/flex /tmp/flex \
53-
&& cd /tmp/flex \
50+
RUN git clone --depth ${GIT_CLONE_DEPTH} --filter blob:none --no-checkout https://github.com/GluuFederation/flex . \
5451
&& git sparse-checkout init --cone \
5552
&& git checkout ${FLEX_SOURCE_VERSION} \
5653
&& git sparse-checkout add admin-ui \
57-
&& git sparse-checkout add flex-linux-setup/flex_linux_setup/templates \
58-
&& cp flex-linux-setup/flex_linux_setup/templates/aui_webhook.ldif /app/templates/admin-ui
54+
&& git sparse-checkout add ${FLEX_SETUP_DIR}/templates \
55+
&& cp ${FLEX_SETUP_DIR}/templates/*.ldif /app/templates/admin-ui
56+
57+
WORKDIR /
5958

6059
# ========
6160
# Admin UI
6261
# ========
6362

6463
ENV ADMIN_UI_VERSION=main
65-
ENV GLUU_BUILD_DATE='2024-12-30 17:20'
64+
ENV GLUU_BUILD_DATE='2025-11-06 18:51'
6665

6766
RUN wget -q https://jenkins.gluu.org/npm/admin_ui/${ADMIN_UI_VERSION}/built/admin-ui-${ADMIN_UI_VERSION}-built.tar.gz -O /tmp/admin-ui.tar.gz \
6867
&& mkdir -p /opt/flex/admin-ui \

docker-admin-ui/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# pinned to py3-grpcio version to avoid failure on native extension build
2-
grpcio==1.62.1
2+
grpcio==1.72.0
33
/tmp/jans/jans-pycloudlib

docker-admin-ui/scripts/bootstrap.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def ctx(self):
138138

139139
@cached_property
140140
def ldif_files(self):
141-
filenames = ["clients.ldif", "aui_webhook.ldif"]
141+
filenames = ["clients.ldif", "aui_webhook.ldif", "adminUIResourceScopesMapping.ldif"]
142142
return [f"/app/templates/admin-ui/{filename}" for filename in filenames]
143143

144144
def import_ldif_files(self):
@@ -242,18 +242,24 @@ def resolve_conf_app(old_conf, new_conf):
242242
should_update = True
243243

244244
# add missing uiConfig
245-
if "uiConfig" not in old_conf:
246-
old_conf["uiConfig"] = {"sessionTimeoutInMins": 30}
247-
should_update = True
248-
249-
# add missing config under uiConfig
250-
if "allowSmtpKeystoreEdit" not in old_conf["uiConfig"]:
251-
old_conf["uiConfig"]["allowSmtpKeystoreEdit"] = True
252-
should_update = True
245+
ui_conf = old_conf.get("uiConfig", {})
246+
247+
# add top-level config under uiConfig (if missing)
248+
ui_conf_attrs = {
249+
"sessionTimeoutInMins": 30,
250+
"allowSmtpKeystoreEdit": True,
251+
"cedarlingLogType": "off",
252+
"auiPolicyStoreUrl": "",
253+
"auiDefaultPolicyStorePath": "./custom/config/adminUI/policy-store.json",
254+
"cedarlingPolicyStoreRetrievalPoint": "default"
255+
}
256+
for k, v in ui_conf_attrs.items():
257+
if k not in ui_conf:
258+
ui_conf[k] = v
259+
should_update = True
253260

254-
if "cedarlingLogType" not in old_conf["uiConfig"]:
255-
old_conf["uiConfig"]["cedarlingLogType"] = "off"
256-
should_update = True
261+
# update/add uiConfig
262+
old_conf["uiConfig"] = ui_conf
257263

258264
# finalized status and conf
259265
return should_update, old_conf

docker-admin-ui/templates/admin-ui/auiConfiguration.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
"uiConfig": {
3636
"sessionTimeoutInMins": 30,
3737
"allowSmtpKeystoreEdit": true,
38-
"cedarlingLogType": "off"
38+
"cedarlingLogType": "off",
39+
"auiPolicyStoreUrl": "",
40+
"auiDefaultPolicyStorePath": "./custom/config/adminUI/policy-store.json",
41+
"cedarlingPolicyStoreRetrievalPoint": "default"
3942
},
4043
"licenseConfig": {
4144
"ssa": "%(ssa)s",

0 commit comments

Comments
 (0)