Repository navigation
Fix host-mode harness gaps that block Keycloak 26.7 testing - #1042
mbunwe-victor wants to merge 6 commits into
Conversation
Signed-off-by: mbunwe-victor <mbunwevicki@gmail.com>
8ad204f to
176183e
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses reliability gaps in the oid4vci-deployment host-mode harness (host-started Keycloak with CLI running in the container) to enable a documented setup -d → config → test flow on Keycloak 26.7/main, and updates docs accordingly.
Changes:
- Reworks Keycloak detection and readiness checks by introducing HTTP reachability (
ensure_keycloak_reachable) and tightening PID matching for stop/start flows. - Improves 26.7 compatibility by updating feature flag composition and enhancing user/config/test harness behavior (including better credential-offer diagnostics and demo VC grants).
- Documents bash-only execution requirements and common host/container operational pitfalls (notably root-owned
target/after CLI container runs).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| oid4vci-deployment/src/utils/helper.sh | Tightens Keycloak PID detection, adds HTTP reachability checks, rebuilds feature flags per config load, improves kcadm/truststore resolution. |
| oid4vci-deployment/src/deployment/2.configure_user_4_account_client.sh | Adds demo VC grants for Francis and adjusts role assignment flow. |
| oid4vci-deployment/src/deployment/1.oid4vci_test_deployment.sh | Switches from PID-based “running” checks to HTTP reachability for host-mode compatibility. |
| oid4vci-deployment/src/credentials/request_credential.sh | Improves error reporting and adds a legacy fallback when requesting credential offers. |
| oid4vci-deployment/Readme.md | Documents bash requirement, host-mode flow, and root-owned target/ remediation guidance. |
| oid4vci-deployment/keycloak-ssi.sh | Passes HOST_WORK_DIR into compose CLI runs and uses reachability checks for config/test. |
| oid4vci-deployment/docker-compose.yml | Allows HOST_WORK_DIR to be injected (fallback to ${PWD}) for host-mode path resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: mbunwe-victor <mbunwevicki@gmail.com>
Signed-off-by: mbunwe-victor <mbunwevicki@gmail.com>
Signed-off-by: mbunwe-victor <mbunwevicki@gmail.com>
Signed-off-by: mbunwe-victor <mbunwevicki@gmail.com>
Signed-off-by: mbunwe-victor <mbunwevicki@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
oid4vci-deployment/keycloak-ssi.sh:155
run_in_cli_container_if_neededwrites an env file to$WORK_DIR/.envand deletes it before/after the compose run. If a user already has a real project.envin the repo root, this will silently overwrite/delete it. Use a dedicated temporary filename (e.g. viamktemp) and only clean up that generated file.
local env_file="$WORK_DIR/.env"
local config_files=("$WORK_DIR/config.yaml")
local override_file="$WORK_DIR/config.override.yaml"
[[ -f "$override_file" ]] && config_files+=("$override_file")
rm -f "$env_file"
Awambeng
left a comment
There was a problem hiding this comment.
@mbunwe-victor could you please close this based on the discussions we had?
|
Yes, sure, I will close it since @Vitalisn4 confirmed on his side that it was working |
Summary
Fixes #1038.
Host-mode testing (
keycloak-ssi setup -don the host, thenconfig/testvia the CLI container) was unreliable on Keycloak 26.7/main. This PR tightens the oid4vci-deployment harness so the documented path works without manual workarounds.Harness fixes
pgrep -f keycloakwith targeted PID detection (kc.sh,quarkus-run.jar,org.keycloak) and filter out harness scriptsensure_keycloak_reachable) forconfig/testinstead of local process checks, so the CLI container can talk to a host-started KeycloakKEYCLOAK_FEATURESon each config load to avoid duplicate feature flags when compose and CLI both load configHOST_WORK_DIRfromkeycloak-ssi.shinto compose; fail clearly when the CLI container cannot resolve host pathskcadmviaKEYCLOAK_INSTALL_DIR,HOST_WORK_DIR, orWORK_DIRbefore falling back to the composeappservice26.7 compatibility (needed for the smoke path)
enable_credential_offer_createtooid4vc-vci-rest-credential-offerrequest_credential.shDocs
export -f; do not source under zsh)target/after CLI container use and how to fix ownershipinstall→setup -d→config→test preauthTest plan
keycloak-ssi setup -don Keycloak 26.7.0 (host mode)keycloak-ssi configkeycloak-ssi test preauth IdentityCredentialkeycloak-ssi test authcode IdentityCredential