diff --git a/.dockerignore b/.dockerignore index 2f6d4bf49..d9c7059f1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ -src/node_modules src/.npm src/_tmp src/.cache @@ -6,4 +5,6 @@ src/.config src/.nyc_output src/dist **/.next -_data \ No newline at end of file +_data +**/node_modules +__coverage__ \ No newline at end of file diff --git a/.github/workflows/aps-cypress-e2e.yaml b/.github/workflows/aps-cypress-e2e.yaml index aaef58651..6f772d7f7 100644 --- a/.github/workflows/aps-cypress-e2e.yaml +++ b/.github/workflows/aps-cypress-e2e.yaml @@ -21,7 +21,7 @@ jobs: steps: - name: Build GWA API Image run: | - git clone https://github.com/bcgov/gwa-api.git + git clone -b feature/kc-upgrade https://github.com/bcgov/gwa-api.git cd gwa-api/microservices/gatewayApi docker build -t gwa-api:e2e . @@ -54,6 +54,7 @@ jobs: break else echo "Waiting for Cypress to Complete E2E Tests....." + docker compose logs cypress -n 5 sleep 1m fi done diff --git a/Dockerfile b/Dockerfile index 35c3ec152..c87775805 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -#FROM node:lts-alpine3.17 -FROM node:16.14.2-alpine3.15 +FROM node:20-alpine3.19 ARG APP_VERSION ENV NEXT_PUBLIC_APP_VERSION=${APP_VERSION} @@ -11,6 +10,9 @@ RUN apk add curl jq WORKDIR /app +# Workaround due to an ESM error +COPY src/keycloak-admin-client ./keycloak-admin-client + COPY src/*.json ./ RUN npm install --legacy-peer-deps diff --git a/docker-compose.yml b/docker-compose.yml index f78364ed4..908b5ef90 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,4 @@ +name: e2e version: '3.8' x-common-variables: &common-variables @@ -8,39 +9,56 @@ x-common-variables: &common-variables KONG_PG_PASSWORD: konguser services: - keycloak: - image: quay.io/keycloak/keycloak:15.1.1 - container_name: keycloak - hostname: keycloak + keycloak-nodes: + image: keycloak:latest + deploy: + replicas: 2 + endpoint_mode: dnsrr + build: + context: . + dockerfile: ./local/keycloak/Dockerfile depends_on: - kong-db command: [ - '-b', - '0.0.0.0', - '-Djboss.socket.binding.port-offset=1001', - '-Dkeycloak.migration.action=import', - '-Dkeycloak.migration.provider=singleFile', - '-Dkeycloak.migration.file=/tmp/realm-config/master-realm.json', - '-Dkeycloak.migration.strategy=OVERWRITE_EXISTING', - '-Dkeycloak.profile.feature.upload_scripts=enabled', + 'start', + '--optimized', + '--cache=ispn', + '--hostname', + 'http://keycloak.localtest.me:9081/auth', + '--db-url', + 'jdbc:postgresql://kong-db/keycloak', + '--db-username', + 'keycloakuser', + '--db-password', + 'keycloakuser', + '--http-enabled', + 'true', + '--http-port', + '9081', + '--import-realm', ] + volumes: + - ./local/keycloak/master-realm.json:/opt/keycloak/data/import/master-realm.json + networks: + aps-net: {} + + keycloak: + image: nginx:latest ports: - - 9081:9081/tcp - environment: - #KEYCLOAK_USER: local - #KEYCLOAK_PASSWORD: local - DB_VENDOR: POSTGRES - DB_SCHEMA: public - DB_ADDR: kong-db:5432 - DB_USER: keycloakuser - DB_PASSWORD: keycloakuser + - '9081:9081' + depends_on: + - keycloak-nodes volumes: - - ./local/keycloak/master-realm.json:/tmp/realm-config/master-realm.json + - ./local/keycloak/nginx-lb.conf:/etc/nginx/conf.d/default.conf networks: aps-net: aliases: - keycloak.localtest.me + deploy: + restart_policy: + condition: any + oauth2-proxy: image: quay.io/oauth2-proxy/oauth2-proxy:v7.2.0 container_name: oauth2-proxy diff --git a/e2e/entrypoint.sh b/e2e/entrypoint.sh index fec3725b3..e7446e482 100755 --- a/e2e/entrypoint.sh +++ b/e2e/entrypoint.sh @@ -3,7 +3,7 @@ cd /tmp while true; do - keycloakstatus=$(curl -o /dev/null -Isw '%{http_code}\n' http://keycloak.localtest.me:9081/auth/realms/master) + keycloakstatus=$(curl -o /dev/null -sw '%{http_code}\n' http://keycloak.localtest.me:9081/auth/realms/master) echo "$keycloakstatus" if [[ "$keycloakstatus" == "200" ]]; then echo "Keycloak is up" diff --git a/local/db/database-init.sql b/local/db/database-init.sql index 9b0323784..2adf864d2 100644 --- a/local/db/database-init.sql +++ b/local/db/database-init.sql @@ -1,11 +1,8 @@ CREATE ROLE keystonejsuser WITH LOGIN PASSWORD 'keystonejsuser'; - CREATE DATABASE keystonejs OWNER keystonejsuser; CREATE ROLE konguser WITH LOGIN PASSWORD 'konguser'; - CREATE DATABASE kong OWNER konguser; CREATE ROLE keycloakuser WITH LOGIN PASSWORD 'keycloakuser'; - CREATE DATABASE keycloak OWNER keycloakuser; \ No newline at end of file diff --git a/local/feeder-init/init.sh b/local/feeder-init/init.sh index 513462f42..8e8e9beee 100755 --- a/local/feeder-init/init.sh +++ b/local/feeder-init/init.sh @@ -3,7 +3,7 @@ apk add --no-cache curl cd /tmp while true; do - keycloakstatus=$(curl -o /dev/null -Isw '%{http_code}\n' http://keycloak.localtest.me:9081/auth/realms/master) + keycloakstatus=$(curl -o /dev/null -sw '%{http_code}\n' http://keycloak.localtest.me:9081/auth/realms/master) echo "$keycloakstatus" if [[ "$keycloakstatus" == "200" ]]; then echo "Keycloak is up" diff --git a/local/gwa-api/.env.local b/local/gwa-api/.env.local index 7cf8877d2..691e3e390 100644 --- a/local/gwa-api/.env.local +++ b/local/gwa-api/.env.local @@ -21,4 +21,5 @@ PORTAL_ACTIVITY_TOKEN= HOST_TRANSFORM_ENABLED=false HOST_TRANSFORM_BASE_URL= PLUGINS_RATELIMITING_REDIS_PASSWORD=s3cr3t -LOCAL_ENVIRONMENT=True \ No newline at end of file +LOCAL_ENVIRONMENT=True +DATA_PLANES_CONFIG_PATH=/tmp/gwa/data_planes_config.json \ No newline at end of file diff --git a/local/gwa-api/data_planes_config.json b/local/gwa-api/data_planes_config.json new file mode 100644 index 000000000..749958b46 --- /dev/null +++ b/local/gwa-api/data_planes_config.json @@ -0,0 +1,9 @@ +{ + "data_planes": { + "local.dataplane": { + "kube-api": "http://kubenull", + "kube-ns": "local-cluster", + "validate-upstreams": false + } + } +} \ No newline at end of file diff --git a/local/gwa-api/entrypoint.sh b/local/gwa-api/entrypoint.sh index e6b975ef8..53ae73d55 100755 --- a/local/gwa-api/entrypoint.sh +++ b/local/gwa-api/entrypoint.sh @@ -55,7 +55,7 @@ kong-addr: $KONG_ADMIN_URL EOF while true; do - keycloakstatus=$(curl -o /dev/null -Isw '%{http_code}\n' http://keycloak.localtest.me:9081/auth/realms/master) + keycloakstatus=$(curl -o /dev/null -sw '%{http_code}\n' http://keycloak.localtest.me:9081/auth/realms/master) echo "$keycloakstatus" if [[ "$keycloakstatus" == "200" ]]; then echo "Keycloak is up" diff --git a/local/keycloak/Dockerfile b/local/keycloak/Dockerfile new file mode 100644 index 000000000..93e4239e9 --- /dev/null +++ b/local/keycloak/Dockerfile @@ -0,0 +1,10 @@ +FROM quay.io/keycloak/keycloak:nightly as builder + +ENV KC_DB=postgres +RUN /opt/keycloak/bin/kc.sh build --http-relative-path=/auth + +FROM quay.io/keycloak/keycloak:nightly +COPY --from=builder /opt/keycloak/ /opt/keycloak/ +WORKDIR /opt/keycloak +ENTRYPOINT ["/opt/keycloak/bin/kc.sh"] +CMD ["start", "--optimized", "--hostname", "http://localhost:8080", "--http-enabled", "true"] \ No newline at end of file diff --git a/local/keycloak/master-realm.json b/local/keycloak/master-realm.json index 338da6ef2..5e92e2685 100644 --- a/local/keycloak/master-realm.json +++ b/local/keycloak/master-realm.json @@ -112,7 +112,9 @@ "description": "${role_admin}", "composite": true, "composites": { - "realm": ["create-realm"], + "realm": [ + "create-realm" + ], "client": { "aps-v2-realm": [ "query-realms", @@ -354,7 +356,10 @@ "composite": true, "composites": { "client": { - "aps-v2-realm": ["query-groups", "query-users"] + "aps-v2-realm": [ + "query-groups", + "query-users" + ] } }, "clientRole": true, @@ -377,7 +382,9 @@ "composite": true, "composites": { "client": { - "aps-v2-realm": ["query-clients"] + "aps-v2-realm": [ + "query-clients" + ] } }, "clientRole": true, @@ -490,7 +497,10 @@ "composite": true, "composites": { "client": { - "master-realm": ["query-users", "query-groups"] + "master-realm": [ + "query-users", + "query-groups" + ] } }, "clientRole": true, @@ -558,7 +568,9 @@ "composite": true, "composites": { "client": { - "master-realm": ["query-clients"] + "master-realm": [ + "query-clients" + ] } }, "clientRole": true, @@ -628,7 +640,9 @@ "composite": true, "composites": { "client": { - "account": ["manage-account-links"] + "account": [ + "manage-account-links" + ] } }, "clientRole": true, @@ -651,7 +665,9 @@ "composite": true, "composites": { "client": { - "account": ["view-consent"] + "account": [ + "view-consent" + ] } }, "clientRole": true, @@ -694,9 +710,15 @@ "name": "platform", "path": "/ns/platform", "attributes": { - "org-unit": ["planning-and-innovation-division"], - "org": ["ministry-of-health"], - "perm-protected-ns": ["allow"] + "org-unit": [ + "planning-and-innovation-division" + ], + "org": [ + "ministry-of-health" + ], + "perm-protected-ns": [ + "allow" + ] }, "realmRoles": [], "clientRoles": {}, @@ -762,17 +784,27 @@ ] } ], - "defaultRoles": ["uma_authorization", "offline_access"], - "requiredCredentials": ["password"], + "defaultRoles": [ + "uma_authorization", + "offline_access" + ], + "requiredCredentials": [ + "password" + ], "otpPolicyType": "totp", "otpPolicyAlgorithm": "HmacSHA1", "otpPolicyInitialCounter": 0, "otpPolicyDigits": 6, "otpPolicyLookAheadWindow": 1, "otpPolicyPeriod": 30, - "otpSupportedApplications": ["FreeOTP", "Google Authenticator"], + "otpSupportedApplications": [ + "FreeOTP", + "Google Authenticator" + ], "webAuthnPolicyRpEntityName": "keycloak", - "webAuthnPolicySignatureAlgorithms": ["ES256"], + "webAuthnPolicySignatureAlgorithms": [ + "ES256" + ], "webAuthnPolicyRpId": "", "webAuthnPolicyAttestationConveyancePreference": "not specified", "webAuthnPolicyAuthenticatorAttachment": "not specified", @@ -782,7 +814,9 @@ "webAuthnPolicyAvoidSameAuthenticatorRegister": false, "webAuthnPolicyAcceptableAaguids": [], "webAuthnPolicyPasswordlessRpEntityName": "keycloak", - "webAuthnPolicyPasswordlessSignatureAlgorithms": ["ES256"], + "webAuthnPolicyPasswordlessSignatureAlgorithms": [ + "ES256" + ], "webAuthnPolicyPasswordlessRpId": "", "webAuthnPolicyPasswordlessAttestationConveyancePreference": "not specified", "webAuthnPolicyPasswordlessAuthenticatorAttachment": "not specified", @@ -803,10 +837,18 @@ "lastName": "userL", "email": "olduser@testmail.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A60701"], - "identity_provider": ["idir"], - "display_name": ["oldF userL"], - "provider_username": ["olduser"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A60701" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "oldF userL" + ], + "provider_username": [ + "olduser" + ] }, "credentials": [ { @@ -826,7 +868,10 @@ "api-owner" ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -842,10 +887,18 @@ "lastName": "Summers", "email": "awsummers@gmail.com", "attributes": { - "provider_user_guid": ["110469E037C84A7XXXXAB15204XX0701"], - "identity_provider": ["idir"], - "display_name": ["awesome summers"], - "provider_username": ["awsummers"] + "provider_user_guid": [ + "110469E037C84A7XXXXAB15204XX0701" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "awesome summers" + ], + "provider_username": [ + "awsummers" + ] }, "credentials": [ { @@ -858,9 +911,16 @@ ], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access", "api-owner"], + "realmRoles": [ + "uma_authorization", + "offline_access", + "api-owner" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -876,10 +936,18 @@ "lastName": "Andersson", "email": "benny@test.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A607C5"], - "identity_provider": ["idir"], - "display_name": ["benny@idir"], - "provider_username": ["benny"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A607C5" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "benny@idir" + ], + "provider_username": [ + "benny" + ] }, "credentials": [ { @@ -892,12 +960,20 @@ ], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, - "groups": ["/organization-admin/ca.bc.gov"] + "groups": [ + "/organization-admin/ca.bc.gov" + ] }, { "id": "f6296cb0-a7c4-45fc-88ff-c1da793ff981", @@ -920,9 +996,15 @@ ], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -938,10 +1020,18 @@ "lastName": "Smith", "email": "janis@testmail.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A607C5"], - "identity_provider": ["idir"], - "display_name": ["Janis@idir"], - "provider_username": ["janis"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A607C5" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "Janis@idir" + ], + "provider_username": [ + "janis" + ] }, "credentials": [ { @@ -961,7 +1051,10 @@ "api-owner" ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -977,10 +1070,18 @@ "lastName": "Smith", "email": "janis@testmail.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A607C6"], - "identity_provider": ["github"], - "display_name": ["Janis@github"], - "provider_username": ["janis"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A607C6" + ], + "identity_provider": [ + "github" + ], + "display_name": [ + "Janis@github" + ], + "provider_username": [ + "janis" + ] }, "credentials": [ { @@ -1000,7 +1101,10 @@ "api-owner" ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1033,7 +1137,10 @@ "admin" ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1049,10 +1156,18 @@ "lastName": "Mark L", "email": "mark@gmail.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A607C5"], - "identity_provider": ["idir"], - "display_name": ["mark@idir"], - "provider_username": ["mark"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A607C5" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "mark@idir" + ], + "provider_username": [ + "mark" + ] }, "credentials": [ { @@ -1072,7 +1187,10 @@ "admin" ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1088,10 +1206,18 @@ "lastName": "userL", "email": "olduser@testmail.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A60701"], - "identity_provider": ["idir"], - "display_name": ["oldF userL"], - "provider_username": ["olduser@idir"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A60701" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "oldF userL" + ], + "provider_username": [ + "olduser@idir" + ] }, "credentials": [ { @@ -1111,7 +1237,10 @@ "api-owner" ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1127,9 +1256,15 @@ "credentials": [], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1145,7 +1280,10 @@ "credentials": [], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { "master-realm": [ "manage-clients", @@ -1153,8 +1291,13 @@ "create-client", "manage-users" ], - "account": ["manage-account", "view-profile"], - "cypress-auth-profile": ["uma_protection"] + "account": [ + "manage-account", + "view-profile" + ], + "cypress-auth-profile": [ + "uma_protection" + ] }, "notBefore": 0, "groups": [] @@ -1170,9 +1313,14 @@ "credentials": [], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { - "gwa-api": ["uma_protection"], + "gwa-api": [ + "uma_protection" + ], "master-realm": [ "manage-clients", "view-users", @@ -1180,7 +1328,10 @@ "manage-users", "manage-authorization" ], - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1196,9 +1347,15 @@ "credentials": [], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1214,9 +1371,15 @@ "credentials": [], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "offline_access"], + "realmRoles": [ + "uma_authorization", + "offline_access" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1232,10 +1395,18 @@ "lastName": "Wendy L", "email": "wendy@test.com", "attributes": { - "provider_user_guid": ["220469E037C84A7ABDFAB15204A607C5"], - "identity_provider": ["idir"], - "display_name": ["wendy@idir"], - "provider_username": ["wendy"] + "provider_user_guid": [ + "220469E037C84A7ABDFAB15204A607C5" + ], + "identity_provider": [ + "idir" + ], + "display_name": [ + "wendy@idir" + ], + "provider_username": [ + "wendy" + ] }, "credentials": [ { @@ -1248,9 +1419,16 @@ ], "disableableCredentialTypes": [], "requiredActions": [], - "realmRoles": ["uma_authorization", "credential-admin", "offline_access"], + "realmRoles": [ + "uma_authorization", + "credential-admin", + "offline_access" + ], "clientRoles": { - "account": ["manage-account", "view-profile"] + "account": [ + "manage-account", + "view-profile" + ] }, "notBefore": 0, "groups": [] @@ -1259,14 +1437,18 @@ "scopeMappings": [ { "clientScope": "offline_access", - "roles": ["offline_access"] + "roles": [ + "offline_access" + ] } ], "clientScopeMappings": { "account": [ { "client": "account-console", - "roles": ["manage-account"] + "roles": [ + "manage-account" + ] } ] }, @@ -1282,8 +1464,13 @@ "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", "secret": "**********", - "defaultRoles": ["manage-account", "view-profile"], - "redirectUris": ["/realms/master/account/*"], + "defaultRoles": [ + "manage-account", + "view-profile" + ], + "redirectUris": [ + "/realms/master/account/*" + ], "webOrigins": [], "notBefore": 0, "bearerOnly": false, @@ -1324,7 +1511,9 @@ "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", "secret": "**********", - "redirectUris": ["/realms/master/account/*"], + "redirectUris": [ + "/realms/master/account/*" + ], "webOrigins": [], "notBefore": 0, "bearerOnly": false, @@ -1413,8 +1602,13 @@ "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", "secret": "8e1a17ed-cb93-4806-ac32-e303d1c86018", - "redirectUris": ["http://*", "https://*"], - "webOrigins": ["*"], + "redirectUris": [ + "http://*", + "https://*" + ], + "webOrigins": [ + "*" + ], "notBefore": 0, "bearerOnly": false, "consentRequired": false, @@ -1752,7 +1946,9 @@ "ownerManagedAccess": false, "attributes": {}, "_id": "8543a438-ee7e-44b7-aa28-aef951b65f2f", - "uris": ["/*"] + "uris": [ + "/*" + ] } ], "policies": [ @@ -1760,11 +1956,11 @@ "id": "34e0a630-d6fa-499c-b7b7-bca8b6ef70f6", "name": "Default Policy", "description": "A policy that grants access only for users within this realm", - "type": "js", + "type": "role", "logic": "POSITIVE", "decisionStrategy": "AFFIRMATIVE", "config": { - "code": "// by default, grants any permission associated with this policy\n$evaluation.grant();\n" + "roles": "[{\"id\":\"default-roles-main\",\"required\":false}]" } }, { @@ -1897,7 +2093,9 @@ "ownerManagedAccess": false, "attributes": {}, "_id": "054b9d22-ce05-4b1c-86bf-424eb7f3ca13", - "uris": ["/*"] + "uris": [ + "/*" + ] }, { "name": "platform1", @@ -2041,11 +2239,11 @@ "id": "35dcd837-d215-4036-84fe-452605b0a065", "name": "Default Policy", "description": "A policy that grants access only for users within this realm", - "type": "js", + "type": "role", "logic": "POSITIVE", "decisionStrategy": "AFFIRMATIVE", "config": { - "code": "// by default, grants any permission associated with this policy\n$evaluation.grant();\n" + "roles": "[{\"id\":\"default-roles-main\",\"required\":false}]" } }, { @@ -2213,8 +2411,13 @@ "enabled": true, "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", - "redirectUris": ["http://*", "https://*"], - "webOrigins": ["*"], + "redirectUris": [ + "http://*", + "https://*" + ], + "webOrigins": [ + "*" + ], "notBefore": 0, "bearerOnly": false, "consentRequired": false, @@ -2356,7 +2559,9 @@ } } ], - "defaultClientScopes": ["profile"], + "defaultClientScopes": [ + "profile" + ], "optionalClientScopes": [] }, { @@ -2408,8 +2613,12 @@ "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", "secret": "c01a7839-2679-4cdd-96c4-173223b49ee6", - "redirectUris": ["https://*"], - "webOrigins": ["*"], + "redirectUris": [ + "https://*" + ], + "webOrigins": [ + "*" + ], "notBefore": 0, "bearerOnly": false, "consentRequired": false, @@ -2499,8 +2708,12 @@ "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", "secret": "dc96e3d3-23cc-4345-aa5e-6f89b5d20c91", - "redirectUris": ["https://*"], - "webOrigins": ["*"], + "redirectUris": [ + "https://*" + ], + "webOrigins": [ + "*" + ], "notBefore": 0, "bearerOnly": false, "consentRequired": false, @@ -2591,8 +2804,12 @@ "alwaysDisplayInConsole": false, "clientAuthenticatorType": "client-secret", "secret": "**********", - "redirectUris": ["/admin/master/console/*"], - "webOrigins": ["+"], + "redirectUris": [ + "/admin/master/console/*" + ], + "webOrigins": [ + "+" + ], "notBefore": 0, "bearerOnly": false, "consentRequired": false, @@ -3189,7 +3406,9 @@ }, "smtpServer": {}, "eventsEnabled": false, - "eventsListeners": ["jboss-logging"], + "eventsListeners": [ + "jboss-logging" + ], "enabledEventTypes": [], "adminEventsEnabled": false, "adminEventsDetailsEnabled": false, @@ -3210,7 +3429,9 @@ "subType": "authenticated", "subComponents": {}, "config": { - "allow-default-scopes": ["true"] + "allow-default-scopes": [ + "true" + ] } }, { @@ -3239,8 +3460,12 @@ "subType": "anonymous", "subComponents": {}, "config": { - "host-sending-registration-request-must-match": ["true"], - "client-uris-must-match": ["true"] + "host-sending-registration-request-must-match": [ + "true" + ], + "client-uris-must-match": [ + "true" + ] } }, { @@ -3250,7 +3475,9 @@ "subType": "anonymous", "subComponents": {}, "config": { - "allow-default-scopes": ["true"] + "allow-default-scopes": [ + "true" + ] } }, { @@ -3268,7 +3495,9 @@ "subType": "anonymous", "subComponents": {}, "config": { - "max-clients": ["200"] + "max-clients": [ + "200" + ] } }, { @@ -3299,15 +3528,27 @@ "providerId": "hmac-generated", "subComponents": {}, "config": { - "kid": ["1b23b32b-bb69-4a9a-b20d-770d009ffb67"], - "active": ["true"], - "secretSize": ["64"], + "kid": [ + "1b23b32b-bb69-4a9a-b20d-770d009ffb67" + ], + "active": [ + "true" + ], + "secretSize": [ + "64" + ], "secret": [ "FqB7weAN-07obv1h7cltkFANraOPiK3BN-x1fBR7BY3yF_tOVVy0faPtS24pbPB5VJMXrvZBVy4MvQbhPGOn-A" ], - "priority": ["100"], - "enabled": ["true"], - "algorithm": ["HS256"] + "priority": [ + "100" + ], + "enabled": [ + "true" + ], + "algorithm": [ + "HS256" + ] } }, { @@ -3319,14 +3560,24 @@ "privateKey": [ "MIIEpAIBAAKCAQEAtE+K9HXgyAM2I3gmzReAKg3ukb0LgHI00kBz79cTLX+aXjAMl5n3cajJZuVBPj+Cyy4fm4vB7tHMTcY5StOMcQv95DZvmonQkweU87quqfETLTp6607tUfUdRib5W/euaKqVbCi09xwSftBeHHCcvotFTz/IjnZ6Ul/qZcDzXgoLEiaZrKz3iSFsnuJEWiozFP+hPZNESfRz/jqd7PcD++SO1iLtMjB5BPvlB7cFWDaWww+nUPbnsqsLZzwdAzhAjYe17x2AafffkZUUp1rf5VXEz8bzAoMpRZDswhG+v1jUPg638b3LFakV6PhRTvLnoKRpPvdzLmRguXtxufrQDwIDAQABAoIBAG0CLcrPPR8OuftFl4ekbop+M74OIVb9NKvr5WuZhnGaVHQe7m302mDvnxtC/Geqs+MsNlWub4d3dOGMNnTjYmOx0UPYGS6/pMZO7iFPumrpYSOV2FxMMjO7UYBo7ZZJLjr+7ikejxFZ+mCKjmr5NfoIbtWThSeDvz3v2OC9fyRZPE/AAqsy9Gkhukxnsi4nJOBK89nLeZS1nbGPzJxu9jiNm2snWI56N7orrVW5KBR/ynaFMN5CepYqgzK5uXv9dkzjBgiQbPlXk9c+LIWrrjXFxjftJTiop6C938B1MlfamkUsoQLwG1Uh8SQNgBExFUOeegouOJthbjhhVdPe/QkCgYEA/7Y5B2Sm0S+DXfoWyHS26ZQ2fDu9WweLbnGL9KrKd4T7u5Ubu9+qTu1aU2m7RxRya9yHzzVXSiTEKPoTPCjC9CIGA3YtQxze2zf7un+RfdN0Ty9pBZiKbAavsX5+KyIliC6FQy0O48eWR7LMsVSFJGGIeYPTjgY3U34uLsN55RUCgYEAtIOQxc1AFw/wcQIsJYEZWmwUIEd49s6x6iCBXez1sfZLJVHL5mE7NNxT0vuSKwxMK4gddSoRjBDqWGgge93HlIz+N+Ln656zCdLlOlDGe5a3jvtxIRKak/mp+nmk8G+FGGlAatPIRmZQbk0hIzh0m88k8hJ7NqRXTDeDDmzmcZMCgYEAgpvOcSpF0l7UWHHepTCIJLIhSj8xLoeh/h1dAPEjTPzNnzg/3CwXzwyIsEY2881LzC/t5jY2iZZR4yQoIvgm649dRvNblwXuBkaH+vAhngUdSTzMBaGuQhMANkaHpvxf8zjftDoVet58sc5voruq7bQrgvWEXuxp4el3KUeKwSkCgYAmOa4QlPQ7bf6mj6U1k+8AfN6OL1RoP0DhqVx7vVASDWvATV/2OyTEftupU+iSARqoJTzHsM7icDqP2gz27fHzfR/gScZ+2K5lKCmufahqR3I7bvd3326oYzgheFz7JUJz9uXTOWGxtrzVfrPDt5LJ48WZFVzOJ2LtGtw/08PAzQKBgQDy/mQxGSxIImcBcjdHDP7kb5T3M69PWN/VER1AMvkU+60uQTfZ7sXsJhWQn6XgzHF9ZhpTJeeliNn9dcTFOt9sWEoLspxZNz/RoKeW2P6p1krjrz74XDOgce63AaXufAFIGUDrJhCcIbyvalEvVQyDnnWe/dHl4us/DX+/+GWjVQ==" ], - "keySize": ["2048"], + "keySize": [ + "2048" + ], "certificate": [ "MIICmzCCAYMCBgF6AmA7pTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjEwNjEyMjIzNjM5WhcNMzEwNjEyMjIzODE5WjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0T4r0deDIAzYjeCbNF4AqDe6RvQuAcjTSQHPv1xMtf5peMAyXmfdxqMlm5UE+P4LLLh+bi8Hu0cxNxjlK04xxC/3kNm+aidCTB5Tzuq6p8RMtOnrrTu1R9R1GJvlb965oqpVsKLT3HBJ+0F4ccJy+i0VPP8iOdnpSX+plwPNeCgsSJpmsrPeJIWye4kRaKjMU/6E9k0RJ9HP+Op3s9wP75I7WIu0yMHkE++UHtwVYNpbDD6dQ9ueyqwtnPB0DOECNh7XvHYBp99+RlRSnWt/lVcTPxvMCgylFkOzCEb6/WNQ+DrfxvcsVqRXo+FFO8uegpGk+93MuZGC5e3G5+tAPAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAD25ZjxPFys+OAoSmgRuk4KwpTG4cLm3vEwUjD60+gvYJk3bFUgxErNv+Ax69PN4OZwMh9fdnVHRx0haVno0ULUBintRP/P0ond1mw7HB1v/i9EMpRiVoMEL8y3wV363XVw6mDrYI8Pp0OihJBKo5I1EWgaLAl+lu9YS6f3VXaASgqx1AaV6qZiXM95FOeYkjpx30cbIR6uhRAfBHz10PO//RhTCnBrjasU921qFSMH3EuvRZET0jB68FLF7uRFK+goSVrw9O+TcK6Cbh4I4GZX66ZBRW6MTTIzYNsSuSMUlGFujGcVi5+1JmJgJg76coIo7NIR68KPKyh+47Mvy9bI=" ], - "active": ["true"], - "priority": ["100"], - "enabled": ["true"], - "algorithm": ["RS256"] + "active": [ + "true" + ], + "priority": [ + "100" + ], + "enabled": [ + "true" + ], + "algorithm": [ + "RS256" + ] } }, { @@ -3335,12 +3586,24 @@ "providerId": "aes-generated", "subComponents": {}, "config": { - "kid": ["8fc9ebb4-d633-4fbc-a940-43414dbb6841"], - "active": ["true"], - "secretSize": ["16"], - "secret": ["mwpmhvHuQq_qLZAKhngrjg"], - "priority": ["100"], - "enabled": ["true"] + "kid": [ + "8fc9ebb4-d633-4fbc-a940-43414dbb6841" + ], + "active": [ + "true" + ], + "secretSize": [ + "16" + ], + "secret": [ + "mwpmhvHuQq_qLZAKhngrjg" + ], + "priority": [ + "100" + ], + "enabled": [ + "true" + ] } } ] @@ -3980,4 +4243,4 @@ "clientPolicies": { "policies": [] } -} +} \ No newline at end of file diff --git a/local/keycloak/nginx-lb.conf b/local/keycloak/nginx-lb.conf new file mode 100644 index 000000000..100419cc2 --- /dev/null +++ b/local/keycloak/nginx-lb.conf @@ -0,0 +1,14 @@ +upstream backend { + server e2e-keycloak-nodes-1:9081; + server e2e-keycloak-nodes-2:9081; +} + +server { + listen 9081; + + include /etc/nginx/mime.types; + + location / { + proxy_pass http://backend/; + } +} \ No newline at end of file diff --git a/local/portal/Dockerfile.E2E b/local/portal/Dockerfile.E2E index c18e31adf..cd6d89bed 100644 --- a/local/portal/Dockerfile.E2E +++ b/local/portal/Dockerfile.E2E @@ -1,5 +1,5 @@ #FROM node:lts-alpine3.18 -FROM node:16.14.2-alpine3.15 +FROM node:20-alpine3.19 ARG APP_VERSION ENV APP_VERSION=${APP_VERSION} @@ -12,11 +12,15 @@ RUN apk add curl jq USER node WORKDIR /app +# Workaround due to an ESM error +COPY --chown=node src/keycloak-admin-client ./keycloak-admin-client + COPY --chown=node src/*.json ./ COPY --chown=node src/nyc.config.js ./ RUN npm install --legacy-peer-deps +# --openssl-legacy-provider COPY --chown=node src ./ diff --git a/src/keycloak-admin-client/.gitignore b/src/keycloak-admin-client/.gitignore new file mode 100644 index 000000000..6eee014b4 --- /dev/null +++ b/src/keycloak-admin-client/.gitignore @@ -0,0 +1,2 @@ +index.js +node_modules \ No newline at end of file diff --git a/src/keycloak-admin-client/lib/index.d.ts b/src/keycloak-admin-client/lib/index.d.ts new file mode 100644 index 000000000..d25fb88d9 --- /dev/null +++ b/src/keycloak-admin-client/lib/index.d.ts @@ -0,0 +1,158 @@ +import KeycloakAdminClient from '@keycloak/keycloak-admin-client'; +import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; +import GroupRepresentation from '@keycloak/keycloak-admin-client/lib/defs/groupRepresentation'; +import RealmRepresentation from '@keycloak/keycloak-admin-client/lib/defs/realmRepresentation'; +import AccessTokenAccess from '@keycloak/keycloak-admin-client/lib/defs/AccessTokenAccess'; +import AccessTokenCertConf from '@keycloak/keycloak-admin-client/lib/defs/accessTokenCertConf'; +import AccessTokenRepresentation from '@keycloak/keycloak-admin-client/lib/defs/accessTokenRepresentation'; +import AccessClaimSet from '@keycloak/keycloak-admin-client/lib/defs/addressClaimSet'; +import AdminEventRepresentation from '@keycloak/keycloak-admin-client/lib/defs/adminEventRepresentation'; +import AuthDetailsRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authDetailsRepresentation'; +import AuthenticationExecutionExportRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionExportRepresentation'; +import AuthenticationExecutionInfoRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionInfoRepresentation'; +import AuthenticationFlowRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation'; +import AuthenticatorConfigInfoRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation'; +import AuthenticatorConfigRepresentation from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation'; +import CertificateRepresentation from '@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation'; +import ClientInitialAccessPresentation from '@keycloak/keycloak-admin-client/lib/defs/clientInitialAccessPresentation'; +import ClientPoliciesRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientPoliciesRepresentation'; +import ClientPolicyConditionRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientPolicyConditionRepresentation'; +import ClientPolicyExecutorRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientPolicyExecutorRepresentation'; +import ClientPolicyRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientPolicyRepresentation'; +import ClientProfileRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation'; +import ClientProfilesRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientProfilesRepresentation'; +import ClientRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientRepresentation'; +import ClientScopeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation'; +import { ClientSessionStat } from '@keycloak/keycloak-admin-client/lib/defs/clientSessionStat'; +import ComponentExportRepresentation from '@keycloak/keycloak-admin-client/lib/defs/componentExportRepresentation'; +import ComponentRepresentation from '@keycloak/keycloak-admin-client/lib/defs/componentRepresentation'; +import ComponentTypeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation'; +import { ConfigPropertyRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation'; +import CredentialRepresentation from '@keycloak/keycloak-admin-client/lib/defs/credentialRepresentation'; +import EvaluationResultRepresentation from '@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation'; +import EventRepresentation from '@keycloak/keycloak-admin-client/lib/defs/eventRepresentation'; +import EventType from '@keycloak/keycloak-admin-client/lib/defs/eventTypes'; +import FederatedIdentityRepresentation from '@keycloak/keycloak-admin-client/lib/defs/federatedIdentityRepresentation'; +import GlobalRequestResult from '@keycloak/keycloak-admin-client/lib/defs/globalRequestResult'; +import IdentityProviderMapperRepresentation from '@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperRepresentation'; +import { IdentityProviderMapperTypeRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/identityProviderMapperTypeRepresentation'; +import IdentityProviderRepresentation from '@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation'; +import KeysMetadataRepresentation from '@keycloak/keycloak-admin-client/lib/defs/keyMetadataRepresentation'; +import KeyStoreConfig from '@keycloak/keycloak-admin-client/lib/defs/keystoreConfig'; +import { ManagementPermissionReference } from '@keycloak/keycloak-admin-client/lib/defs/managementPermissionReference'; +import MappingsRepresentation from '@keycloak/keycloak-admin-client/lib/defs/mappingsRepresentation'; +import PasswordPolicyTypeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/passwordPolicyTypeRepresentation'; +import PermissionRepresentation from '@keycloak/keycloak-admin-client/lib/defs/PermissonRepresentation'; +import PolicyEvaluationResponse from '@keycloak/keycloak-admin-client/lib/defs/policyEvaluationResponse'; +import PolicyProviderRepresentation from '@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation'; +import PolicyResultRepresentation from '@keycloak/keycloak-admin-client/lib/defs/policyResultRepresentation'; +import PolicyRepresentation, { + DecisionStrategy, + Logic, +} from '@keycloak/keycloak-admin-client/lib/defs/policyRepresentation'; +import ProfileInfoRepresentation from '@keycloak/keycloak-admin-client/lib/defs/profileInfoRepresentation'; +import ProtocolMapperRepresentation from '@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation'; +import { RealmEventsConfigRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/realmEventsConfigRepresentation'; +import RequiredActionProviderRepresentation from '@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderRepresentation'; +import RequiredActionProviderSimpleRepresentation from '@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderSimpleRepresentation'; +import ResourceEvaluation from '@keycloak/keycloak-admin-client/lib/defs/resourceEvaluation'; +import ResourceRepresentation from '@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation'; +import ResourceServerRepresentation from '@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation'; +import RoleRepresentation from '@keycloak/keycloak-admin-client/lib/defs/roleRepresentation'; +import RolesRepresentation from '@keycloak/keycloak-admin-client/lib/defs/rolesRepresentation'; +import ScopeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation'; +import { ServerInfoRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation'; +import SynchronizationResultRepresentation from '@keycloak/keycloak-admin-client/lib/defs/synchronizationResultRepresentation'; +import SystemInfoRepresentation from '@keycloak/keycloak-admin-client/lib/defs/systemInfoRepersantation'; +import TestLdapConnectionRepresentation from '@keycloak/keycloak-admin-client/lib/defs/testLdapConnection'; +import UserConsentRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userConsentRepresentation'; +import { UserProfileConfig } from '@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata'; +import UserSessionRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userSessionRepresentation'; +import WhoAmIRepresentation from '@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation'; +import { + Credentials, + Settings, + TokenResponse, + TokenResponseRaw, +} from '@keycloak/keycloak-admin-client/lib/utils/auth'; +import { + NetworkError, + NetworkErrorOptions, +} from '@keycloak/keycloak-admin-client/lib/utils/fetchWithError'; + +export { KeycloakAdminClient, DecisionStrategy, Logic }; +export type { + UserRepresentation, + GroupRepresentation, + RealmRepresentation, + AccessTokenAccess, + AccessTokenRepresentation, + AccessTokenCertConf, + AccessClaimSet, + AdminEventRepresentation, + AuthenticationExecutionExportRepresentation, + AuthDetailsRepresentation, + AuthenticationExecutionInfoRepresentation, + AuthenticationFlowRepresentation, + AuthenticatorConfigInfoRepresentation, + AuthenticatorConfigRepresentation, + CertificateRepresentation, + ClientInitialAccessPresentation, + ClientPoliciesRepresentation, + ClientPolicyConditionRepresentation, + ClientPolicyExecutorRepresentation, + ClientPolicyRepresentation, + ClientProfileRepresentation, + ClientProfilesRepresentation, + ClientRepresentation, + ClientScopeRepresentation, + ClientSessionStat, + ComponentExportRepresentation, + ComponentRepresentation, + ComponentTypeRepresentation, + ConfigPropertyRepresentation, + CredentialRepresentation, + EvaluationResultRepresentation, + EventRepresentation, + EventType, + FederatedIdentityRepresentation, + GlobalRequestResult, + IdentityProviderMapperRepresentation, + IdentityProviderMapperTypeRepresentation, + IdentityProviderRepresentation, + KeysMetadataRepresentation, + KeyStoreConfig, + ManagementPermissionReference, + MappingsRepresentation, + NetworkError, + NetworkErrorOptions, + PasswordPolicyTypeRepresentation, + PermissionRepresentation, + PolicyEvaluationResponse, + PolicyProviderRepresentation, + PolicyResultRepresentation, + PolicyRepresentation, + ProfileInfoRepresentation, + ProtocolMapperRepresentation, + RealmEventsConfigRepresentation, + RequiredActionProviderRepresentation, + RequiredActionProviderSimpleRepresentation, + ResourceEvaluation, + ResourceRepresentation, + ResourceServerRepresentation, + RoleRepresentation, + RolesRepresentation, + ScopeRepresentation, + ServerInfoRepresentation, + SynchronizationResultRepresentation, + SystemInfoRepresentation, + TestLdapConnectionRepresentation, + UserConsentRepresentation, + UserProfileConfig, + UserSessionRepresentation, + WhoAmIRepresentation, + Credentials, + Settings, + TokenResponse, + TokenResponseRaw, +}; diff --git a/src/keycloak-admin-client/package-lock.json b/src/keycloak-admin-client/package-lock.json new file mode 100644 index 000000000..a35c27551 --- /dev/null +++ b/src/keycloak-admin-client/package-lock.json @@ -0,0 +1,492 @@ +{ + "name": "@packages/keycloak-admin-client", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@packages/keycloak-admin-client", + "version": "1.0.0", + "dependencies": { + "@keycloak/keycloak-admin-client": "^26.0.6" + }, + "devDependencies": { + "esbuild": "^0.24.0", + "typescript": "^5.7.2" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@keycloak/keycloak-admin-client": { + "version": "26.0.6", + "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-26.0.6.tgz", + "integrity": "sha512-pZmaSAyg+LwQ3qnZF+01ZkURpcoEdLAloUK5KOZjE9jyNd86EHdx98/XmTYaJIuQ6ydMXxTWWc5Grq18H+PvJQ==", + "dependencies": { + "camelize-ts": "^3.0.0", + "url-join": "^5.0.0", + "url-template": "^3.1.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/camelize-ts": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelize-ts/-/camelize-ts-3.0.0.tgz", + "integrity": "sha512-cgRwKKavoDKLTjO4FQTs3dRBePZp/2Y9Xpud0FhuCOTE86M2cniKN4CCXgRnsyXNMmQMifVHcv6SPaMtTx6ofQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" + } + }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/url-join": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz", + "integrity": "sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/url-template": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-3.1.1.tgz", + "integrity": "sha512-4oszoaEKE/mQOtAmdMWqIRHmkxWkUZMnXFnjQ5i01CuRSK3uluxcH1MRVVVWmhlnzT1SCDfKxxficm2G37qzCA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + } + } +} diff --git a/src/keycloak-admin-client/package.json b/src/keycloak-admin-client/package.json new file mode 100644 index 000000000..b153b6e6d --- /dev/null +++ b/src/keycloak-admin-client/package.json @@ -0,0 +1,21 @@ +{ + "name": "@packages/keycloak-admin-client", + "version": "1.0.0", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "compile": "tsc --noEmit", + "build": "esbuild lib/index.d.ts --platform=node --bundle --format=cjs --outfile=lib/index.js", + "prepublish": "npm run compile && npm run build" + }, + "dependencies": { + "@keycloak/keycloak-admin-client": "^26.0.6" + }, + "devDependencies": { + "esbuild": "^0.24.0", + "typescript": "^5.7.2" + }, + "files": [ + "dist/**/*" + ] +} \ No newline at end of file diff --git a/src/keycloak-admin-client/tsconfig.json b/src/keycloak-admin-client/tsconfig.json new file mode 100644 index 000000000..7156d7920 --- /dev/null +++ b/src/keycloak-admin-client/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "commonjs", + "noEmit": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipDefaultLibCheck": true, + "skipLibCheck": true + } +} diff --git a/src/package-lock.json b/src/package-lock.json index e452672db..f0762af45 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -7,13 +7,13 @@ "": { "name": "bcgov-aps-portal", "version": "1.1.0", + "hasInstallScript": true, "license": "MIT", "dependencies": { "@bcgov/bc-sans": "^1.0.1", "@chakra-ui/react": "^1.6.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@keycloak/keycloak-admin-client": "^17.0.0-dev.26", "@keystone-next/admin-ui": "^7.0.0", "@keystonejs/access-control": "^7.1.1", "@keystonejs/adapter-mongoose": "^11.2.2", @@ -29,6 +29,7 @@ "@keystonejs/keystone": "^19.3.2", "@keystonejs/list-plugins": "^7.1.5", "@keystonejs/utils": "^6.1.1", + "@packages/keycloak-admin-client": "file://./keycloak-admin-client", "@tailwindcss/postcss7-compat": "^2.0.2", "autoprefixer": "^9.8.6", "connect-mongo": "^3.2.0", @@ -156,6 +157,33 @@ "node": ">=10.0.0" } }, + "../../../../../../../../keycloak-admin-client": { + "extraneous": true + }, + "keycloak-admin-client": { + "name": "@packages/keycloak-admin-client", + "version": "1.0.0", + "dependencies": { + "@keycloak/keycloak-admin-client": "^26.0.6" + }, + "devDependencies": { + "esbuild": "^0.24.0", + "typescript": "^5.7.2" + } + }, + "keycloak-admin-client/node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/@ampproject/remapping": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", @@ -4802,6 +4830,390 @@ "cosmiconfig": ">=6" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", @@ -7420,17 +7832,16 @@ } }, "node_modules/@keycloak/keycloak-admin-client": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-17.0.1.tgz", - "integrity": "sha512-lgw6P7pGcJQbJExCE6+FpznDjadI571rCoSj2CmE8KAHu0BCsj2eqWP9HI3wb6zpkJwVQ86uLHTcsGvS8Ijjtw==", + "version": "26.0.6", + "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-26.0.6.tgz", + "integrity": "sha512-pZmaSAyg+LwQ3qnZF+01ZkURpcoEdLAloUK5KOZjE9jyNd86EHdx98/XmTYaJIuQ6ydMXxTWWc5Grq18H+PvJQ==", "dependencies": { - "axios": "^0.25.0", - "camelize-ts": "^1.0.8", - "keycloak-js": "^16.0.0", - "lodash": "^4.17.21", - "query-string": "^7.0.1", - "url-join": "^4.0.0", - "url-template": "^2.0.8" + "camelize-ts": "^3.0.0", + "url-join": "^5.0.0", + "url-template": "^3.1.1" + }, + "engines": { + "node": ">=18" } }, "node_modules/@keystone-next/admin-ui": { @@ -12400,6 +12811,10 @@ "integrity": "sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==", "dev": true }, + "node_modules/@packages/keycloak-admin-client": { + "resolved": "keycloak-admin-client", + "link": true + }, "node_modules/@panva/asn1.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", @@ -18576,14 +18991,6 @@ "node": ">=4" } }, - "node_modules/axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "dependencies": { - "follow-redirects": "^1.14.7" - } - }, "node_modules/axios-ntlm": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.3.0.tgz", @@ -19547,9 +19954,23 @@ } }, "node_modules/base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/base64url": { "version": "3.0.1", @@ -20343,9 +20764,12 @@ "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==" }, "node_modules/camelize-ts": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/camelize-ts/-/camelize-ts-1.0.9.tgz", - "integrity": "sha512-ePOW3V2qrQ0qtRlcTM6Qe3nXremdydIwsMKI1Vl2NBGM0tOo8n2xzJ7YOQpV1GIKHhs3p+F40ThI8/DoYWbYKQ==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelize-ts/-/camelize-ts-3.0.0.tgz", + "integrity": "sha512-cgRwKKavoDKLTjO4FQTs3dRBePZp/2Y9Xpud0FhuCOTE86M2cniKN4CCXgRnsyXNMmQMifVHcv6SPaMtTx6ofQ==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } }, "node_modules/caniuse-lite": { "version": "1.0.30001325", @@ -22954,9 +23378,9 @@ "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==" }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "engines": { "node": ">=0.10" } @@ -24033,6 +24457,45 @@ "ext": "^1.1.2" } }, + "node_modules/esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -25598,14 +26061,6 @@ "node": ">=8" } }, - "node_modules/filter-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs= sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -33290,11 +33745,6 @@ "node": ">=0.10.0" } }, - "node_modules/js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, "node_modules/js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", @@ -33679,15 +34129,6 @@ "chromedriver": "latest" } }, - "node_modules/keycloak-js": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-16.1.1.tgz", - "integrity": "sha512-AkRNIJFSMLfQKIBKK31UL4FGI59MQFf68Bf8I+PFbOSKNtnfGVPYLiZeJgy03Kv5ddswHBjVZOY5T0f5RpZpLw==", - "dependencies": { - "base64-js": "1.3.1", - "js-sha256": "0.9.0" - } - }, "node_modules/keycode": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz", @@ -40651,23 +41092,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/query-string": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", - "integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==", - "dependencies": { - "decode-uri-component": "^0.2.0", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -44530,14 +44954,6 @@ "node": "*" } }, - "node_modules/split-on-first": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", - "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", - "engines": { - "node": ">=6" - } - }, "node_modules/split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -44827,14 +45243,6 @@ "events": "^3.3.0" } }, - "node_modules/strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY= sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", - "engines": { - "node": ">=4" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -47400,9 +47808,12 @@ } }, "node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz", + "integrity": "sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } }, "node_modules/url-loader": { "version": "4.1.1", @@ -47453,9 +47864,12 @@ } }, "node_modules/url-template": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE= sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-3.1.1.tgz", + "integrity": "sha512-4oszoaEKE/mQOtAmdMWqIRHmkxWkUZMnXFnjQ5i01CuRSK3uluxcH1MRVVVWmhlnzT1SCDfKxxficm2G37qzCA==", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } }, "node_modules/use": { "version": "3.1.1", @@ -52742,6 +53156,174 @@ "tslib": "^2" } }, + "@esbuild/aix-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.0.tgz", + "integrity": "sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.0.tgz", + "integrity": "sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.0.tgz", + "integrity": "sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.0.tgz", + "integrity": "sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz", + "integrity": "sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.0.tgz", + "integrity": "sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.0.tgz", + "integrity": "sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.0.tgz", + "integrity": "sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.0.tgz", + "integrity": "sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.0.tgz", + "integrity": "sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.0.tgz", + "integrity": "sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.0.tgz", + "integrity": "sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.0.tgz", + "integrity": "sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.0.tgz", + "integrity": "sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.0.tgz", + "integrity": "sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.0.tgz", + "integrity": "sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.0.tgz", + "integrity": "sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.0.tgz", + "integrity": "sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.0.tgz", + "integrity": "sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.0.tgz", + "integrity": "sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.0.tgz", + "integrity": "sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.0.tgz", + "integrity": "sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.0.tgz", + "integrity": "sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "dev": true, + "optional": true + }, "@eslint/eslintrc": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz", @@ -54910,17 +55492,13 @@ } }, "@keycloak/keycloak-admin-client": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-17.0.1.tgz", - "integrity": "sha512-lgw6P7pGcJQbJExCE6+FpznDjadI571rCoSj2CmE8KAHu0BCsj2eqWP9HI3wb6zpkJwVQ86uLHTcsGvS8Ijjtw==", + "version": "26.0.6", + "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-26.0.6.tgz", + "integrity": "sha512-pZmaSAyg+LwQ3qnZF+01ZkURpcoEdLAloUK5KOZjE9jyNd86EHdx98/XmTYaJIuQ6ydMXxTWWc5Grq18H+PvJQ==", "requires": { - "axios": "^0.25.0", - "camelize-ts": "^1.0.8", - "keycloak-js": "^16.0.0", - "lodash": "^4.17.21", - "query-string": "^7.0.1", - "url-join": "^4.0.0", - "url-template": "^2.0.8" + "camelize-ts": "^3.0.0", + "url-join": "^5.0.0", + "url-template": "^3.1.1" } }, "@keystone-next/admin-ui": { @@ -58802,6 +59380,22 @@ "integrity": "sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q==", "dev": true }, + "@packages/keycloak-admin-client": { + "version": "file:keycloak-admin-client", + "requires": { + "@keycloak/keycloak-admin-client": "^26.0.6", + "esbuild": "^0.24.0", + "typescript": "^5.7.2" + }, + "dependencies": { + "typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true + } + } + }, "@panva/asn1.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", @@ -63575,14 +64169,6 @@ "integrity": "sha512-WKTW1+xAzhMS5dJsxWkliixlO/PqC4VhmO9T4juNYcaTg9jzWiJsou6m5pxWYGfigWbwzJWeFY6z47a+4neRXA==", "dev": true }, - "axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", - "requires": { - "follow-redirects": "^1.14.7" - } - }, "axios-ntlm": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/axios-ntlm/-/axios-ntlm-1.3.0.tgz", @@ -64391,9 +64977,9 @@ } }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "base64url": { "version": "3.0.1", @@ -65026,9 +65612,9 @@ "integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= sha512-W2lPwkBkMZwFlPCXhIlYgxu+7gC/NUlCtdK652DAJ1JdgV0sTrvuPFshNPrFa1TY2JOkLhgdeEBplB4ezEa+xg==" }, "camelize-ts": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/camelize-ts/-/camelize-ts-1.0.9.tgz", - "integrity": "sha512-ePOW3V2qrQ0qtRlcTM6Qe3nXremdydIwsMKI1Vl2NBGM0tOo8n2xzJ7YOQpV1GIKHhs3p+F40ThI8/DoYWbYKQ==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelize-ts/-/camelize-ts-3.0.0.tgz", + "integrity": "sha512-cgRwKKavoDKLTjO4FQTs3dRBePZp/2Y9Xpud0FhuCOTE86M2cniKN4CCXgRnsyXNMmQMifVHcv6SPaMtTx6ofQ==" }, "caniuse-lite": { "version": "1.0.30001325", @@ -67101,9 +67687,9 @@ "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==" }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" }, "decompress-response": { "version": "6.0.0", @@ -67988,6 +68574,38 @@ "ext": "^1.1.2" } }, + "esbuild": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", + "integrity": "sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.24.0", + "@esbuild/android-arm": "0.24.0", + "@esbuild/android-arm64": "0.24.0", + "@esbuild/android-x64": "0.24.0", + "@esbuild/darwin-arm64": "0.24.0", + "@esbuild/darwin-x64": "0.24.0", + "@esbuild/freebsd-arm64": "0.24.0", + "@esbuild/freebsd-x64": "0.24.0", + "@esbuild/linux-arm": "0.24.0", + "@esbuild/linux-arm64": "0.24.0", + "@esbuild/linux-ia32": "0.24.0", + "@esbuild/linux-loong64": "0.24.0", + "@esbuild/linux-mips64el": "0.24.0", + "@esbuild/linux-ppc64": "0.24.0", + "@esbuild/linux-riscv64": "0.24.0", + "@esbuild/linux-s390x": "0.24.0", + "@esbuild/linux-x64": "0.24.0", + "@esbuild/netbsd-x64": "0.24.0", + "@esbuild/openbsd-arm64": "0.24.0", + "@esbuild/openbsd-x64": "0.24.0", + "@esbuild/sunos-x64": "0.24.0", + "@esbuild/win32-arm64": "0.24.0", + "@esbuild/win32-ia32": "0.24.0", + "@esbuild/win32-x64": "0.24.0" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -69217,11 +69835,6 @@ "to-regex-range": "^5.0.1" } }, - "filter-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs= sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" - }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -75022,11 +75635,6 @@ "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", "dev": true }, - "js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" - }, "js-string-escape": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", @@ -75326,15 +75934,6 @@ "jwk-to-pem": "^2.0.0" } }, - "keycloak-js": { - "version": "16.1.1", - "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-16.1.1.tgz", - "integrity": "sha512-AkRNIJFSMLfQKIBKK31UL4FGI59MQFf68Bf8I+PFbOSKNtnfGVPYLiZeJgy03Kv5ddswHBjVZOY5T0f5RpZpLw==", - "requires": { - "base64-js": "1.3.1", - "js-sha256": "0.9.0" - } - }, "keycode": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz", @@ -80701,17 +81300,6 @@ "side-channel": "^1.0.4" } }, - "query-string": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", - "integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==", - "requires": { - "decode-uri-component": "^0.2.0", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - } - }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", @@ -83754,11 +84342,6 @@ "through": "2" } }, - "split-on-first": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", - "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==" - }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -84005,11 +84588,6 @@ "events": "^3.3.0" } }, - "strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY= sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==" - }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -85985,9 +86563,9 @@ } }, "url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz", + "integrity": "sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==" }, "url-loader": { "version": "4.1.1", @@ -86019,9 +86597,9 @@ } }, "url-template": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", - "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE= sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/url-template/-/url-template-3.1.1.tgz", + "integrity": "sha512-4oszoaEKE/mQOtAmdMWqIRHmkxWkUZMnXFnjQ5i01CuRSK3uluxcH1MRVVVWmhlnzT1SCDfKxxficm2G37qzCA==" }, "use": { "version": "3.1.1", diff --git a/src/package.json b/src/package.json index 147f8aad3..ec8c91f42 100644 --- a/src/package.json +++ b/src/package.json @@ -23,6 +23,7 @@ }, "scripts": { "prebuild": "tslint -p tsconfig.json --fix", + "preinstall": "npm install --prefix keycloak-admin-client", "ts-watch": "tsc --watch --jsx react-jsx", "ts-build": "tsc", "tsoa-build-v1": "tsoa -c tsoa.json spec-and-routes", @@ -43,7 +44,7 @@ "mock-server": "nodemon ./test/mock-server/server.js", "ks-build": "cross-env NODE_ENV=production keystone build --entry=dist/server.js --out=dist2", "start": "cross-env NODE_ENV=production keystone start --entry=dist/server.js", - "build": "NODE_OPTIONS='--dns-result-order=ipv4first' npm-run-all delete-assets copy-assets tsoa-build-v1 tsoa-build-v2 tsoa-build-v3 ts-build ks-build copy-keystone-admin-assets", + "build": "NODE_OPTIONS='--dns-result-order=ipv4first --openssl-legacy-provider' npm-run-all delete-assets copy-assets tsoa-build-v1 tsoa-build-v2 tsoa-build-v3 ts-build ks-build copy-keystone-admin-assets", "create-tables": "cross-env CREATE_TABLES=true keystone create-tables --entry=dist/server.js", "lint": "eslint ./nextapp --ext .ts,.tsx --quiet", "lint:ts": "tsc -p ./nextapp/tsconfig.json --noEmit", @@ -63,7 +64,6 @@ "@chakra-ui/react": "^1.6.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", - "@keycloak/keycloak-admin-client": "^17.0.0-dev.26", "@keystone-next/admin-ui": "^7.0.0", "@keystonejs/access-control": "^7.1.1", "@keystonejs/adapter-mongoose": "^11.2.2", @@ -79,6 +79,7 @@ "@keystonejs/keystone": "^19.3.2", "@keystonejs/list-plugins": "^7.1.5", "@keystonejs/utils": "^6.1.1", + "@packages/keycloak-admin-client": "file://./keycloak-admin-client", "@tailwindcss/postcss7-compat": "^2.0.2", "autoprefixer": "^9.8.6", "connect-mongo": "^3.2.0", @@ -249,4 +250,4 @@ "msw": { "workerDirectory": "public" } -} +} \ No newline at end of file diff --git a/src/services/keycloak/client-policy-service.ts b/src/services/keycloak/client-policy-service.ts index 708e38019..a0ff95598 100644 --- a/src/services/keycloak/client-policy-service.ts +++ b/src/services/keycloak/client-policy-service.ts @@ -1,13 +1,13 @@ import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; +import { + KeycloakAdminClient, + PolicyRepresentation, + ResourceRepresentation, + ResourceServerRepresentation, + ScopeRepresentation, +} from '@packages/keycloak-admin-client'; import { PolicyQuery } from '@keycloak/keycloak-admin-client/lib/resources/clients'; -import PolicyRepresentation from '@keycloak/keycloak-admin-client/lib/defs/policyRepresentation'; -import ResourceServerRepresentation from '@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation'; -import ResourceRepresentation from '@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation'; -import ScopeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation'; //import KeycloakAdminClient, { default as KcAdminClient } from 'keycloak-admin'; // import { RoleMappingPayload } from 'keycloak-admin/lib/defs/roleRepresentation'; @@ -25,7 +25,7 @@ export class KeycloakClientPolicyService { const baseUrl = issuerUrl.substr(0, issuerUrl.indexOf('/realms')); const realmName = issuerUrl.substr(issuerUrl.lastIndexOf('/') + 1); logger.debug('%s %s', baseUrl, realmName); - this.kcAdminClient = new KcAdminClient({ baseUrl, realmName }); + this.kcAdminClient = new KeycloakAdminClient({ baseUrl, realmName }); } } @@ -56,7 +56,7 @@ export class KeycloakClientPolicyService { public async listPolicies( id: string, query?: PolicyQuery - ): Promise { + ): Promise<'' | PolicyRepresentation[]> { logger.debug('[listPolicies] %s', id); return this.kcAdminClient.clients .listPolicies({ ...{ id, max: 1000 }, ...query }) @@ -70,7 +70,7 @@ export class KeycloakClientPolicyService { id: string, resourceId: string ): Promise { - logger.debug('[listPermissionsByResource] %s %s', id, resourceId); + logger.debug('[listPermissionsByResource] cid=%s rid=%s', id, resourceId); const permissions: any = await this.kcAdminClient.clients .listPolicies({ id, resource: resourceId }) .catch((e: any) => { diff --git a/src/services/keycloak/client-registration-service.ts b/src/services/keycloak/client-registration-service.ts index 7169d2e49..7ab014083 100644 --- a/src/services/keycloak/client-registration-service.ts +++ b/src/services/keycloak/client-registration-service.ts @@ -11,9 +11,7 @@ import { clientTemplateClientJwt } from './templates/client-template-client-jwt' import { clientTemplateSharedIdP } from './templates/client-template-shared-idp'; import { clientTemplateSharedIdPAuthz } from './templates/client-template-shared-idp-authz'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; +import { KeycloakAdminClient } from '@packages/keycloak-admin-client'; import { ClientMapper } from '../workflow/types'; import { AudienceMapper } from './templates/protocol-mappers/audience'; @@ -62,7 +60,7 @@ export class KeycloakClientRegistrationService { // this will probably fail if the issuer is not Keycloak const baseUrl = issuerUrl.substr(0, issuerUrl.indexOf('/realms')); const realmName = issuerUrl.substr(issuerUrl.lastIndexOf('/') + 1); - this.kcAdminClient = new KcAdminClient({ baseUrl, realmName }); + this.kcAdminClient = new KeycloakAdminClient({ baseUrl, realmName }); } } diff --git a/src/services/keycloak/client-roles.ts b/src/services/keycloak/client-roles.ts index 1459327d0..eecf3e362 100644 --- a/src/services/keycloak/client-roles.ts +++ b/src/services/keycloak/client-roles.ts @@ -1,14 +1,11 @@ import 'crypto'; import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; -import ClientScopeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation'; import { KeycloakUserService } from './user-service'; import { EnvironmentContext } from '../workflow/get-namespaces'; import { KeycloakClientService } from './client-service'; -import RoleRepresentation from '@keycloak/keycloak-admin-client/lib/defs/roleRepresentation'; + +import { KeycloakAdminClient } from '@packages/keycloak-admin-client'; const logger = Logger('kc.roles'); @@ -24,7 +21,7 @@ export class KeycloakClientRolesService { if (issuerUrl != null) { const baseUrl = issuerUrl.substr(0, issuerUrl.indexOf('/realms')); const realmName = issuerUrl.substr(issuerUrl.lastIndexOf('/') + 1); - this.kcAdminClient = new KcAdminClient({ baseUrl, realmName }); + this.kcAdminClient = new KeycloakAdminClient({ baseUrl, realmName }); this.kcUserService = new KeycloakUserService(issuerUrl); this.kcClientService = new KeycloakClientService(issuerUrl); } diff --git a/src/services/keycloak/client-service.ts b/src/services/keycloak/client-service.ts index 353b44d0e..c2ef1a256 100644 --- a/src/services/keycloak/client-service.ts +++ b/src/services/keycloak/client-service.ts @@ -2,13 +2,13 @@ import 'crypto'; import FormData from 'form-data'; import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; -import ClientScopeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation'; -import CertificateRepresentation from '@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation'; -import RoleRepresentation from '@keycloak/keycloak-admin-client/lib/defs/roleRepresentation'; -import ClientRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientRepresentation'; +import { + KeycloakAdminClient, + ClientScopeRepresentation, + CertificateRepresentation, + RoleRepresentation, + ClientRepresentation, +} from '@packages/keycloak-admin-client'; const logger = Logger('kc.client'); @@ -20,7 +20,7 @@ export class KeycloakClientService { if (issuerUrl != null) { const baseUrl = issuerUrl.substr(0, issuerUrl.indexOf('/realms')); const realmName = issuerUrl.substr(issuerUrl.lastIndexOf('/') + 1); - this.kcAdminClient = new KcAdminClient({ baseUrl, realmName }); + this.kcAdminClient = new KeycloakAdminClient({ baseUrl, realmName }); } } diff --git a/src/services/keycloak/group-service.ts b/src/services/keycloak/group-service.ts index 45a72b7ca..b46be48be 100644 --- a/src/services/keycloak/group-service.ts +++ b/src/services/keycloak/group-service.ts @@ -1,13 +1,17 @@ import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; -import GroupRepresentation from '@keycloak/keycloak-admin-client/lib/defs/groupRepresentation'; -import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; +import { + KeycloakAdminClient, + GroupRepresentation, + UserRepresentation, +} from '@packages/keycloak-admin-client'; +// import KeycloakAdminClient from '@keycloak/keycloak-admin-client/lib'; +//import { GroupRepresentation } from '@packages/keycloak-admin-client'; +// import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; // import KeycloakAdminClient, { default as KcAdminClient } from 'keycloak-admin'; // import { RoleMappingPayload } from 'keycloak-admin/lib/defs/roleRepresentation'; -// import GroupRepresentation from 'keycloak-admin/lib/defs/groupRepresentation'; +// import GroupRepresentation from '@keycloak/keycloak-admin-client/lib/defs/groupRepresentation'; +// import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; // import UserRepresentation from 'keycloak-admin/lib/defs/userRepresentation'; const logger = Logger('kc.group'); @@ -20,7 +24,7 @@ export class KeycloakGroupService { const baseUrl = issuerUrl.substr(0, issuerUrl.indexOf('/realms')); const realmName = issuerUrl.substr(issuerUrl.lastIndexOf('/') + 1); logger.debug('%s %s', baseUrl, realmName); - this.kcAdminClient = new KcAdminClient({ baseUrl, realmName }); + this.kcAdminClient = new KeycloakAdminClient({ baseUrl, realmName }); } public async cacheGroups() { @@ -98,18 +102,20 @@ export class KeycloakGroupService { parentGroup: GroupRepresentation, groupName: string ): Promise<{ created: boolean; id: string }> { - const match = parentGroup.subGroups.filter( + const subGroups = await this.subGroups(parentGroup); + + const match = subGroups.filter( (group: GroupRepresentation) => group.name == groupName ); if (match.length == 0) { logger.debug('[createIfMissing] CREATE %s...', groupName); - const newGroup = await this.kcAdminClient.groups.setOrCreateChild( + const newGroup = await this.kcAdminClient.groups.createChildGroup( { id: parentGroup.id }, { name: groupName, } ); - logger.info('[createIfMissing] CREATED %s', groupName); + logger.info('[createIfMissing] CREATED %s %j', groupName, newGroup); return { created: true, id: newGroup.id }; } else { logger.debug('[createIfMissing] EXISTS %s', groupName); @@ -140,13 +146,7 @@ export class KeycloakGroupService { name: string, briefRepresentation: boolean = true ) { - const result = await this.search(name, briefRepresentation); - const selectedBranch = result.filter((g) => g.name === root); - if (selectedBranch.length == 0) { - logger.error('[findByName] %s - not found', root); - return null; - } - return this.searchTree(selectedBranch, name, 'name', false); + return await this.getGroup(root, name); } public async getGroups( @@ -170,8 +170,10 @@ export class KeycloakGroupService { const groups = listOfGroups.filter( (group: GroupRepresentation) => group.name == parentGroupName ); + const groupSubGroups = await this.subGroups(groups.pop()); + if ( - groups[0].subGroups.filter( + groupSubGroups.filter( (group: GroupRepresentation) => group.name == groupName ).length == 0 ) { @@ -181,6 +183,26 @@ export class KeycloakGroupService { } } + public async setSubGroups( + group: GroupRepresentation + ): Promise { + if (group.subGroups.length == 0 && group.subGroupCount > 0) { + const subGroups = await this.kcAdminClient.groups.listSubGroups({ + parentId: group.id, + }); + group.subGroups = subGroups; + } + return group.subGroups; + } + + private async subGroups( + group: GroupRepresentation + ): Promise { + return this.kcAdminClient.groups.listSubGroups({ + parentId: group.id, + }); + } + public async getGroup(parentGroupName: string, groupName: string) { const listOfGroups = this.allGroups ? this.allGroups @@ -188,16 +210,19 @@ export class KeycloakGroupService { const groups = listOfGroups.filter( (group: GroupRepresentation) => group.name == parentGroupName ); + logger.debug('Groups = %j', groups); + const subGroups = await this.subGroups(groups.pop()); + + logger.debug('SubGroups = %j', subGroups); if ( - groups[0].subGroups.filter( - (group: GroupRepresentation) => group.name == groupName - ).length == 0 + subGroups.filter((group: GroupRepresentation) => group.name == groupName) + .length == 0 ) { logger.error('[getGroup] MISSING %s', groupName); return null; } else { logger.debug('[getGroup] FOUND %s', groupName); - const grp = groups[0].subGroups.filter( + const grp = subGroups.filter( (group: GroupRepresentation) => group.name == groupName )[0]; const group = await this.kcAdminClient.groups.findOne({ id: grp.id }); @@ -238,14 +263,4 @@ export class KeycloakGroupService { logger.debug('[deleteGroup] %s', id); await this.kcAdminClient.groups.del({ id }); } - - private searchTree(tree: any, value: string, key = 'id', reverse = false) { - const stack = [tree[0]]; - while (stack.length) { - const node = stack[reverse ? 'pop' : 'shift'](); - if (node[key] === value) return node; - node.subGroups && stack.push(...node.subGroups); - } - return null; - } } diff --git a/src/services/keycloak/user-service.ts b/src/services/keycloak/user-service.ts index 603103d6f..8e12ca0fd 100644 --- a/src/services/keycloak/user-service.ts +++ b/src/services/keycloak/user-service.ts @@ -1,12 +1,12 @@ import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; +import { + KeycloakAdminClient, + UserRepresentation, +} from '@packages/keycloak-admin-client'; import { RoleMappingPayload } from '@keycloak/keycloak-admin-client/lib/defs/roleRepresentation'; import { checkKeystoneStatus } from '../checkKeystoneStatus'; -import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; const logger = Logger('kc.user'); @@ -17,10 +17,10 @@ export class KeycloakUserService { const baseUrl = issuerUrl.substr(0, issuerUrl.indexOf('/realms')); const realmName = issuerUrl.substr(issuerUrl.lastIndexOf('/') + 1); logger.debug('%s %s', baseUrl, realmName); - this.kcAdminClient = new KcAdminClient({ baseUrl, realmName }); + this.kcAdminClient = new KeycloakAdminClient({ baseUrl, realmName }); } - public useAdminClient(client: KcAdminClient) { + public useAdminClient(client: KeycloakAdminClient) { this.kcAdminClient = client; return this; } @@ -175,4 +175,4 @@ export class KeycloakUserService { } ); } -} \ No newline at end of file +} diff --git a/src/services/org-groups/group-access.ts b/src/services/org-groups/group-access.ts index e5eca1a00..4e0b77616 100644 --- a/src/services/org-groups/group-access.ts +++ b/src/services/org-groups/group-access.ts @@ -1,8 +1,7 @@ import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; +import KcAdminClient from '@packages/keycloak-admin-client'; +import KeycloakAdminClient from '@keycloak/keycloak-admin-client/lib'; import { KeycloakClientPolicyService, KeycloakClientService, diff --git a/src/services/org-groups/namespace.ts b/src/services/org-groups/namespace.ts index ef321f51f..d92a63c4f 100644 --- a/src/services/org-groups/namespace.ts +++ b/src/services/org-groups/namespace.ts @@ -151,7 +151,7 @@ export class NamespaceService { 'Unexpected data returned' ); - const namespaceGroups = groups[0].subGroups; + const namespaceGroups = await this.groupService.setSubGroups(groups[0]); const matches = namespaceGroups .filter( diff --git a/src/services/org-groups/org-group-service.ts b/src/services/org-groups/org-group-service.ts index 29239364b..d35f0ca3e 100644 --- a/src/services/org-groups/org-group-service.ts +++ b/src/services/org-groups/org-group-service.ts @@ -1,22 +1,19 @@ import { strict as assert } from 'assert'; import { Logger } from '../../logger'; -import KeycloakAdminClient, { - default as KcAdminClient, -} from '@keycloak/keycloak-admin-client'; import { KeycloakClientPolicyService, KeycloakClientService, KeycloakGroupService, KeycloakUserService, } from '../keycloak'; -import GroupRepresentation from '@keycloak/keycloak-admin-client/lib/defs/groupRepresentation'; -import ClientScopeRepresentation from '@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation'; -import PolicyRepresentation, { +import { + GroupRepresentation, + ClientScopeRepresentation, + PolicyRepresentation, + UserRepresentation, DecisionStrategy, Logic, -} from '@keycloak/keycloak-admin-client/lib/defs/policyRepresentation'; -import UserRepresentation from '@keycloak/keycloak-admin-client/lib/defs/userRepresentation'; -import ResourceServerRepresentation from '@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation'; +} from '@packages/keycloak-admin-client'; import { root } from './group-converter-utils'; import { User } from '../keystone/types'; @@ -93,6 +90,14 @@ export class OrgGroupService { public async backfillGroups(): Promise { this.groups = await this.keycloakService.getAllGroups(); + await this.traverseBackfill(this.groups); + } + + private async traverseBackfill(groups: GroupRepresentation[]): Promise { + for (const group of groups) { + await this.keycloakService.setSubGroups(group); + await this.traverseBackfill(group.subGroups); + } } public findGroup(id: string): string { diff --git a/src/test/integrated/keycloak/groups.ts b/src/test/integrated/keycloak/groups.ts index dc6f37719..9fa90dacb 100644 --- a/src/test/integrated/keycloak/groups.ts +++ b/src/test/integrated/keycloak/groups.ts @@ -16,7 +16,7 @@ node dist/test/integrated/keycloak/groups.js import { o } from '../util'; -import { KeycloakGroupService } from '../../../services/keycloak'; +import { KeycloakGroupService } from '../../../services/keycloak/group-service'; (async () => { const kc = new KeycloakGroupService(process.env.ISSUER); @@ -28,8 +28,10 @@ import { KeycloakGroupService } from '../../../services/keycloak'; //const groups = await kc.search('orgcontrol'); //o(groups); - const groupByName = await kc.findByName('ns', 'simple', false); - o(groupByName); + const groupByNameSearched = await kc.findByName('ns', 'gw-f33e5', false); + o(groupByNameSearched); + const groupByName = await kc.getGroup('ns', 'gw-f33e5'); + o(groupByName); // console.log(await kc.listMembers('660cadef-9233-4532-ba45-5393beaddea4')); })(); diff --git a/src/test/integrated/org-groups/index.ts b/src/test/integrated/org-groups/index.ts index fefa95078..95653a1c8 100644 --- a/src/test/integrated/org-groups/index.ts +++ b/src/test/integrated/org-groups/index.ts @@ -21,7 +21,9 @@ import { o } from '../util'; (async () => { const kc = new OrgGroupService(process.env.ISSUER); - await (await kc.login(process.env.CID, process.env.CSC)).backfillGroups(); + await kc.login(process.env.CID, process.env.CSC); + + await kc.backfillGroups(); const org = { name: 'databc', @@ -33,11 +35,11 @@ import { o } from '../util'; parent: '/data-custodian/ministry-citizens-services', }; - console.log(JSON.stringify(await kc.listMembers(org), null, 4)); + // console.log(JSON.stringify(await kc.listMembers(org), null, 4)); - console.log(await kc.getValidRoles()); - console.log(await kc.getGroupPathsByGroupName('ministry-citizens-services')); - console.log(await kc.getGroupPathsByGroupName('databc')); + // console.log(await kc.getValidRoles()); + // console.log(await kc.getGroupPathsByGroupName('ministry-citizens-services')); + // console.log(await kc.getGroupPathsByGroupName('databc')); if (false) { await kc.createGroupIfMissing(org); @@ -103,10 +105,20 @@ import { o } from '../util'; ); } - const result = await kc.getPermissionsForGroupPolicy(org, 'org/databc'); - o(result); + if (false) { + const result = await kc.getPermissionsForGroupPolicy( + org, + 'org/ministry-of-health' + ); + o(result); + } if (true) { + const resourceId = '8fb82265-8e8d-4cc5-b967-f231d4cab7ce'; + const res = await kc.getGroupPermissionsByResource(resourceId); + o(res); + } + if (false) { await kc.createOrUpdateOrgPermission(org, [ 'Namespace.View', 'Namepsace.Manage', diff --git a/src/yarn.lock b/src/yarn.lock index d59147c0b..f9916c640 100644 --- a/src/yarn.lock +++ b/src/yarn.lock @@ -671,12 +671,13 @@ dependencies: tslib "~2.0.1" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.24.6", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.6.tgz" + integrity sha512-ZJhac6FkEd1yhG2AHOmfcXG4ceoLltoCVJjN5XsWN9BifBQr+cHJbWi0h68HZuSORq+3WtJ2z0hwF2NG1b5kcA== dependencies: - "@babel/highlight" "^7.16.7" + "@babel/highlight" "^7.24.6" + picocolors "^1.0.0" "@babel/code-frame@7.10.4": version "7.10.4" @@ -784,12 +785,12 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-annotate-as-pure@^7.16.0", "@babel/helper-annotate-as-pure@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz" - integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw== +"@babel/helper-annotate-as-pure@^7.16.0", "@babel/helper-annotate-as-pure@^7.16.7", "@babel/helper-annotate-as-pure@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.6.tgz" + integrity sha512-DitEzDfOMnd13kZnDqns1ccmftwJTS9DMkyn9pYTxulS7bZxUxpMly3Nf23QQ6NwA4UB8lAqjbqWtyvElEMAkg== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.24.6" "@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": version "7.16.7" @@ -810,17 +811,19 @@ semver "^6.3.0" "@babel/helper-create-class-features-plugin@^7.10.4", "@babel/helper-create-class-features-plugin@^7.12.1", "@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.6", "@babel/helper-create-class-features-plugin@^7.17.9": - version "7.17.9" - resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.9.tgz" - integrity sha512-kUjip3gruz6AJKOq5i3nC6CoCEEF/oHH3cp6tOZhB+IyyyPyW0g1Gfsxn3mkk6S08pIA2y8GQh609v9G/5sHVQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.16.7" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-member-expression-to-functions" "^7.17.7" - "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/helper-replace-supers" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.6.tgz" + integrity sha512-djsosdPJVZE6Vsw3kk7IPRWethP94WHGOhQTc67SNXE0ZzMhHgALw8iGmYS0TD1bbMM0VDROy43od7/hN6WYcA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.6" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-function-name" "^7.24.6" + "@babel/helper-member-expression-to-functions" "^7.24.6" + "@babel/helper-optimise-call-expression" "^7.24.6" + "@babel/helper-replace-supers" "^7.24.6" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.6" + "@babel/helper-split-export-declaration" "^7.24.6" + semver "^6.3.1" "@babel/helper-create-regexp-features-plugin@^7.16.7": version "7.17.0" @@ -858,12 +861,10 @@ resolve "^1.14.2" semver "^6.1.2" -"@babel/helper-environment-visitor@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz" - integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== - dependencies: - "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz" + integrity sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g== "@babel/helper-explode-assignable-expression@^7.16.7": version "7.16.7" @@ -872,13 +873,13 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-function-name@^7.12.11", "@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9": - version "7.17.9" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz" - integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== +"@babel/helper-function-name@^7.12.11", "@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.17.9", "@babel/helper-function-name@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz" + integrity sha512-xpeLqeeRkbxhnYimfr2PC+iA0Q7ljX/d1eZ9/inYbmfG2jpl8Lu3DyXvpOAnrS5kxkfOWJjioIMQsaMBXFI05w== dependencies: - "@babel/template" "^7.16.7" - "@babel/types" "^7.17.0" + "@babel/template" "^7.24.6" + "@babel/types" "^7.24.6" "@babel/helper-hoist-variables@^7.16.7": version "7.16.7" @@ -887,12 +888,12 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": - version "7.17.7" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz" - integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw== +"@babel/helper-member-expression-to-functions@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.6.tgz" + integrity sha512-OTsCufZTxDUsv2/eDXanw/mUZHWOxSbEmC3pP8cgjcy5rgeVPWWMStnv274DV60JtHxTk0adT0QrCzC4M9NWGg== dependencies: - "@babel/types" "^7.17.0" + "@babel/types" "^7.24.6" "@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.0", "@babel/helper-module-imports@^7.16.7": version "7.16.7" @@ -915,17 +916,17 @@ "@babel/traverse" "^7.17.3" "@babel/types" "^7.17.0" -"@babel/helper-optimise-call-expression@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz" - integrity sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w== +"@babel/helper-optimise-call-expression@^7.16.7", "@babel/helper-optimise-call-expression@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.6.tgz" + integrity sha512-3SFDJRbx7KuPRl8XDUr8O7GAEB8iGyWPjLKJh/ywP/Iy9WOmEfMrsWbaZpvBu2HSYn4KQygIsz0O7m8y10ncMA== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.24.6" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.6.tgz" + integrity sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg== "@babel/helper-plugin-utils@7.10.4": version "7.10.4" @@ -941,16 +942,14 @@ "@babel/helper-wrap-function" "^7.16.8" "@babel/types" "^7.16.8" -"@babel/helper-replace-supers@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz" - integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== +"@babel/helper-replace-supers@^7.16.7", "@babel/helper-replace-supers@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.6.tgz" + integrity sha512-mRhfPwDqDpba8o1F8ESxsEkJMQkUF8ZIWrAc0FtWhxnjfextxMWxr22RtFizxxSYLjVHDeMgVsRq8BBZR2ikJQ== dependencies: - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-member-expression-to-functions" "^7.16.7" - "@babel/helper-optimise-call-expression" "^7.16.7" - "@babel/traverse" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/helper-environment-visitor" "^7.24.6" + "@babel/helper-member-expression-to-functions" "^7.24.6" + "@babel/helper-optimise-call-expression" "^7.24.6" "@babel/helper-simple-access@^7.10.4", "@babel/helper-simple-access@^7.17.7": version "7.17.7" @@ -959,24 +958,29 @@ dependencies: "@babel/types" "^7.17.0" -"@babel/helper-skip-transparent-expression-wrappers@^7.12.1", "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": - version "7.16.0" - resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz" - integrity sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw== +"@babel/helper-skip-transparent-expression-wrappers@^7.12.1", "@babel/helper-skip-transparent-expression-wrappers@^7.16.0", "@babel/helper-skip-transparent-expression-wrappers@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.6.tgz" + integrity sha512-jhbbkK3IUKc4T43WadP96a27oYti9gEf1LdyGSP2rHGH77kwLwfhO7TgwnWvxxQVmke0ImmCSS47vcuxEMGD3Q== dependencies: - "@babel/types" "^7.16.0" + "@babel/types" "^7.24.6" -"@babel/helper-split-export-declaration@^7.12.11", "@babel/helper-split-export-declaration@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz" - integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== +"@babel/helper-split-export-declaration@^7.12.11", "@babel/helper-split-export-declaration@^7.16.7", "@babel/helper-split-export-declaration@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz" + integrity sha512-CvLSkwXGWnYlF9+J3iZUvwgAxKiYzK3BWuo+mLzD/MDGOZDj7Gq8+hqaOkMxmJwmlv0iu86uH5fdADd9Hxkymw== dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.24.6" -"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-string-parser@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz" + integrity sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q== + +"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11", "@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz" + integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw== "@babel/helper-validator-option@^7.12.1", "@babel/helper-validator-option@^7.14.5", "@babel/helper-validator-option@^7.16.7": version "7.16.7" @@ -1002,19 +1006,20 @@ "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" -"@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": - version "7.17.9" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz" - integrity sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg== +"@babel/highlight@^7.10.4", "@babel/highlight@^7.24.6": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.6.tgz" + integrity sha512-2YnuOp4HAk2BsBrJJvYCbItHx0zWscI1C3zgWkz+wDyD9I7GIVrfnLyrR4Y1VR+7p+chAEcrgRQYZAGIKMV7vQ== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - chalk "^2.0.0" + "@babel/helper-validator-identifier" "^7.24.6" + chalk "^2.4.2" js-tokens "^4.0.0" + picocolors "^1.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.11", "@babel/parser@^7.12.3", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.9", "@babel/parser@^7.7.7": - version "7.17.9" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.17.9.tgz" - integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== +"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.11", "@babel/parser@^7.12.3", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.17.9", "@babel/parser@^7.24.6", "@babel/parser@^7.7.7": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.6.tgz" + integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q== "@babel/parser@7.12.11": version "7.12.11" @@ -2149,16 +2154,16 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.16.7", "@babel/template@^7.3.3", "@babel/template@^7.7.4": - version "7.16.7" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz" - integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== +"@babel/template@^7.10.4", "@babel/template@^7.12.7", "@babel/template@^7.16.7", "@babel/template@^7.24.6", "@babel/template@^7.3.3", "@babel/template@^7.7.4": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.24.6.tgz" + integrity sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw== dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/parser" "^7.16.7" - "@babel/types" "^7.16.7" + "@babel/code-frame" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2", "@babel/traverse@^7.7.4": +"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.11", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2", "@babel/traverse@^7.7.4": version "7.17.9" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.9.tgz" integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== @@ -2189,12 +2194,13 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.1", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.17.0" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz" - integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== +"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.1", "@babel/types@^7.12.11", "@babel/types@^7.12.7", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.2.0", "@babel/types@^7.24.6", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.24.6" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.24.6.tgz" + integrity sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" + "@babel/helper-string-parser" "^7.24.6" + "@babel/helper-validator-identifier" "^7.24.6" to-fast-properties "^2.0.0" "@babel/types@^7.11.5", "@babel/types@^7.7.4", "@babel/types@7.11.5": @@ -3065,6 +3071,11 @@ ts-node "^9" tslib "^2" +"@esbuild/darwin-arm64@0.24.0": + version "0.24.0" + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.0.tgz" + integrity sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw== + "@eslint/eslintrc@^0.3.0": version "0.3.0" resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.3.0.tgz" @@ -3950,18 +3961,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@keycloak/keycloak-admin-client@^17.0.0-dev.26": - version "17.0.1" - resolved "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-17.0.1.tgz" - integrity sha512-lgw6P7pGcJQbJExCE6+FpznDjadI571rCoSj2CmE8KAHu0BCsj2eqWP9HI3wb6zpkJwVQ86uLHTcsGvS8Ijjtw== +"@keycloak/keycloak-admin-client@^26.0.6": + version "26.0.6" + resolved "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-26.0.6.tgz" + integrity sha512-pZmaSAyg+LwQ3qnZF+01ZkURpcoEdLAloUK5KOZjE9jyNd86EHdx98/XmTYaJIuQ6ydMXxTWWc5Grq18H+PvJQ== dependencies: - axios "^0.25.0" - camelize-ts "^1.0.8" - keycloak-js "^16.0.0" - lodash "^4.17.21" - query-string "^7.0.1" - url-join "^4.0.0" - url-template "^2.0.8" + camelize-ts "^3.0.0" + url-join "^5.0.0" + url-template "^3.1.1" "@keystone-next/admin-ui-utils@^2.0.5": version "2.0.5" @@ -4998,6 +5005,12 @@ resolved "https://registry.npmjs.org/@open-draft/until/-/until-1.0.3.tgz" integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== +"@packages/keycloak-admin-client@file://./keycloak-admin-client": + version "1.0.0" + resolved "file:keycloak-admin-client" + dependencies: + "@keycloak/keycloak-admin-client" "^26.0.6" + "@panva/asn1.js@^1.0.0": version "1.0.0" resolved "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz" @@ -8435,13 +8448,6 @@ axios@^0.21.3: dependencies: follow-redirects "^1.14.0" -axios@^0.25.0: - version "0.25.0" - resolved "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz" - integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== - dependencies: - follow-redirects "^1.14.7" - axobject-query@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz" @@ -8749,10 +8755,10 @@ base@^0.11.1: mixin-deep "^1.2.0" pascalcase "^0.1.1" -base64-js@^1.0.2, base64-js@^1.3.1, base64-js@1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== +base64-js@^1.0.2, base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== base64url@^3.0.1: version "3.0.1" @@ -9368,10 +9374,10 @@ camelcase@5.0.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz" integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== -camelize-ts@^1.0.8: - version "1.0.9" - resolved "https://registry.npmjs.org/camelize-ts/-/camelize-ts-1.0.9.tgz" - integrity sha512-ePOW3V2qrQ0qtRlcTM6Qe3nXremdydIwsMKI1Vl2NBGM0tOo8n2xzJ7YOQpV1GIKHhs3p+F40ThI8/DoYWbYKQ== +camelize-ts@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/camelize-ts/-/camelize-ts-3.0.0.tgz" + integrity sha512-cgRwKKavoDKLTjO4FQTs3dRBePZp/2Y9Xpud0FhuCOTE86M2cniKN4CCXgRnsyXNMmQMifVHcv6SPaMtTx6ofQ== camelize@^1.0.0: version "1.0.0" @@ -9451,7 +9457,7 @@ chalk@^1.0.0, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -11061,9 +11067,9 @@ decimal.js@^10.2.1: integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== + version "0.2.2" + resolved "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz" + integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== decompress-response@^3.3.0: version "3.3.0" @@ -11895,6 +11901,36 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +esbuild@^0.24.0: + version "0.24.0" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz" + integrity sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ== + optionalDependencies: + "@esbuild/aix-ppc64" "0.24.0" + "@esbuild/android-arm" "0.24.0" + "@esbuild/android-arm64" "0.24.0" + "@esbuild/android-x64" "0.24.0" + "@esbuild/darwin-arm64" "0.24.0" + "@esbuild/darwin-x64" "0.24.0" + "@esbuild/freebsd-arm64" "0.24.0" + "@esbuild/freebsd-x64" "0.24.0" + "@esbuild/linux-arm" "0.24.0" + "@esbuild/linux-arm64" "0.24.0" + "@esbuild/linux-ia32" "0.24.0" + "@esbuild/linux-loong64" "0.24.0" + "@esbuild/linux-mips64el" "0.24.0" + "@esbuild/linux-ppc64" "0.24.0" + "@esbuild/linux-riscv64" "0.24.0" + "@esbuild/linux-s390x" "0.24.0" + "@esbuild/linux-x64" "0.24.0" + "@esbuild/netbsd-x64" "0.24.0" + "@esbuild/openbsd-arm64" "0.24.0" + "@esbuild/openbsd-x64" "0.24.0" + "@esbuild/sunos-x64" "0.24.0" + "@esbuild/win32-arm64" "0.24.0" + "@esbuild/win32-ia32" "0.24.0" + "@esbuild/win32-x64" "0.24.0" + escalade@^3.0.1, escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" @@ -12668,11 +12704,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -filter-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz" - integrity sha1-mzERErxsYSehbgFsbF1/GeCAXFs= sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== - finalhandler@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz" @@ -12840,7 +12871,7 @@ focus-trap@^6.7.3: dependencies: tabbable "^5.2.1" -follow-redirects@^1.0.0, follow-redirects@^1.14.0, follow-redirects@^1.14.7: +follow-redirects@^1.0.0, follow-redirects@^1.14.0: version "1.14.9" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== @@ -15740,11 +15771,6 @@ js-levenshtein@^1.1.6: resolved "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz" integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== -js-sha256@0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz" - integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== - js-string-escape@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz" @@ -16024,14 +16050,6 @@ keycloak-connect@^17.0.1: optionalDependencies: chromedriver latest -keycloak-js@^16.0.0: - version "16.1.1" - resolved "https://registry.npmjs.org/keycloak-js/-/keycloak-js-16.1.1.tgz" - integrity sha512-AkRNIJFSMLfQKIBKK31UL4FGI59MQFf68Bf8I+PFbOSKNtnfGVPYLiZeJgy03Kv5ddswHBjVZOY5T0f5RpZpLw== - dependencies: - base64-js "1.3.1" - js-sha256 "0.9.0" - keycode@^2.1.9: version "2.2.1" resolved "https://registry.npmjs.org/keycode/-/keycode-2.2.1.tgz" @@ -19581,16 +19599,6 @@ qs@6.7.0: resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== -query-string@^7.0.1: - version "7.1.1" - resolved "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz" - integrity sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w== - dependencies: - decode-uri-component "^0.2.0" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - query-string@5: version "5.1.1" resolved "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz" @@ -21406,10 +21414,10 @@ semver@^5.7.1: resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.2.1: version "7.3.6" @@ -21975,11 +21983,6 @@ spdx-license-ids@^3.0.0: resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz" integrity sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ== -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== - split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz" @@ -22141,11 +22144,6 @@ strict-uri-encode@^1.0.0: resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz" - integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== - string_decoder@^1.0.0, string_decoder@^1.1.1, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" @@ -23350,6 +23348,11 @@ typescript@^4.1.2, typescript@^4.1.3, typescript@4.2.4: resolved "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz" integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== +typescript@^5.7.2: + version "5.7.2" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== + typography-normalize@^0.16.19: version "0.16.19" resolved "https://registry.npmjs.org/typography-normalize/-/typography-normalize-0.16.19.tgz" @@ -23676,10 +23679,10 @@ urix@^0.1.0: resolved "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== -url-join@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz" - integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== +url-join@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz" + integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA== url-loader@^4.1.1: version "4.1.1" @@ -23705,10 +23708,10 @@ url-parse@^1.4.7: querystringify "^2.1.1" requires-port "^1.0.0" -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz" - integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw== +url-template@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/url-template/-/url-template-3.1.1.tgz" + integrity sha512-4oszoaEKE/mQOtAmdMWqIRHmkxWkUZMnXFnjQ5i01CuRSK3uluxcH1MRVVVWmhlnzT1SCDfKxxficm2G37qzCA== url@^0.11.0: version "0.11.0"