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

feat: add support for requestUriBlockList config #1572

Merged
merged 1 commit into from
Jun 16, 2022
Merged
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
11 changes: 6 additions & 5 deletions docker-jans-auth-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN /opt/jython/bin/pip uninstall -y pip
# ===========

ENV CN_VERSION=1.0.1-SNAPSHOT
ENV CN_BUILD_DATE='2022-06-06 08:14'
ENV CN_BUILD_DATE='2022-06-16 08:14'
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 @@ -90,14 +90,14 @@ RUN wget -q https://jenkins.gluu.org/maven/org/gluu/casa-config/${CASA_CONFIG_VE
# Casa external scripts
# =====================

ARG CASA_EXTRAS_VERSION=fe01bcb3d46311355b15a37b655253ca17997358
ARG FLEX_SOURCE_VERSION=fe01bcb3d46311355b15a37b655253ca17997358
ARG CASA_EXTRAS_DIR=casa/extras

RUN mkdir -p /opt/jans/python/libs
RUN git clone --filter blob:none --no-checkout https://github.com/GluuFederation/flex.git /tmp/flex \
&& cd /tmp/flex \
&& git sparse-checkout init --cone \
&& git checkout ${CASA_EXTRAS_VERSION} \
&& git checkout ${FLEX_SOURCE_VERSION} \
&& git sparse-checkout set ${CASA_EXTRAS_DIR} \
&& cd /opt/jans/python/libs \
&& cp /tmp/flex/${CASA_EXTRAS_DIR}/casa-external_* . \
Expand All @@ -111,14 +111,15 @@ RUN mkdir -p ${JETTY_BASE}/jans-auth/agama/fl \
${JETTY_BASE}/jans-auth/agama/ftl \
${JETTY_BASE}/jans-auth/agama/scripts

ARG JANS_AGAMA_VERSION=6b23bfe19ef960039f76df4de167c159312dd930
# janssenproject/jans SHA commit
ARG JANS_SOURCE_VERSION=0f1a2e6761c0522acdfdab3d69adac5c8062e780

# 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
RUN git clone --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_AGAMA_VERSION} \
&& git checkout ${JANS_SOURCE_VERSION} \
&& git sparse-checkout add agama/misc

RUN cp -R /tmp/jans/agama/misc/* ${JETTY_BASE}/jans-auth/agama/ \
Expand Down
7 changes: 4 additions & 3 deletions docker-jans-persistence-loader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ RUN python3 -m ensurepip \
# jans-linux-setup sync
# =====================

ENV JANS_LINUX_SETUP_VERSION=07f544ff00c6e8923b480da1bfb4ee7847933c60
# janssenproject/jans SHA commit
ENV JANS_SOURCE_VERSION=0f1a2e6761c0522acdfdab3d69adac5c8062e780
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup

# 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 jans-linux-setup code
RUN git clone --filter blob:none --no-checkout https://github.com/janssenproject/jans /tmp/jans \
&& cd /tmp/jans \
&& git sparse-checkout init --cone \
&& git checkout ${JANS_LINUX_SETUP_VERSION} \
&& git checkout ${JANS_SOURCE_VERSION} \
&& git sparse-checkout set ${JANS_SETUP_DIR}

RUN mkdir -p /app/static /app/static/couchbase /app/schema /app/openbanking/static /app/static/opendj
Expand Down Expand Up @@ -63,7 +64,7 @@ RUN cd /tmp/jans \
&& cp -R ${JANS_SETUP_DIR}/templates/jans-cli /app/templates/jans-cli

# Download jans-config-api-swagger for role_scope_mapping
RUN wget -q https://github.com/JanssenProject/jans/raw/${JANS_LINUX_SETUP_VERSION}/jans-config-api/docs/jans-config-api-swagger.yaml -P /app/static
RUN wget -q https://github.com/JanssenProject/jans/raw/${JANS_SOURCE_VERSION}/jans-config-api/docs/jans-config-api-swagger.yaml -P /app/static

# cleanup
RUN rm -rf /tmp/jans
Expand Down
7 changes: 7 additions & 0 deletions docker-jans-persistence-loader/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ def _transform_auth_dynamic_config(conf):
conf["httpLoggingExcludePaths"] = conf.pop("httpLoggingExludePaths", [])
should_update = True

if "requestUriBlockList" not in conf:
conf["requestUriBlockList"] = [
"localhost",
"127.0.0.1",
]
should_update = True

# return the conf and flag to determine whether it needs update or not
return conf, should_update

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@
"claimsParameterSupported":false,
"requestParameterSupported":true,
"requestUriParameterSupported":true,
"requestUriBlockList": [
"localhost",
"127.0.0.1"
],
"requireRequestUriRegistration":false,
"allowPostLogoutRedirectWithoutValidation":false,
"introspectionAccessTokenMustHaveUmaProtectionScope":false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
"claimsParameterSupported":true,
"requestParameterSupported":true,
"requestUriParameterSupported":true,
"requestUriBlockList": [
"localhost",
"127.0.0.1"
],
"requireRequestUriRegistration":false,
"allowPostLogoutRedirectWithoutValidation":false,
"introspectionAccessTokenMustHaveUmaProtectionScope":false,
Expand Down