From 0cf432cc935bf33f018d237ff2033df02074743b Mon Sep 17 00:00:00 2001 From: Joost Diepenmaat Date: Fri, 5 Dec 2025 12:23:10 +0100 Subject: [PATCH 1/3] Connector: Fix typo in set-bearer-token interceptor --- connector/src/org/bdinetwork/connector/interceptors.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/src/org/bdinetwork/connector/interceptors.clj b/connector/src/org/bdinetwork/connector/interceptors.clj index e8c25d6..af6243d 100644 --- a/connector/src/org/bdinetwork/connector/interceptors.clj +++ b/connector/src/org/bdinetwork/connector/interceptors.clj @@ -181,7 +181,7 @@ ;; for adherence test of server :ishare/satellite-id association-id - :ishare/satellite-url association-url} + :ishare/satellite-base-url association-url} (ishare-request/access-token-request path) (ishare-client/exec))] From 25d3cee0876c8f9f7509f460a9381192c515e540 Mon Sep 17 00:00:00 2001 From: Joost Diepenmaat Date: Fri, 5 Dec 2025 12:42:41 +0100 Subject: [PATCH 2/3] Connector: test fix for set-bearer-token --- .../org/bdinetwork/connector/interceptors_test.clj | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/connector/test/org/bdinetwork/connector/interceptors_test.clj b/connector/test/org/bdinetwork/connector/interceptors_test.clj index 8e19111..746fafe 100644 --- a/connector/test/org/bdinetwork/connector/interceptors_test.clj +++ b/connector/test/org/bdinetwork/connector/interceptors_test.clj @@ -19,7 +19,10 @@ [org.bdinetwork.test.system-helpers :refer [association-system association-server-id - association-server-url]] + association-server-url + backend-connector-system + backend-connector-url + backend-connector-id]] [passage :as gateway] [passage.interceptors] [ring.adapter.jetty :refer [run-jetty]] @@ -124,11 +127,12 @@ (deftest set-bearer-token - (with-resources [_association-system (association-system)] + (with-resources [_backend-connector-system (backend-connector-system) + _association-system (association-system)] (let [{:keys [enter]} (interceptors/set-bearer-token) config (assoc client-config - :server-id association-server-id - :base-url association-server-url + :server-id backend-connector-id + :base-url backend-connector-url :association-id association-server-id :association-url association-server-url) ctx @(enter {} config)] From 9c7e347cf8339252ee5055572bf1336c55d2c57c Mon Sep 17 00:00:00 2001 From: Joost Diepenmaat Date: Fri, 5 Dec 2025 13:07:14 +0100 Subject: [PATCH 3/3] Fix set-bearer-token docstring --- connector/README.md | 12 ++++++------ .../src/org/bdinetwork/connector/interceptors.clj | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/connector/README.md b/connector/README.md index 9fed71c..2a2619d 100644 --- a/connector/README.md +++ b/connector/README.md @@ -257,12 +257,12 @@ Enforce BDI authentication on incoming requests and add "x-bdi-client-id" reques Responds with 401 Unauthorized when request is not allowed. Example: ``` -[bdi/authenticate {:server-id "EU.EORI.CONNECTOR" - :private-key #private-key "certs/connector.key.pem" - :public-key #public-key "certs/connector.cert.pem" - :x5c #x5c "certs/connector.x5c.pem" - :association-server-id "EU.EORI.ASSOCIATION-REGISTER" - :association-server-url "https://association-register.com"}] +[(bdi/authenticate {:server-id "EU.EORI.CONNECTOR" + :private-key #private-key "certs/connector.key.pem" + :public-key #public-key "certs/connector.cert.pem" + :x5c #x5c "certs/connector.x5c.pem" + :association-server-id "EU.EORI.ASSOCIATION-REGISTER" + :association-server-url "https://association-register.com"})] ``` --- diff --git a/connector/src/org/bdinetwork/connector/interceptors.clj b/connector/src/org/bdinetwork/connector/interceptors.clj index af6243d..0287462 100644 --- a/connector/src/org/bdinetwork/connector/interceptors.clj +++ b/connector/src/org/bdinetwork/connector/interceptors.clj @@ -34,12 +34,12 @@ Responds with 401 Unauthorized when request is not allowed. Example: ``` - [bdi/authenticate {:server-id \"EU.EORI.CONNECTOR\" - :private-key #private-key \"certs/connector.key.pem\" - :public-key #public-key \"certs/connector.cert.pem\" - :x5c #x5c \"certs/connector.x5c.pem\" - :association-server-id \"EU.EORI.ASSOCIATION-REGISTER\" - :association-server-url \"https://association-register.com\"}] + [(bdi/authenticate {:server-id \"EU.EORI.CONNECTOR\" + :private-key #private-key \"certs/connector.key.pem\" + :public-key #public-key \"certs/connector.cert.pem\" + :x5c #x5c \"certs/connector.x5c.pem\" + :association-server-id \"EU.EORI.ASSOCIATION-REGISTER\" + :association-server-url \"https://association-register.com\"})] ```" [config] {:enter