ci: run the Java integration test-suite on GitHub against AIO (jenkins offboarding D) by mo-auto · Pull Request #14225 · JanssenProject/jans (original) (raw)

added 2 commits

June 6, 2026 13:24

@mo-auto

…one image (offboarding D1)

Add CN_PERSISTENCE_LOAD_TEST_DATA (default false) so the Janssen integration-test dataset can be loaded into the SQL backend, enabling the test-suite to run against the all-in-one image without jenkins.jans.io.

The config-api test client already receives every scope on upgrade (update_test_client_scopes), so no config-api test data is loaded here.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…fboarding D2)

Add .github/workflows/test-integration.yml + scripts/render_test_profiles.py to run the HTTP integration test-suites against an all-in-one server with test data loaded, on a MySQL/PGSQL matrix - replacing the jenkins.jans.io / docker-jans-monolith runner.

Server-side persistence-coupled suites (jans-auth-server/server, jans-orm) and agama are a follow-up.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…l+vault+traefik)

The AIO requires consul + vault (pycloudlib defaults CN_CONFIG_ADAPTER=consul / CN_SECRET_ADAPTER=vault); the previous hand-rolled 'docker run' started neither, so the configurator hung and the AIO never became healthy (first run #27060489146).

Reuse the canonical automation/start_janssen_aio_demo.sh which brings up the full compose stack (consul + vault + traefik TLS + db + AIO). Bake the integration-test env (CN_PERSISTENCE_LOAD_TEST_DATA + CN_CONFIG_API_TEST_CLIENT_*) into a thin image layer tagged as the image the demo compose expects, so the script is used unmodified. Import the demo's generated CA cert into the JDK truststore; extract live secrets from the 'jans' container.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…er configurator

start_janssen_aio_demo.sh generates the TLS certs as mode-600 files owned by the host user; the AIO configurator runs as uid 1000 and got PermissionError reading the mounted ca.key, so configurator-load failed and the auth_jks_base64 secret was never created (AIO stayed unhealthy). Relax the cert perms and restart the AIO after the stack is up.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…data loader

pycloudlib's create_from_ldif only inserts plain entries, but the test data LDIFs also carry 'changetype: modify' records (flip jansDefScope on extra scopes, enable extra scripts, activate an attribute, add group members, add scope claims). Those records have no objectClass, so _data_from_ldif crashed with 'NoneType object is not subscriptable' (oc[-1] on None).

Split each LDIF into plain entries (-> create_from_ldif) and modify records, and apply the modifies via client.update with a DN-suffix->table map, inferring scalar/multivalued + boolean columns from the existing value. Comment-only/no-DN blocks are skipped.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…a reflect + resilience)

The modify applier crashed (AttributeError: NoneType has no attribute 'c') when client.get hit a table missing from the cached SQLAlchemy metadata. Force a fresh metadata reflection before applying modifies, skip a modify whose table still isn't reflected, wrap each modify so one failure can't abort the whole load, and initialise multivalued 'add' targets with the correct JSON shape when the column is empty.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…oad best-effort

Some test entries carry attributes (e.g. creationDate on jansFido2RegistrationEntry / jansCustomPerson) that are not columns of their SQL table, so pycloudlib's insert raised 'CompileError: Unconsumed column names'. Pass a transform_column_mapping callback to create_from_ldif that drops attributes without a matching reflected column. Also wrap the post-import config tweaks so a single failure can't crash-loop the loader and keep the AIO unhealthy.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

… failure

The AIO comes up (loader completes, fido2 deploys) but jans-auth isn't serving openid-configuration (404) and the tail-400 dump truncates the service logs. Capture supervisorctl program states + a targeted jans-auth/error grep so the jans-auth startup failure is diagnosable.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@moabu

@moabu @mo-auto

otp-java's Maven groupId is com.github.bastiaanjansen, but its Java package is com.bastiaanjansen.otp. The OTP migration used the groupId as the import package, so casa failed to compile ("package com.github.bastiaanjansen.otp does not exist"). Fix the imports in the casa HOTP/TOTP services and the two OTP person-auth scripts. The pom dependency groupId (com.github.bastiaanjansen:otp-java) is correct and unchanged.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

otp-java's HOTPGenerator.getURI takes the moving-factor counter first: getURI(int counter, String issuer, String account). Pass 0 (initial counter, matching the previous lochbridge default) in the casa HOTP service and the HOTP URI calls in both OTP scripts. TOTPGenerator's getURI(issuer, account) is correct and unchanged. Verified all other otp-java calls (Builder, generate, verify, HMACAlgorithm) against the v2.1.0 source.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com


Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com Co-authored-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

docker-jans-auth-server pulls casa-config + jans-fido2-client + jans-fido2-model + agama-inbound as custom libs from the release, but build-test only collected the first three, so agama-inbound-0.0.0-nightly.jar was 404 and the 'docker (auth-server)' image build failed (run 27098512184) - leaving a stale ghcr auth-server image (and breaking the AIO jans-auth).

agama-inbound is a jans-auth-server submodule (jans-auth-server/agama/inboundID, artifactId agama-inbound), installed to ~/.m2 during the auth-server deploy; add it to the release-asset collection alongside the other auth-server custom libs.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…ogress

Cut the health wait 1200s->600s so a stuck AIO fails fast, dump jans-auth/configurator log lines periodically during the wait, and enrich the failure dump (supervisorctl status + grepped service/error logs) so the reason jans-auth stays at 404 is visible without waiting/cancelling.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…ebKeys date

On AIO-health failure, dump the configurator auth-keys.json, the decoded auth_openid_key_base64 secret, and the jansConfWebKeys DB value, to pinpoint which stage turns the JWKS into a date string.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…tore corruption

The configurator's first run failed to read the demo's mode-600 TLS certs, and the restart workaround re-ran key generation against a half-initialised keystore -- writing a 'Keystore was tampered with' error string into jansConfWebKeys and breaking jans-auth and config-api WebKeysConfiguration parsing. Run the demo in the background and relax the cert perms as they appear so the configurator succeeds on its first run, no restart needed.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

… as root

The setup-java JDK's cacerts is not writable by the runner user (keytool failed with FileNotFoundException: .../cacerts Permission denied), so run the import via sudo using the explicit keytool path.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…e live FQDN

The build runs clean install over the full jans-auth-server/scim/config-api/fido2 reactors; -Dcfg= required a rendered profile for every filtering module (agama-engine has none -> 'Error loading property file .../agama/engine/profiles//config-agama-test.properties'). Compilation does not need the live FQDN, and every module ships a default profile, so build with -Dcfg=default and keep -Dcfg= for the test step (whose 4 legs are fully rendered).

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…run unit suites

Triage support: the failure log dump never ran (job only fails at the gate, so failure() was false), so dump jetty service logs (scim/config-api/auth/fido2) on always() to expose the 503/401 cause. Collect surefire reports workspace-wide (the jans-auth-client reports were not captured). Add a unit-suite step (jans-orm, jans-core).

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…ead of 503

jans-scim returns 503 (AuthorizationProcessingFilter.disabledApiResponse) on every CRUD call because jansScimEnabled is false: the persistence-loader defaults CN_SCIM_ENABLED=false and the workflow never set it (linux-setup always enables SCIM). Bake CN_SCIM_ENABLED=true into the AIO.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

…er calls work

The AIO demo pinned the FQDN to the host IP via the jans container's extra_hosts; with a loopback IP (CI) the in-container public URL had no :443 listener, so config-api's jans-auth introspection callback got 'Connection refused' and every config-api request returned 401. Alias the FQDN to the traefik service on the compose network (and drop the extra_hosts override) so https:// resolves to traefik's TLS entrypoint and routes back to the AIO.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

@mo-auto

Mirror the Jenkins full-build-with-tests model: instead of building with -DskipTests and running only 4 client legs, run 'mvn clean install' with tests ENABLED and -Dcfg= over every reactor (jans-orm, jans-core, jans-auth-server, jans-scim, jans-config-api, jans-fido2), so each module's unit AND integration suites execute against the live AIO in one pass. Render the agama-engine profile so that reactor compiles under -Dcfg, and gate the job on the collected testng failure count (failure.ignore lets all suites run first).

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

[coderabbitai[bot]](/apps/coderabbitai)

iromli

iromli

@mo-auto

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

[coderabbitai[bot]](/apps/coderabbitai)

iromli

iromli previously approved these changes Jun 12, 2026

@mo-auto

…lient_trusted

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

[coderabbitai[bot]](/apps/coderabbitai)

@mo-auto

Collect matching key IDs across all pages first, then delete, so deletions can't shift the page window mid-walk and skip a key.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

[coderabbitai[bot]](/apps/coderabbitai)

@moabu moabu deleted the ci/offboard-jenkins-phase-d-integration-tests branch

June 13, 2026 15:16

moabu pushed a commit that referenced this pull request

Jun 15, 2026

@mo-auto

The docker-jans-monolith image (all jans services in one container, for testing/dev) is superseded by the all-in-one (AIO) demo + the GitHub integration-test workflow (Phase D, #14225). Remove it and every reference:

Historical CHANGELOG entries are left intact.

Signed-off-by: moauto 54212639+mo-auto@users.noreply.github.com

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})