Skip to content

Commit

Permalink
fix(image): multiple dynamic scopes created when using 2 replicas (#2871
Browse files Browse the repository at this point in the history
)
  • Loading branch information
iromli committed Nov 7, 2022
1 parent 242e1a4 commit 5e0f1e6
Show file tree
Hide file tree
Showing 13 changed files with 639 additions and 21 deletions.
4 changes: 2 additions & 2 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.4-SNAPSHOT
ENV CN_BUILD_DATE='2022-11-01 11:06'
ENV CN_BUILD_DATE='2022-11-03 13:42'
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 @@ -114,7 +114,7 @@ RUN mkdir -p /opt/prometheus \
# jans-linux-setup sync
# =====================

ENV JANS_SOURCE_VERSION=c3e3f537e4e85c1ee718f7a7b79a203e7ed57e42
ENV JANS_SOURCE_VERSION=be03a3841541b852d7409e4a8bf190ea46256368
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
ARG JANS_CONFIG_API_DOCS=jans-config-api/docs

Expand Down
4 changes: 3 additions & 1 deletion docker-jans-config-api/scripts/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,9 @@ def generate_config_api_scopes():
writer.unparse(f"inum={scope['inum'][0]},ou=scopes,o=jans", scope)

def import_ldif_files(self) -> None:
self.generate_scopes_ldif()
# temporarily disable dynamic scopes creation
# see https://github.com/JanssenProject/jans/issues/2869
# self.generate_scopes_ldif()

files = ["config.ldif", "scopes.ldif", "clients.ldif"]
ldif_files = [f"/app/templates/jans-config-api/{file_}" for file_ in files]
Expand Down
4 changes: 3 additions & 1 deletion docker-jans-config-api/scripts/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ def invoke(self):
logger.info("Running upgrade process (if required)")
self.update_client_redirect_uri()
self.update_api_dynamic_config()
self.update_client_scopes()
# temporarily disable client updates
# see https://github.com/JanssenProject/jans/issues/2869
# self.update_client_scopes()

def update_client_redirect_uri(self):
kwargs = {}
Expand Down
42 changes: 42 additions & 0 deletions docker-jans-config-api/templates/jans-config-api/clients.ldif
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,49 @@ jansLogoutSessRequired: false
jansPersistClntAuthzs: true
jansRespTyp: code
jansRptAsJwt: false
jansScope: inum=1800.4F4C08,ou=scopes,o=jans
jansScope: inum=1800.61D3E9,ou=scopes,o=jans
jansScope: inum=1800.78D299,ou=scopes,o=jans
jansScope: inum=1800.C38990,ou=scopes,o=jans
jansScope: inum=1800.13AA0E,ou=scopes,o=jans
jansScope: inum=1800.A01874,ou=scopes,o=jans
jansScope: inum=1800.36FC16,ou=scopes,o=jans
jansScope: inum=1800.0D9CCC,ou=scopes,o=jans
jansScope: inum=1800.B8DE82,ou=scopes,o=jans
jansScope: inum=1800.42C38F,ou=scopes,o=jans
jansScope: inum=1800.10F720,ou=scopes,o=jans
jansScope: inum=1800.F4E351,ou=scopes,o=jans
jansScope: inum=1800.3263EF,ou=scopes,o=jans
jansScope: inum=1800.B0C433,ou=scopes,o=jans
jansScope: inum=1800.419DD5,ou=scopes,o=jans
jansScope: inum=1800.158007,ou=scopes,o=jans
jansScope: inum=1800.671341,ou=scopes,o=jans
jansScope: inum=1800.79932F,ou=scopes,o=jans
jansScope: inum=1800.45C56E,ou=scopes,o=jans
jansScope: inum=1800.F815D0,ou=scopes,o=jans
jansScope: inum=1800.72FC9F,ou=scopes,o=jans
jansScope: inum=1800.D2E431,ou=scopes,o=jans
jansScope: inum=1800.05CA71,ou=scopes,o=jans
jansScope: inum=1800.CAA614,ou=scopes,o=jans
jansScope: inum=1800.4B522D,ou=scopes,o=jans
jansScope: inum=1800.28FF8B,ou=scopes,o=jans
jansScope: inum=1800.07C227,ou=scopes,o=jans
jansScope: inum=1800.9D4EBE,ou=scopes,o=jans
jansScope: inum=1800.3E6BA7,ou=scopes,o=jans
jansScope: inum=1800.FE975D,ou=scopes,o=jans
jansScope: inum=1800.C0B661,ou=scopes,o=jans
jansScope: inum=1800.7FD3C9,ou=scopes,o=jans
jansScope: inum=1800.DCE0C3,ou=scopes,o=jans
jansScope: inum=1800.BDCE9B,ou=scopes,o=jans
jansScope: inum=1800.33641E,ou=scopes,o=jans
jansScope: inum=1800.B15085,ou=scopes,o=jans
jansScope: inum=1800.FB7583,ou=scopes,o=jans
jansScope: inum=1800.A524C2,ou=scopes,o=jans
jansScope: inum=1800.23C17E,ou=scopes,o=jans
jansScope: inum=1800.BC5317,ou=scopes,o=jans
jansScope: inum=C4F7,ou=scopes,o=jans
jansScope: inum=1200.2B7428,ou=scopes,o=jans
jansScope: inum=1200.0A0198,ou=scopes,o=jans
jansSubjectTyp: pairwise
jansTknEndpointAuthMethod: client_secret_basic
jansTrustedClnt: false
Expand Down
Loading

0 comments on commit 5e0f1e6

Please sign in to comment.