diff --git a/installer-graph/src/juxt/site/install/common_install_util.clj b/installer-graph/src/juxt/site/install/common_install_util.clj index 6f5637944..84049c57a 100644 --- a/installer-graph/src/juxt/site/install/common_install_util.clj +++ b/installer-graph/src/juxt/site/install/common_install_util.clj @@ -252,9 +252,9 @@ :juxt.site/events-base-uri (str (get uri-map "https://auth.example.org") "/_site/events/") :juxt.site/methods {:get - {:juxt.site/operation (str (get-in uri-map ["https://auth.example.org"]) "/_site/operations/get-bundle-by-id")} + {:juxt.site/operation-uri (str (get-in uri-map ["https://auth.example.org"]) "/_site/operations/get-bundle-by-id")} :delete - {:juxt.site/operation (str (get-in uri-map ["https://auth.example.org"]) "/_site/operations/delete-bundle-by-id")}}}) + {:juxt.site/operation-uri (str (get-in uri-map ["https://auth.example.org"]) "/_site/operations/delete-bundle-by-id")}}}) (def ^:dynamic *working-dir* nil) diff --git a/installers/auth.example.org/_site/operations/install-not-found.edn b/installers/auth.example.org/_site/operations/install-not-found.edn index 828e4d1aa..cccb41eee 100644 --- a/installers/auth.example.org/_site/operations/install-not-found.edn +++ b/installers/auth.example.org/_site/operations/install-not-found.edn @@ -36,7 +36,7 @@ :juxt.site/type "https://meta.juxt.site/types/not-found" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/_site/operations/get-not-found"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/_site/operations/get-not-found"}} :juxt.site/access-control-allow-origins [[".*" {:juxt.site/access-control-allow-origin "*" diff --git a/installers/auth.example.org/_site/permissions/SiteAdmin/all-bundles.edn b/installers/auth.example.org/_site/permissions/SiteAdmin/all-bundles.edn index 5223a609b..e220fdf05 100644 --- a/installers/auth.example.org/_site/permissions/SiteAdmin/all-bundles.edn +++ b/installers/auth.example.org/_site/permissions/SiteAdmin/all-bundles.edn @@ -5,5 +5,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/_site/operations/all-bundles" + :juxt.site/operation-uri "https://auth.example.org/_site/operations/all-bundles" :juxt.site/role "https://data.example.org/_site/roles/SiteAdmin"}}} diff --git a/installers/auth.example.org/_site/permissions/SiteAdmin/create-operation.edn b/installers/auth.example.org/_site/permissions/SiteAdmin/create-operation.edn index dc947e107..646c7667f 100644 --- a/installers/auth.example.org/_site/permissions/SiteAdmin/create-operation.edn +++ b/installers/auth.example.org/_site/permissions/SiteAdmin/create-operation.edn @@ -5,5 +5,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/_site/operations/create-operation" + :juxt.site/operation-uri "https://auth.example.org/_site/operations/create-operation" :juxt.site/role "https://data.example.org/_site/roles/SiteAdmin"}}} diff --git a/installers/auth.example.org/_site/permissions/SiteAdmin/delete-bundle-by-id.edn b/installers/auth.example.org/_site/permissions/SiteAdmin/delete-bundle-by-id.edn index f158a05e4..95597c0da 100644 --- a/installers/auth.example.org/_site/permissions/SiteAdmin/delete-bundle-by-id.edn +++ b/installers/auth.example.org/_site/permissions/SiteAdmin/delete-bundle-by-id.edn @@ -5,5 +5,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/_site/operations/delete-bundle-by-id" + :juxt.site/operation-uri "https://auth.example.org/_site/operations/delete-bundle-by-id" :juxt.site/role "https://data.example.org/_site/roles/SiteAdmin"}}} diff --git a/installers/auth.example.org/_site/permissions/SiteAdmin/get-bundle-by-id.edn b/installers/auth.example.org/_site/permissions/SiteAdmin/get-bundle-by-id.edn index e516d90ab..6c5f34950 100644 --- a/installers/auth.example.org/_site/permissions/SiteAdmin/get-bundle-by-id.edn +++ b/installers/auth.example.org/_site/permissions/SiteAdmin/get-bundle-by-id.edn @@ -5,5 +5,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/_site/operations/get-bundle-by-id" + :juxt.site/operation-uri "https://auth.example.org/_site/operations/get-bundle-by-id" :juxt.site/role "https://data.example.org/_site/roles/SiteAdmin"}}} diff --git a/installers/auth.example.org/_site/permissions/SiteAdmin/grant-permission.edn b/installers/auth.example.org/_site/permissions/SiteAdmin/grant-permission.edn index cdbd623c3..f4dff72fb 100644 --- a/installers/auth.example.org/_site/permissions/SiteAdmin/grant-permission.edn +++ b/installers/auth.example.org/_site/permissions/SiteAdmin/grant-permission.edn @@ -5,5 +5,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/_site/operations/grant-permission" + :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/role "https://data.example.org/_site/roles/SiteAdmin"}}} diff --git a/installers/auth.example.org/_site/permissions/get-not-found.edn b/installers/auth.example.org/_site/permissions/get-not-found.edn index 81dcac2dc..9a91b5852 100644 --- a/installers/auth.example.org/_site/permissions/get-not-found.edn +++ b/installers/auth.example.org/_site/permissions/get-not-found.edn @@ -8,4 +8,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/_site/operations/get-not-found"}}} + :juxt.site/operation-uri "https://auth.example.org/_site/operations/get-not-found"}}} diff --git a/installers/auth.example.org/_site/permissions/system/bootstrap.edn b/installers/auth.example.org/_site/permissions/system/bootstrap.edn index 48f0a8960..1fac6fd95 100644 --- a/installers/auth.example.org/_site/permissions/system/bootstrap.edn +++ b/installers/auth.example.org/_site/permissions/system/bootstrap.edn @@ -3,7 +3,7 @@ ;; tag::install-system-permissions![] {:xt/id "{{$id}}" :juxt.site/type "https://meta.juxt.site/types/permission" - :juxt.site/operation #{"https://auth.example.org/_site/operations/create-operation" + :juxt.site/operation-uri #{"https://auth.example.org/_site/operations/create-operation" "https://auth.example.org/_site/operations/grant-permission"} :juxt.site/subject "https://auth.example.org/_site/subjects/system" } diff --git a/installers/auth.example.org/_site/permissions/system/install-not-found.edn b/installers/auth.example.org/_site/permissions/system/install-not-found.edn index 654bb81ec..cdef797a4 100644 --- a/installers/auth.example.org/_site/permissions/system/install-not-found.edn +++ b/installers/auth.example.org/_site/permissions/system/install-not-found.edn @@ -9,4 +9,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/_site/operations/install-not-found"}}} + :juxt.site/operation-uri "https://auth.example.org/_site/operations/install-not-found"}}} diff --git a/installers/auth.example.org/operations/assign-role.edn b/installers/auth.example.org/operations/assign-role.edn index 3b727a37b..1c15a9b22 100644 --- a/installers/auth.example.org/operations/assign-role.edn +++ b/installers/auth.example.org/operations/assign-role.edn @@ -49,7 +49,7 @@ :xt/id (format "https://data.example.org/_site/role-assignments/%s-%s" (or username client-id) rolename) :juxt.site/type "https://meta.juxt.site/types/role-assignment" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-role-assignment"}})))} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-role-assignment"}})))} :juxt.site/transact {:juxt.site.sci/program @@ -61,7 +61,7 @@ ;; This operation can be performed via its URI :juxt.site/methods - {:post {:juxt.site/operation "{{$id}}" + {:post {:juxt.site/operation-uri "{{$id}}" :juxt.site/acceptable {"accept" "application/json,application/edn"}}} :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} diff --git a/installers/auth.example.org/operations/create-login-resource.edn b/installers/auth.example.org/operations/create-login-resource.edn index 546a626fc..9582e6997 100644 --- a/installers/auth.example.org/operations/create-login-resource.edn +++ b/installers/auth.example.org/operations/create-login-resource.edn @@ -32,8 +32,8 @@ juxt.site.malli/validate-input (assoc :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"} - :post {:juxt.site/operation "https://auth.example.org/operations/login"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"} + :post {:juxt.site/operation-uri "https://auth.example.org/operations/login"}} :juxt.http/content-type "text/html;charset=utf-8" ;; TODO: We could make the HTML content a parameter diff --git a/installers/auth.example.org/operations/create-logout-resource.edn b/installers/auth.example.org/operations/create-logout-resource.edn index cbc95ffbd..362a74dda 100644 --- a/installers/auth.example.org/operations/create-logout-resource.edn +++ b/installers/auth.example.org/operations/create-logout-resource.edn @@ -31,7 +31,7 @@ juxt.site.malli/validate-input (assoc :juxt.site/methods - {:post {:juxt.site/operation "https://auth.example.org/operations/logout"}}))))} + {:post {:juxt.site/operation-uri "https://auth.example.org/operations/logout"}}))))} :juxt.site/transact {:juxt.site.sci/program diff --git a/installers/auth.example.org/operations/get-api-endpoints.edn b/installers/auth.example.org/operations/get-api-endpoints.edn index 645f0dc5f..98c611eea 100644 --- a/installers/auth.example.org/operations/get-api-endpoints.edn +++ b/installers/auth.example.org/operations/get-api-endpoints.edn @@ -22,10 +22,10 @@ '{:find [(pull e [*])] :where [[e :juxt.site/type "https://meta.juxt.site/types/api-endpoint"]]}) (map first)) - [method {operation :juxt.site/operation}] (:juxt.site/methods endpoint)] + [method {operation-uri :juxt.site/operation-uri}] (:juxt.site/methods endpoint)] {:uri (:xt/id endpoint) :method (clojure.string/upper-case (name method)) - :operation-uri operation})} + :operation-uri operation-uri})} :juxt.site/scope #{"https://auth.example.org/scopes/system/read"} diff --git a/installers/auth.example.org/operations/get-openapi-document.edn b/installers/auth.example.org/operations/get-openapi-document.edn index e8e95d317..443ffb559 100644 --- a/installers/auth.example.org/operations/get-openapi-document.edn +++ b/installers/auth.example.org/operations/get-openapi-document.edn @@ -54,7 +54,7 @@ allowed-operations)) (assoc (name method) - (let [operation (xt/entity (:juxt.site/operation method-details)) + (let [operation (xt/entity (:juxt.site/operation-uri method-details)) scope (:juxt.site/scope operation)] (merge {"operationId" (:xt/id operation)} diff --git a/installers/auth.example.org/operations/install-openid-callback-endpoint.edn b/installers/auth.example.org/operations/install-openid-callback-endpoint.edn index 88efdb397..5ac00e692 100644 --- a/installers/auth.example.org/operations/install-openid-callback-endpoint.edn +++ b/installers/auth.example.org/operations/install-openid-callback-endpoint.edn @@ -33,7 +33,7 @@ (assoc :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/openid/exchange-code-for-id-token"}} + {:juxt.site/operation-uri "https://auth.example.org/operations/openid/exchange-code-for-id-token"}} :juxt.http/content-type "text/html;charset=utf-8" :juxt.http/content "
This should redirect
"))))} diff --git a/installers/auth.example.org/operations/install-openid-login-endpoint.edn b/installers/auth.example.org/operations/install-openid-login-endpoint.edn index 3ad35b7e1..3b9bebc41 100644 --- a/installers/auth.example.org/operations/install-openid-login-endpoint.edn +++ b/installers/auth.example.org/operations/install-openid-login-endpoint.edn @@ -35,7 +35,7 @@ (assoc :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/login-with-openid"}} + {:juxt.site/operation-uri "https://auth.example.org/operations/login-with-openid"}} :juxt.http/content-type "text/html;charset=utf-8" :juxt.http/content "This should redirect
"))))} diff --git a/installers/auth.example.org/operations/oauth/install-authorize-endpoint.edn b/installers/auth.example.org/operations/oauth/install-authorize-endpoint.edn index 9062e19f3..ce590a3a9 100644 --- a/installers/auth.example.org/operations/oauth/install-authorize-endpoint.edn +++ b/installers/auth.example.org/operations/oauth/install-authorize-endpoint.edn @@ -25,8 +25,8 @@ juxt.site.malli/validate-input (assoc :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/oauth/view-owned-authorizations"} - :post {:juxt.site/operation "https://auth.example.org/operations/oauth/authorize"}}))))} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/view-owned-authorizations"} + :post {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/authorize"}}))))} :juxt.site/transact {:juxt.site.sci/program diff --git a/installers/auth.example.org/operations/oauth/install-jwks-document.edn b/installers/auth.example.org/operations/oauth/install-jwks-document.edn index a9dafcc40..07b48b57c 100644 --- a/installers/auth.example.org/operations/oauth/install-jwks-document.edn +++ b/installers/auth.example.org/operations/oauth/install-jwks-document.edn @@ -26,7 +26,7 @@ juxt.site.malli/validate-input (assoc :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/oauth/get-jwks-document"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-jwks-document"}} :juxt.http/content-type "application/json" :juxt.site/respond {:juxt.site.sci/program diff --git a/installers/auth.example.org/operations/oauth/install-metadata-endpoint.edn b/installers/auth.example.org/operations/oauth/install-metadata-endpoint.edn index 00f2e5491..355210207 100644 --- a/installers/auth.example.org/operations/oauth/install-metadata-endpoint.edn +++ b/installers/auth.example.org/operations/oauth/install-metadata-endpoint.edn @@ -26,7 +26,7 @@ juxt.site.malli/validate-input (assoc :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/oauth/get-authorization-server-metadata"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-authorization-server-metadata"}} :juxt.http/content-type "application/json" :juxt.site/respond {:juxt.site.sci/program diff --git a/installers/auth.example.org/operations/oauth/install-token-endpoint.edn b/installers/auth.example.org/operations/oauth/install-token-endpoint.edn index 69bd98331..e431409be 100644 --- a/installers/auth.example.org/operations/oauth/install-token-endpoint.edn +++ b/installers/auth.example.org/operations/oauth/install-token-endpoint.edn @@ -27,7 +27,7 @@ (assoc :juxt.site/methods {:post - {:juxt.site/operation "https://auth.example.org/operations/oauth/create-access-token" + {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/create-access-token" :juxt.site/acceptable {"accept" "application/x-www-form-urlencoded"}}}))))} :juxt.site/transact diff --git a/installers/auth.example.org/operations/oauth/install-token-introspection-endpoint.edn b/installers/auth.example.org/operations/oauth/install-token-introspection-endpoint.edn index e19cc0c29..2493f74b2 100644 --- a/installers/auth.example.org/operations/oauth/install-token-introspection-endpoint.edn +++ b/installers/auth.example.org/operations/oauth/install-token-introspection-endpoint.edn @@ -41,7 +41,7 @@ #_:get #_{:juxt.site/operation "https://auth.example.org/operations/oauth/get-introspect-token-form"} :post - {:juxt.site/operation "https://auth.example.org/operations/oauth/introspect-token" + {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/introspect-token" :juxt.site/acceptable {"accept" "application/x-www-form-urlencoded"}}}))))} :juxt.site/transact diff --git a/installers/auth.example.org/operations/petstore/add-pet-prepare.clj b/installers/auth.example.org/operations/petstore/add-pet-prepare.clj index 2e4e05411..9c64a7d8c 100644 --- a/installers/auth.example.org/operations/petstore/add-pet-prepare.clj +++ b/installers/auth.example.org/operations/petstore/add-pet-prepare.clj @@ -25,13 +25,13 @@ :juxt.site/type "https://data.example.org/types/pet" :juxt.site/methods {:get - {:juxt.site/operation + {:juxt.site/operation-uri "https://auth.example.org/operations/petstore/get-pet-by-id"} :delete - {:juxt.site/operation + {:juxt.site/operation-uri "https://auth.example.org/operations/petstore/delete-pet-by-id"} :post - {:juxt.site/operation + {:juxt.site/operation-uri "https://auth.example.org/operations/petstore/update-pet-by-id"}} :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} diff --git a/installers/auth.example.org/operations/petstore/order/place.edn b/installers/auth.example.org/operations/petstore/order/place.edn index 27410f111..1eb4f8732 100644 --- a/installers/auth.example.org/operations/petstore/order/place.edn +++ b/installers/auth.example.org/operations/petstore/order/place.edn @@ -35,10 +35,10 @@ :juxt.site/type "https://data.example.org/types/order" :juxt.site/methods {:get - {:juxt.site/operation + {:juxt.site/operation-uri "https://auth.example.org/operations/petstore/order/get-by-id"} :delete - {:juxt.site/operation + {:juxt.site/operation-uri "https://auth.example.org/operations/petstore/order/delete-by-id"}} :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} diff --git a/installers/auth.example.org/operations/post-openapi.edn b/installers/auth.example.org/operations/post-openapi.edn index 029bb2eff..04ec9ede0 100644 --- a/installers/auth.example.org/operations/post-openapi.edn +++ b/installers/auth.example.org/operations/post-openapi.edn @@ -45,7 +45,7 @@ {:xt/id (str base-uri "/openapi.json") :juxt.site/type "https://meta.juxt.site/types/openapi-document" :juxt.http/content-type "application/json" - :juxt.site/methods {:get {:juxt.site/operation "https://auth.example.org/operations/get-openapi-document"}} + :juxt.site/methods {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-openapi-document"}} :openapi.v3/definition openapi :juxt.site/access-control-allow-origins @@ -69,7 +69,7 @@ (for [[method operation] path-obj :let [request-body (get operation "requestBody")]] [(keyword method) - (cond-> {:juxt.site/operation (get operation "operationId") + (cond-> {:juxt.site/operation-uri (get operation "operationId") :openapi.v3/metadata operation} request-body (assoc :juxt.site/acceptable @@ -96,7 +96,7 @@ (for [[method operation] path-obj :let [request-body (get operation "requestBody")]] [(keyword method) - (cond-> {:juxt.site/operation (get operation "operationId")} + (cond-> {:juxt.site/operation-uri (get operation "operationId")} request-body (assoc :juxt.site/acceptable (clojure.string/join "," (keys (get request-body "content")))))])) diff --git a/installers/auth.example.org/operations/put-openapi-document.edn b/installers/auth.example.org/operations/put-openapi-document.edn index 1053b0a39..e1e22553d 100644 --- a/installers/auth.example.org/operations/put-openapi-document.edn +++ b/installers/auth.example.org/operations/put-openapi-document.edn @@ -39,7 +39,7 @@ {:juxt.site/type "https://meta.juxt.site/types/openapi-document" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-openapi-document"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-openapi-document"}} :juxt.site/access-control-allow-origins [[".*" {:juxt.site/access-control-allow-origin "*" diff --git a/installers/auth.example.org/operations/put-role.edn b/installers/auth.example.org/operations/put-role.edn index 1bc4b8f4c..82554d2a8 100644 --- a/installers/auth.example.org/operations/put-role.edn +++ b/installers/auth.example.org/operations/put-role.edn @@ -29,7 +29,7 @@ (assoc :juxt.site/type "https://meta.juxt.site/types/role" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-role"}}))))} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-role"}}))))} :juxt.site/transact {:juxt.site.sci/program diff --git a/installers/auth.example.org/operations/put-user.edn b/installers/auth.example.org/operations/put-user.edn index f215d8262..3d3b25cf0 100644 --- a/installers/auth.example.org/operations/put-user.edn +++ b/installers/auth.example.org/operations/put-user.edn @@ -56,7 +56,7 @@ :juxt.site/username username :juxt.site/type "https://meta.juxt.site/types/user" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-user"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-user"}} :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} :juxt.site/access-control-allow-origins @@ -67,7 +67,7 @@ base {:juxt.site/variant-of user-uri :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-user"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-user"}} :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} :juxt.site/access-control-allow-origins [[".*" {:juxt.site/access-control-allow-origin "*" diff --git a/installers/auth.example.org/operations/register-openid-user-identity.edn b/installers/auth.example.org/operations/register-openid-user-identity.edn index f880e3990..aa0abf437 100644 --- a/installers/auth.example.org/operations/register-openid-user-identity.edn +++ b/installers/auth.example.org/operations/register-openid-user-identity.edn @@ -39,7 +39,7 @@ (assoc :juxt.site/type #{"https://meta.juxt.site/types/user-identity" "https://meta.juxt.site/types/openid-user-identity"} :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-user-identity"} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-user-identity"} :options {}}))))} :juxt.site/transact diff --git a/installers/auth.example.org/operations/register-password-based-user-identity.edn b/installers/auth.example.org/operations/register-password-based-user-identity.edn index 1d13f86ef..7a2d85632 100644 --- a/installers/auth.example.org/operations/register-password-based-user-identity.edn +++ b/installers/auth.example.org/operations/register-password-based-user-identity.edn @@ -42,7 +42,7 @@ :juxt.site/type #{"https://meta.juxt.site/types/user-identity" "https://meta.juxt.site/types/basic-user-identity"} :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-user-identity"} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-user-identity"} :options {}}))] (-> input ;; We want usernames to be case-insensitive, as per OWASP diff --git a/installers/auth.example.org/permissions/by-role/{{role}}/{{operation}}.edn b/installers/auth.example.org/permissions/by-role/{{role}}/{{operation}}.edn index 1b49e62f9..519749ff7 100644 --- a/installers/auth.example.org/permissions/by-role/{{role}}/{{operation}}.edn +++ b/installers/auth.example.org/permissions/by-role/{{role}}/{{operation}}.edn @@ -3,5 +3,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/{{operation}}" + :juxt.site/operation-uri "https://auth.example.org/operations/{{operation}}" :juxt.site/role "https://data.example.org/_site/roles/{{role}}"}}} diff --git a/installers/auth.example.org/permissions/get-access-token.edn b/installers/auth.example.org/permissions/get-access-token.edn index 97d8f1fb8..302a172ae 100644 --- a/installers/auth.example.org/permissions/get-access-token.edn +++ b/installers/auth.example.org/permissions/get-access-token.edn @@ -5,4 +5,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/get-access-token"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/get-access-token"}}} diff --git a/installers/auth.example.org/permissions/get-openapi-document.edn b/installers/auth.example.org/permissions/get-openapi-document.edn index 9042dec8f..99ebfc66b 100644 --- a/installers/auth.example.org/permissions/get-openapi-document.edn +++ b/installers/auth.example.org/permissions/get-openapi-document.edn @@ -5,4 +5,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/get-openapi-document"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/get-openapi-document"}}} diff --git a/installers/auth.example.org/permissions/get-operations.edn b/installers/auth.example.org/permissions/get-operations.edn index 82ee9e4f7..8785e9e0e 100644 --- a/installers/auth.example.org/permissions/get-operations.edn +++ b/installers/auth.example.org/permissions/get-operations.edn @@ -5,4 +5,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/get-operations"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/get-operations"}}} diff --git a/installers/auth.example.org/permissions/get-unprotected-resource.edn b/installers/auth.example.org/permissions/get-unprotected-resource.edn index 7340e4a06..66aa334f3 100644 --- a/installers/auth.example.org/permissions/get-unprotected-resource.edn +++ b/installers/auth.example.org/permissions/get-unprotected-resource.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"}}} diff --git a/installers/auth.example.org/permissions/login-with-openid.edn b/installers/auth.example.org/permissions/login-with-openid.edn index c2fd81a18..648c5b9d4 100644 --- a/installers/auth.example.org/permissions/login-with-openid.edn +++ b/installers/auth.example.org/permissions/login-with-openid.edn @@ -5,4 +5,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/login-with-openid"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/login-with-openid"}}} diff --git a/installers/auth.example.org/permissions/login.edn b/installers/auth.example.org/permissions/login.edn index c09916e06..dafef6272 100644 --- a/installers/auth.example.org/permissions/login.edn +++ b/installers/auth.example.org/permissions/login.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/login"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/login"}}} diff --git a/installers/auth.example.org/permissions/logout.edn b/installers/auth.example.org/permissions/logout.edn index da33cf4f8..c3a4fa6db 100644 --- a/installers/auth.example.org/permissions/logout.edn +++ b/installers/auth.example.org/permissions/logout.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/logout"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/logout"}}} diff --git a/installers/auth.example.org/permissions/oauth/authorize.edn b/installers/auth.example.org/permissions/oauth/authorize.edn index f887691cb..401769bc5 100644 --- a/installers/auth.example.org/permissions/oauth/authorize.edn +++ b/installers/auth.example.org/permissions/oauth/authorize.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation #{"https://auth.example.org/operations/oauth/authorize"}}}} + :juxt.site/operation-uri #{"https://auth.example.org/operations/oauth/authorize"}}}} diff --git a/installers/auth.example.org/permissions/oauth/create-access-token.edn b/installers/auth.example.org/permissions/oauth/create-access-token.edn index e447986ff..0a6231a78 100644 --- a/installers/auth.example.org/permissions/oauth/create-access-token.edn +++ b/installers/auth.example.org/permissions/oauth/create-access-token.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation #{"https://auth.example.org/operations/oauth/create-access-token"}}}} + :juxt.site/operation-uri #{"https://auth.example.org/operations/oauth/create-access-token"}}}} diff --git a/installers/auth.example.org/permissions/oauth/get-authorization-server-metadata.edn b/installers/auth.example.org/permissions/oauth/get-authorization-server-metadata.edn index ad4765e6e..f51a8cb74 100644 --- a/installers/auth.example.org/permissions/oauth/get-authorization-server-metadata.edn +++ b/installers/auth.example.org/permissions/oauth/get-authorization-server-metadata.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/oauth/get-authorization-server-metadata"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-authorization-server-metadata"}}} diff --git a/installers/auth.example.org/permissions/oauth/get-introspect-token-form.edn b/installers/auth.example.org/permissions/oauth/get-introspect-token-form.edn index 96f660f02..dd80469c3 100644 --- a/installers/auth.example.org/permissions/oauth/get-introspect-token-form.edn +++ b/installers/auth.example.org/permissions/oauth/get-introspect-token-form.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/oauth/get-introspect-token-form"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-introspect-token-form"}}} diff --git a/installers/auth.example.org/permissions/oauth/get-jwks-document.edn b/installers/auth.example.org/permissions/oauth/get-jwks-document.edn index 8b852d57d..fdfabe309 100644 --- a/installers/auth.example.org/permissions/oauth/get-jwks-document.edn +++ b/installers/auth.example.org/permissions/oauth/get-jwks-document.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/oauth/get-jwks-document"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-jwks-document"}}} diff --git a/installers/auth.example.org/permissions/oauth/introspect-token.edn b/installers/auth.example.org/permissions/oauth/introspect-token.edn index 83d4716f1..26daf46ec 100644 --- a/installers/auth.example.org/permissions/oauth/introspect-token.edn +++ b/installers/auth.example.org/permissions/oauth/introspect-token.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/oauth/introspect-token"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/introspect-token"}}} diff --git a/installers/auth.example.org/permissions/oauth/view-owned-authorizations.edn b/installers/auth.example.org/permissions/oauth/view-owned-authorizations.edn index d6cd0097c..ad7ca4bcc 100644 --- a/installers/auth.example.org/permissions/oauth/view-owned-authorizations.edn +++ b/installers/auth.example.org/permissions/oauth/view-owned-authorizations.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation #{"https://auth.example.org/operations/oauth/view-owned-authorizations"}}}} + :juxt.site/operation-uri #{"https://auth.example.org/operations/oauth/view-owned-authorizations"}}}} diff --git a/installers/auth.example.org/permissions/openid/exchange-code-for-id-token.edn b/installers/auth.example.org/permissions/openid/exchange-code-for-id-token.edn index aa5790310..fe6a981df 100644 --- a/installers/auth.example.org/permissions/openid/exchange-code-for-id-token.edn +++ b/installers/auth.example.org/permissions/openid/exchange-code-for-id-token.edn @@ -5,4 +5,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/openid/exchange-code-for-id-token"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/openid/exchange-code-for-id-token"}}} diff --git a/installers/auth.example.org/permissions/system/assign-role.edn b/installers/auth.example.org/permissions/system/assign-role.edn index d9463b667..e52cd7960 100644 --- a/installers/auth.example.org/permissions/system/assign-role.edn +++ b/installers/auth.example.org/permissions/system/assign-role.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/assign-role"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/assign-role"}}} diff --git a/installers/auth.example.org/permissions/system/create-login-resource.edn b/installers/auth.example.org/permissions/system/create-login-resource.edn index 2330542b3..45fc37505 100644 --- a/installers/auth.example.org/permissions/system/create-login-resource.edn +++ b/installers/auth.example.org/permissions/system/create-login-resource.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/create-login-resource"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/create-login-resource"}}} diff --git a/installers/auth.example.org/permissions/system/create-logout-resource.edn b/installers/auth.example.org/permissions/system/create-logout-resource.edn index b20168a36..b5c33eb8d 100644 --- a/installers/auth.example.org/permissions/system/create-logout-resource.edn +++ b/installers/auth.example.org/permissions/system/create-logout-resource.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/create-logout-resource"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/create-logout-resource"}}} diff --git a/installers/auth.example.org/permissions/system/fetch-jwks.edn b/installers/auth.example.org/permissions/system/fetch-jwks.edn index 99165f2a5..ffe26393d 100644 --- a/installers/auth.example.org/permissions/system/fetch-jwks.edn +++ b/installers/auth.example.org/permissions/system/fetch-jwks.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/openid/fetch-jwks"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/openid/fetch-jwks"}}} diff --git a/installers/auth.example.org/permissions/system/generate-keypair.edn b/installers/auth.example.org/permissions/system/generate-keypair.edn index a768a3ab5..7e6d65a9a 100644 --- a/installers/auth.example.org/permissions/system/generate-keypair.edn +++ b/installers/auth.example.org/permissions/system/generate-keypair.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/generate-keypair"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/generate-keypair"}}} diff --git a/installers/auth.example.org/permissions/system/install-oauth-token-endpoint.edn b/installers/auth.example.org/permissions/system/install-oauth-token-endpoint.edn index 178123fcf..ce505b215 100644 --- a/installers/auth.example.org/permissions/system/install-oauth-token-endpoint.edn +++ b/installers/auth.example.org/permissions/system/install-oauth-token-endpoint.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/install-token-endpoint"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/install-token-endpoint"}}} diff --git a/installers/auth.example.org/permissions/system/install-openid-callback-endpoint.edn b/installers/auth.example.org/permissions/system/install-openid-callback-endpoint.edn index 1deefac6e..f97f0fcd6 100644 --- a/installers/auth.example.org/permissions/system/install-openid-callback-endpoint.edn +++ b/installers/auth.example.org/permissions/system/install-openid-callback-endpoint.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/install-openid-callback-endpoint"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/install-openid-callback-endpoint"}}} diff --git a/installers/auth.example.org/permissions/system/install-openid-login-endpoint.edn b/installers/auth.example.org/permissions/system/install-openid-login-endpoint.edn index be5b92a2b..23ec038d0 100644 --- a/installers/auth.example.org/permissions/system/install-openid-login-endpoint.edn +++ b/installers/auth.example.org/permissions/system/install-openid-login-endpoint.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/install-openid-login-endpoint"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/install-openid-login-endpoint"}}} diff --git a/installers/auth.example.org/permissions/system/install-token-introspection-endpoint.edn b/installers/auth.example.org/permissions/system/install-token-introspection-endpoint.edn index ce8b3b2f8..e30cf5eed 100644 --- a/installers/auth.example.org/permissions/system/install-token-introspection-endpoint.edn +++ b/installers/auth.example.org/permissions/system/install-token-introspection-endpoint.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/install-token-introspection-endpoint"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/install-token-introspection-endpoint"}}} diff --git a/installers/auth.example.org/permissions/system/oauth/install-authorize-endpoint.edn b/installers/auth.example.org/permissions/system/oauth/install-authorize-endpoint.edn index afb0a6309..f9c087c6f 100644 --- a/installers/auth.example.org/permissions/system/oauth/install-authorize-endpoint.edn +++ b/installers/auth.example.org/permissions/system/oauth/install-authorize-endpoint.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/install-authorize-endpoint"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/install-authorize-endpoint"}}} diff --git a/installers/auth.example.org/permissions/system/oauth/install-jwks-document.edn b/installers/auth.example.org/permissions/system/oauth/install-jwks-document.edn index 986c28f7b..0e8ede306 100644 --- a/installers/auth.example.org/permissions/system/oauth/install-jwks-document.edn +++ b/installers/auth.example.org/permissions/system/oauth/install-jwks-document.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/install-jwks-document"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/install-jwks-document"}}} diff --git a/installers/auth.example.org/permissions/system/oauth/install-metadata-endpoint.edn b/installers/auth.example.org/permissions/system/oauth/install-metadata-endpoint.edn index 9db0882e3..49b5cb938 100644 --- a/installers/auth.example.org/permissions/system/oauth/install-metadata-endpoint.edn +++ b/installers/auth.example.org/permissions/system/oauth/install-metadata-endpoint.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/install-metadata-endpoint"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/install-metadata-endpoint"}}} diff --git a/installers/auth.example.org/permissions/system/oauth/register-scope.edn b/installers/auth.example.org/permissions/system/oauth/register-scope.edn index f2dda7b2a..93951db61 100644 --- a/installers/auth.example.org/permissions/system/oauth/register-scope.edn +++ b/installers/auth.example.org/permissions/system/oauth/register-scope.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/register-scope"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/register-scope"}}} diff --git a/installers/auth.example.org/permissions/system/put-openapi-document.edn b/installers/auth.example.org/permissions/system/put-openapi-document.edn index 530485856..319322afb 100644 --- a/installers/auth.example.org/permissions/system/put-openapi-document.edn +++ b/installers/auth.example.org/permissions/system/put-openapi-document.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-openapi-document"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-openapi-document"}}} diff --git a/installers/auth.example.org/permissions/system/put-protection-space.edn b/installers/auth.example.org/permissions/system/put-protection-space.edn index 6f8305f53..0e3204146 100644 --- a/installers/auth.example.org/permissions/system/put-protection-space.edn +++ b/installers/auth.example.org/permissions/system/put-protection-space.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-protection-space"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-protection-space"}}} diff --git a/installers/auth.example.org/permissions/system/put-resource.edn b/installers/auth.example.org/permissions/system/put-resource.edn index 9e61bfe84..09ff207fa 100644 --- a/installers/auth.example.org/permissions/system/put-resource.edn +++ b/installers/auth.example.org/permissions/system/put-resource.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-resource"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-resource"}}} diff --git a/installers/auth.example.org/permissions/system/put-role.edn b/installers/auth.example.org/permissions/system/put-role.edn index e14306d8c..c50550456 100644 --- a/installers/auth.example.org/permissions/system/put-role.edn +++ b/installers/auth.example.org/permissions/system/put-role.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-role"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-role"}}} diff --git a/installers/auth.example.org/permissions/system/put-session-scope.edn b/installers/auth.example.org/permissions/system/put-session-scope.edn index 9823b4eae..65eb99597 100644 --- a/installers/auth.example.org/permissions/system/put-session-scope.edn +++ b/installers/auth.example.org/permissions/system/put-session-scope.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-session-scope"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-session-scope"}}} diff --git a/installers/auth.example.org/permissions/system/put-template.edn b/installers/auth.example.org/permissions/system/put-template.edn index 7d1ca9ba1..9745ca21a 100644 --- a/installers/auth.example.org/permissions/system/put-template.edn +++ b/installers/auth.example.org/permissions/system/put-template.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-template"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-template"}}} diff --git a/installers/auth.example.org/permissions/system/put-user.edn b/installers/auth.example.org/permissions/system/put-user.edn index 75e434997..6b1c591e2 100644 --- a/installers/auth.example.org/permissions/system/put-user.edn +++ b/installers/auth.example.org/permissions/system/put-user.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/put-user"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/put-user"}}} diff --git a/installers/auth.example.org/permissions/system/register-application.edn b/installers/auth.example.org/permissions/system/register-application.edn index 650a7eaad..9f1249ae0 100644 --- a/installers/auth.example.org/permissions/system/register-application.edn +++ b/installers/auth.example.org/permissions/system/register-application.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/oauth/register-application"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/oauth/register-application"}}} diff --git a/installers/auth.example.org/permissions/system/register-password-based-user-identity.edn b/installers/auth.example.org/permissions/system/register-password-based-user-identity.edn index e48fc2c4a..b89c4f1c4 100644 --- a/installers/auth.example.org/permissions/system/register-password-based-user-identity.edn +++ b/installers/auth.example.org/permissions/system/register-password-based-user-identity.edn @@ -6,4 +6,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/register-password-based-user-identity"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/register-password-based-user-identity"}}} diff --git a/installers/auth.example.org/permissions/system/test-logging.edn b/installers/auth.example.org/permissions/system/test-logging.edn index b17bbd8ea..b795f1ee2 100644 --- a/installers/auth.example.org/permissions/system/test-logging.edn +++ b/installers/auth.example.org/permissions/system/test-logging.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://auth.example.org/operations/test-logging"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/test-logging"}}} diff --git a/installers/auth.example.org/permissions/testing/basic-auth-protected-resource-operation.edn b/installers/auth.example.org/permissions/testing/basic-auth-protected-resource-operation.edn index cce442aaf..5326130a2 100644 --- a/installers/auth.example.org/permissions/testing/basic-auth-protected-resource-operation.edn +++ b/installers/auth.example.org/permissions/testing/basic-auth-protected-resource-operation.edn @@ -3,4 +3,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/testing/basic-auth-protected-resource-operation"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/testing/basic-auth-protected-resource-operation"}}} diff --git a/installers/auth.example.org/permissions/whoami.edn b/installers/auth.example.org/permissions/whoami.edn index 666a7c0bb..c2bb4bce3 100644 --- a/installers/auth.example.org/permissions/whoami.edn +++ b/installers/auth.example.org/permissions/whoami.edn @@ -5,4 +5,4 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/whoami"}}} + :juxt.site/operation-uri "https://auth.example.org/operations/whoami"}}} diff --git a/installers/auth.example.org/permissions/{{username}}/whoami.edn b/installers/auth.example.org/permissions/{{username}}/whoami.edn index 16708f075..95890e39e 100644 --- a/installers/auth.example.org/permissions/{{username}}/whoami.edn +++ b/installers/auth.example.org/permissions/{{username}}/whoami.edn @@ -5,5 +5,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://auth.example.org/operations/whoami" + :juxt.site/operation-uri "https://auth.example.org/operations/whoami" :juxt.site/user "https://data.example.org/_site/users/{{username}}"}}} diff --git a/installers/data.example.org/_site/access-token.edn b/installers/data.example.org/_site/access-token.edn index 90c360d13..5b2570c49 100644 --- a/installers/data.example.org/_site/access-token.edn +++ b/installers/data.example.org/_site/access-token.edn @@ -11,7 +11,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-access-token" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-access-token" :openapi.v3/metadata {"tags" ["Introspection"] "summary" "Show the access token as text so it can be saved"}}} diff --git a/installers/data.example.org/_site/access-token.txt.edn b/installers/data.example.org/_site/access-token.txt.edn index 42822b11c..892bcd23f 100644 --- a/installers/data.example.org/_site/access-token.txt.edn +++ b/installers/data.example.org/_site/access-token.txt.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-access-token"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-access-token"}} :juxt.site/variant-of "https://data.example.org/_site/access-token" :juxt.http/content-type "text/plain;charset=us-ascii" diff --git a/installers/data.example.org/_site/applications.edn b/installers/data.example.org/_site/applications.edn index 5d794e860..014a7fd72 100644 --- a/installers/data.example.org/_site/applications.edn +++ b/installers/data.example.org/_site/applications.edn @@ -13,13 +13,13 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/oauth/get-applications" + {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-applications" :openapi.v3/metadata {"tags" ["Applications"] "summary" "Get applications"}} :post - {:juxt.site/operation + {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/register-application" :openapi.v3/metadata {"tags" ["Applications"] diff --git a/installers/data.example.org/_site/applications.json.edn b/installers/data.example.org/_site/applications.json.edn index d67aaf534..96ac6f9f8 100644 --- a/installers/data.example.org/_site/applications.json.edn +++ b/installers/data.example.org/_site/applications.json.edn @@ -10,7 +10,7 @@ ;; This is arguably not required, since we can default across to ;; the juxt.site/variant-of resource and use the methods there. But, as a counter-argument, duplication doesn't cost us much here, and adds flexibility. :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/oauth/get-applications"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/oauth/get-applications"}} :juxt.site/variant-of "https://data.example.org/_site/applications" :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/_site/browser/browser-oauth-redirect.html.edn b/installers/data.example.org/_site/browser/browser-oauth-redirect.html.edn index b3691fae9..ad15baf2c 100644 --- a/installers/data.example.org/_site/browser/browser-oauth-redirect.html.edn +++ b/installers/data.example.org/_site/browser/browser-oauth-redirect.html.edn @@ -6,7 +6,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"}} :juxt.http/content-type "text/html;charset=utf-8" :juxt.http/content #juxt.include "browser-oauth-redirect.html" diff --git a/installers/data.example.org/_site/bundles.edn b/installers/data.example.org/_site/bundles.edn index 0d75e2a2b..71899b842 100644 --- a/installers/data.example.org/_site/bundles.edn +++ b/installers/data.example.org/_site/bundles.edn @@ -11,7 +11,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/_site/operations/all-bundles" + {:juxt.site/operation-uri "https://auth.example.org/_site/operations/all-bundles" :openapi.v3/metadata {"tags" ["Bundles"] "summary" "Get bundles"}} @@ -19,7 +19,7 @@ :post {:juxt.site/acceptable {"accept" "application/edn,application/json"} - :juxt.site/operation "https://auth.example.org/operations/install-bundle" + :juxt.site/operation-uri "https://auth.example.org/operations/install-bundle" :openapi.v3/metadata {"tags" ["Bundles"] "summary" "Install bundle" diff --git a/installers/data.example.org/_site/bundles.txt.edn b/installers/data.example.org/_site/bundles.txt.edn index 17b7a9435..402f1dc4f 100644 --- a/installers/data.example.org/_site/bundles.txt.edn +++ b/installers/data.example.org/_site/bundles.txt.edn @@ -9,7 +9,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/_site/operations/all-bundles"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/_site/operations/all-bundles"}} :juxt.site/variant-of "https://data.example.org/_site/bundles" :juxt.http/content-type "text/plain;charset=utf-8" :juxt.pick/quality-of-source 0.9 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/events.edn b/installers/data.example.org/_site/events.edn index d5479f7af..faf5550df 100644 --- a/installers/data.example.org/_site/events.edn +++ b/installers/data.example.org/_site/events.edn @@ -11,7 +11,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-events" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-events" :openapi.v3/metadata {"tags" ["Events"] "summary" "Get events"}}} diff --git a/installers/data.example.org/_site/events.edn.edn b/installers/data.example.org/_site/events.edn.edn index b6d7022f2..e20baa6ed 100644 --- a/installers/data.example.org/_site/events.edn.edn +++ b/installers/data.example.org/_site/events.edn.edn @@ -8,7 +8,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-events"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-events"}} :juxt.site/variant-of "https://data.example.org/_site/events" :juxt.http/content-type "application/edn" :juxt.pick/quality-of-source 0.5 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/events.json.edn b/installers/data.example.org/_site/events.json.edn index 8a4519f83..dab27cc0d 100644 --- a/installers/data.example.org/_site/events.json.edn +++ b/installers/data.example.org/_site/events.json.edn @@ -15,7 +15,7 @@ ;; operations? Do operations only exist to 'normalise' ;; endpoints? i.e. so REST unsafe methods and GraphQL ;; mutations can share the same logic? - :juxt.site/operation "https://auth.example.org/operations/get-events"}} + :juxt.site/operation-uri "https://auth.example.org/operations/get-events"}} :juxt.site/variant-of "https://data.example.org/_site/events" :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/_site/juxt-pass.js.edn b/installers/data.example.org/_site/juxt-pass.js.edn index ec3caf5a3..3ad51d4be 100644 --- a/installers/data.example.org/_site/juxt-pass.js.edn +++ b/installers/data.example.org/_site/juxt-pass.js.edn @@ -6,7 +6,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"}} :juxt.http/content-type "text/javascript" :juxt.http/content #juxt.include "juxt-pass.js" diff --git a/installers/data.example.org/_site/logs.edn b/installers/data.example.org/_site/logs.edn index d96ccabff..f766afe8b 100644 --- a/installers/data.example.org/_site/logs.edn +++ b/installers/data.example.org/_site/logs.edn @@ -11,7 +11,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-logs" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-logs" :openapi.v3/metadata {"tags" ["Logs"] "summary" "Get logs"}}} diff --git a/installers/data.example.org/_site/logs.json-seq.edn b/installers/data.example.org/_site/logs.json-seq.edn index 843da5978..f570fe755 100644 --- a/installers/data.example.org/_site/logs.json-seq.edn +++ b/installers/data.example.org/_site/logs.json-seq.edn @@ -8,7 +8,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-logs"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-logs"}} :juxt.site/variant-of "https://data.example.org/_site/logs" ;; See RFC 7464: https://datatracker.ietf.org/doc/html/rfc7464 :juxt.http/content-type "application/jsonline-seq" diff --git a/installers/data.example.org/_site/logs.jsonlines.edn b/installers/data.example.org/_site/logs.jsonlines.edn index 25bacabb4..9f88eb1bd 100644 --- a/installers/data.example.org/_site/logs.jsonlines.edn +++ b/installers/data.example.org/_site/logs.jsonlines.edn @@ -9,7 +9,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-logs"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-logs"}} :juxt.site/variant-of "https://data.example.org/_site/logs" ;; See https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html#cm-batch :juxt.http/content-type "application/jsonlines" diff --git a/installers/data.example.org/_site/logs.txt.edn b/installers/data.example.org/_site/logs.txt.edn index 965a3fda5..837605d3c 100644 --- a/installers/data.example.org/_site/logs.txt.edn +++ b/installers/data.example.org/_site/logs.txt.edn @@ -9,7 +9,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-logs"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-logs"}} :juxt.site/variant-of "https://data.example.org/_site/logs" :juxt.http/content-type "text/plain;charset=utf-8" :juxt.pick/quality-of-source 0.9 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/meta-resource.edn b/installers/data.example.org/_site/meta-resource.edn index 116eb14a3..799388956 100644 --- a/installers/data.example.org/_site/meta-resource.edn +++ b/installers/data.example.org/_site/meta-resource.edn @@ -11,13 +11,13 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://data.example.org/_site/operations/get-resource-metadata"} + {:juxt.site/operation-uri "https://data.example.org/_site/operations/get-resource-metadata"} :post - {:juxt.site/operation "https://data.example.org/_site/operations/post-new-resource"} + {:juxt.site/operation-uri "https://data.example.org/_site/operations/post-new-resource"} :put - {:juxt.site/operation "https://data.example.org/_site/operations/put-resource"} + {:juxt.site/operation-uri "https://data.example.org/_site/operations/put-resource"} :patch - {:juxt.site/operation "https://data.example.org/_site/operations/patch-resource"}} + {:juxt.site/operation-uri "https://data.example.org/_site/operations/patch-resource"}} :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/_site/oauth-service-worker.js.edn b/installers/data.example.org/_site/oauth-service-worker.js.edn index eaa3a645e..e34142e90 100644 --- a/installers/data.example.org/_site/oauth-service-worker.js.edn +++ b/installers/data.example.org/_site/oauth-service-worker.js.edn @@ -6,7 +6,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"}} :juxt.http/content-type "text/javascript" :juxt.http/content #juxt.include "oauth-service-worker.js" diff --git a/installers/data.example.org/_site/openapis.edn b/installers/data.example.org/_site/openapis.edn index 433c20723..e484c4cb1 100644 --- a/installers/data.example.org/_site/openapis.edn +++ b/installers/data.example.org/_site/openapis.edn @@ -12,12 +12,12 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-openapis" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-openapis" :openapi.v3/metadata {"tags" ["OpenAPIs"] "summary" "Get OpenAPIs"}} :post - {:juxt.site/operation + {:juxt.site/operation-uri ;; TODO: Rename to register-users "https://auth.example.org/operations/post-openapi" :openapi.v3/metadata diff --git a/installers/data.example.org/_site/openapis.edn.edn b/installers/data.example.org/_site/openapis.edn.edn index 991ed5fe1..592b84e4f 100644 --- a/installers/data.example.org/_site/openapis.edn.edn +++ b/installers/data.example.org/_site/openapis.edn.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-openapis"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-openapis"}} :juxt.site/variant-of "https://data.example.org/_site/openapis" :juxt.http/content-type "application/edn" :juxt.pick/quality-of-source 0.5 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/openapis.json.edn b/installers/data.example.org/_site/openapis.json.edn index f84360801..6458066fc 100644 --- a/installers/data.example.org/_site/openapis.json.edn +++ b/installers/data.example.org/_site/openapis.json.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-openapis"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-openapis"}} :juxt.site/variant-of "https://data.example.org/_site/openapis" :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/_site/operations.edn b/installers/data.example.org/_site/operations.edn index 894ad876f..bb58842b3 100644 --- a/installers/data.example.org/_site/operations.edn +++ b/installers/data.example.org/_site/operations.edn @@ -12,13 +12,13 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-operations" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-operations" :openapi.v3/metadata {"tags" ["Operations"] "summary" "Get all permitted operations"}} :post - {:juxt.site/operation "https://auth.example.org/_site/operations/create-operation" + {:juxt.site/operation-uri "https://auth.example.org/_site/operations/create-operation" :openapi.v3/metadata {"tags" ["Operations"] "summary" "Create an operation"}}} diff --git a/installers/data.example.org/_site/operations.edn.edn b/installers/data.example.org/_site/operations.edn.edn index 158de0cea..201055085 100644 --- a/installers/data.example.org/_site/operations.edn.edn +++ b/installers/data.example.org/_site/operations.edn.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-operations"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-operations"}} :juxt.site/variant-of "https://data.example.org/_site/operations" :juxt.http/content-type "application/edn" :juxt.pick/quality-of-source 0.5 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/operations.json.edn b/installers/data.example.org/_site/operations.json.edn index 0a9c44174..e4c2c3579 100644 --- a/installers/data.example.org/_site/operations.json.edn +++ b/installers/data.example.org/_site/operations.json.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-operations"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-operations"}} :juxt.site/variant-of "https://data.example.org/_site/operations" :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/_site/operations/patch-resource.edn b/installers/data.example.org/_site/operations/patch-resource.edn index ece053578..fcbba314e 100644 --- a/installers/data.example.org/_site/operations/patch-resource.edn +++ b/installers/data.example.org/_site/operations/patch-resource.edn @@ -59,7 +59,7 @@ (update doc :juxt.site/methods (fnil assoc {}) (keyword (clojure.string/lower-case method)) - {:juxt.site/operation operation})]))) + {:juxt.site/operation-uri operation})]))) (throw (ex-info "Cannot patch a missing document" {:xt/id id}))))} :juxt.site/rules diff --git a/installers/data.example.org/_site/permissions.edn b/installers/data.example.org/_site/permissions.edn index ff62a5e26..406ad138f 100644 --- a/installers/data.example.org/_site/permissions.edn +++ b/installers/data.example.org/_site/permissions.edn @@ -10,7 +10,7 @@ :juxt.site/methods {:post - {:juxt.site/operation "https://auth.example.org/_site/operations/grant-permission" + {:juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :openapi.v3/metadata {"tags" ["Operations"] "summary" "Grant a permission"}}} diff --git a/installers/data.example.org/_site/permissions/by-role/{{role}}/{{operation}}.edn b/installers/data.example.org/_site/permissions/by-role/{{role}}/{{operation}}.edn index e00d31c50..8e4e98aa4 100644 --- a/installers/data.example.org/_site/permissions/by-role/{{role}}/{{operation}}.edn +++ b/installers/data.example.org/_site/permissions/by-role/{{role}}/{{operation}}.edn @@ -3,5 +3,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://data.example.org/_site/operations/{{operation}}" + :juxt.site/operation-uri "https://data.example.org/_site/operations/{{operation}}" :juxt.site/role "https://data.example.org/_site/roles/{{role}}"}}} diff --git a/installers/data.example.org/_site/permissions/system/install-meta-resource.edn b/installers/data.example.org/_site/permissions/system/install-meta-resource.edn index 84ef34793..af9f97cb4 100644 --- a/installers/data.example.org/_site/permissions/system/install-meta-resource.edn +++ b/installers/data.example.org/_site/permissions/system/install-meta-resource.edn @@ -7,4 +7,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://data.example.org/_site/operations/install-meta-resource"}}} + :juxt.site/operation-uri "https://data.example.org/_site/operations/install-meta-resource"}}} diff --git a/installers/data.example.org/_site/requests.edn b/installers/data.example.org/_site/requests.edn index f292a7811..634641cbd 100644 --- a/installers/data.example.org/_site/requests.edn +++ b/installers/data.example.org/_site/requests.edn @@ -11,7 +11,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-requests" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-requests" :openapi.v3/metadata {"tags" ["Requests"] "summary" "Get requests"}}} diff --git a/installers/data.example.org/_site/resources.edn b/installers/data.example.org/_site/resources.edn index af06f94be..64b462c73 100644 --- a/installers/data.example.org/_site/resources.edn +++ b/installers/data.example.org/_site/resources.edn @@ -13,7 +13,7 @@ {:post {:juxt.site/acceptable {"accept" "application/edn,application/json"} - :juxt.site/operation "https://auth.example.org/operations/put-resource" + :juxt.site/operation-uri "https://auth.example.org/operations/put-resource" :openapi.v3/metadata {"tags" ["Resources"] "summary" "Install resource" diff --git a/installers/data.example.org/_site/templates/document-base.html.edn b/installers/data.example.org/_site/templates/document-base.html.edn index c3f1cba0f..3064d1ef7 100644 --- a/installers/data.example.org/_site/templates/document-base.html.edn +++ b/installers/data.example.org/_site/templates/document-base.html.edn @@ -5,7 +5,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"}} :juxt.http/content-type "text/html;charset=utf-8" :juxt.http/content #juxt.template #juxt.include "document-base.html"}}} diff --git a/installers/data.example.org/_site/templates/fetch-html-content.html.edn b/installers/data.example.org/_site/templates/fetch-html-content.html.edn index 5faa3ad62..8d40dd2f3 100644 --- a/installers/data.example.org/_site/templates/fetch-html-content.html.edn +++ b/installers/data.example.org/_site/templates/fetch-html-content.html.edn @@ -7,7 +7,7 @@ {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-unprotected-resource"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-unprotected-resource"}} :juxt.http/content-type "text/html;charset=utf-8" :juxt.http/content #juxt.template #juxt.include "fetch-html-content.html"}}} diff --git a/installers/data.example.org/_site/testing/basic-auth-protected-resource.edn b/installers/data.example.org/_site/testing/basic-auth-protected-resource.edn index 9218bed41..4c4fedab0 100644 --- a/installers/data.example.org/_site/testing/basic-auth-protected-resource.edn +++ b/installers/data.example.org/_site/testing/basic-auth-protected-resource.edn @@ -10,7 +10,7 @@ :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/basic"} :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/testing/basic-auth-protected-resource-operation"}} + {:juxt.site/operation-uri "https://auth.example.org/operations/testing/basic-auth-protected-resource-operation"}} :juxt.http/content-type "text/plain" :juxt.http/content "Hello World!" diff --git a/installers/data.example.org/_site/testing/client-credentials-protected-resource.edn b/installers/data.example.org/_site/testing/client-credentials-protected-resource.edn index 4dc1682ab..be9612f88 100644 --- a/installers/data.example.org/_site/testing/client-credentials-protected-resource.edn +++ b/installers/data.example.org/_site/testing/client-credentials-protected-resource.edn @@ -10,7 +10,7 @@ :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/client-credentials"} :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/testing/basic-auth-protected-resource-operation"}} + {:juxt.site/operation-uri "https://auth.example.org/operations/testing/basic-auth-protected-resource-operation"}} :juxt.http/content-type "text/plain" :juxt.http/content "Hello World!" diff --git a/installers/data.example.org/_site/users.edn b/installers/data.example.org/_site/users.edn index a351c6b4e..d507d470f 100644 --- a/installers/data.example.org/_site/users.edn +++ b/installers/data.example.org/_site/users.edn @@ -15,7 +15,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/get-users" + {:juxt.site/operation-uri "https://auth.example.org/operations/get-users" :openapi.v3/metadata {"tags" ["Users"] "summary" "Get users"} @@ -36,7 +36,7 @@ (update :ring.response/headers assoc "content-type" "text/html")))}}}}} :post - {:juxt.site/operation + {:juxt.site/operation-uri ;; TODO: Rename to register-users "https://auth.example.org/operations/put-user" :openapi.v3/metadata diff --git a/installers/data.example.org/_site/users.edn.edn b/installers/data.example.org/_site/users.edn.edn index d27ffc852..809a3bf1c 100644 --- a/installers/data.example.org/_site/users.edn.edn +++ b/installers/data.example.org/_site/users.edn.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-users"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-users"}} :juxt.site/variant-of "https://data.example.org/_site/users" :juxt.http/content-type "application/edn" :juxt.pick/quality-of-source 0.5 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/users.html.edn b/installers/data.example.org/_site/users.html.edn index cfb43125f..da4586c26 100644 --- a/installers/data.example.org/_site/users.html.edn +++ b/installers/data.example.org/_site/users.html.edn @@ -7,7 +7,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-users"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-users"}} :juxt.site/variant-of "https://data.example.org/_site/users" :juxt.http/content-type "text/html;charset=utf-8" :juxt.pick/quality-of-source 0.5 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/users.json.edn b/installers/data.example.org/_site/users.json.edn index e9f3f1ed9..ea99bd2b5 100644 --- a/installers/data.example.org/_site/users.json.edn +++ b/installers/data.example.org/_site/users.json.edn @@ -10,7 +10,7 @@ ;; This is arguably not required, since we can default across to ;; the juxt.site/variant-of resource and use the methods there. But, as a counter-argument, duplication doesn't cost us much here, and adds flexibility. :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/get-users"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/get-users"}} :juxt.site/variant-of "https://data.example.org/_site/users" :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/_site/users/{username}.edn b/installers/data.example.org/_site/users/{username}.edn index 60fcf78f1..617704c86 100644 --- a/installers/data.example.org/_site/users/{username}.edn +++ b/installers/data.example.org/_site/users/{username}.edn @@ -23,7 +23,7 @@ {:openapi.v3/metadata {"tags" ["Users"] "summary" "Get the details for an individual user."} - :juxt.site/operation "https://auth.example.org/operations/get-user" + :juxt.site/operation-uri "https://auth.example.org/operations/get-user" :juxt.site/variants [{:juxt.http/content-type "application/json"} {:juxt.http/content-type "application/edn"} diff --git a/installers/data.example.org/_site/whoami.edn b/installers/data.example.org/_site/whoami.edn index df536e2f0..b801bc1c4 100644 --- a/installers/data.example.org/_site/whoami.edn +++ b/installers/data.example.org/_site/whoami.edn @@ -12,7 +12,7 @@ :juxt.site/methods {:get - {:juxt.site/operation "https://auth.example.org/operations/whoami" + {:juxt.site/operation-uri "https://auth.example.org/operations/whoami" :openapi.v3/metadata {"tags" ["Introspection"] "summary" "Find out information about the requestor"}}} diff --git a/installers/data.example.org/_site/whoami.edn.edn b/installers/data.example.org/_site/whoami.edn.edn index 96531f0c8..e119ed37d 100644 --- a/installers/data.example.org/_site/whoami.edn.edn +++ b/installers/data.example.org/_site/whoami.edn.edn @@ -8,7 +8,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/whoami"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/whoami"}} :juxt.site/variant-of "https://data.example.org/_site/whoami" :juxt.http/content-type "application/edn" :juxt.pick/quality-of-source 0.5 ; downgrade in content-negotiation diff --git a/installers/data.example.org/_site/whoami.json.edn b/installers/data.example.org/_site/whoami.json.edn index d5bd32984..4a1261566 100644 --- a/installers/data.example.org/_site/whoami.json.edn +++ b/installers/data.example.org/_site/whoami.json.edn @@ -8,7 +8,7 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/methods - {:get {:juxt.site/operation "https://auth.example.org/operations/whoami"}} + {:get {:juxt.site/operation-uri "https://auth.example.org/operations/whoami"}} :juxt.site/variant-of "https://data.example.org/_site/whoami" :juxt.http/content-type "application/json" :juxt.site/respond diff --git a/installers/data.example.org/hospital-demo/_site/operations/register-doctor.edn b/installers/data.example.org/hospital-demo/_site/operations/register-doctor.edn index ab511018c..4bb2ed265 100644 --- a/installers/data.example.org/hospital-demo/_site/operations/register-doctor.edn +++ b/installers/data.example.org/hospital-demo/_site/operations/register-doctor.edn @@ -31,7 +31,7 @@ :juxt.site/type "https://data.example.org/types/doctor" :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} :juxt.site/methods - {:get {:juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/get-doctor"} + {:get {:juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/get-doctor"} :options {}}))] (assoc input :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/hospital-demo/_site/operations/register-patient.edn b/installers/data.example.org/hospital-demo/_site/operations/register-patient.edn index f30812b20..150c2f227 100644 --- a/installers/data.example.org/hospital-demo/_site/operations/register-patient.edn +++ b/installers/data.example.org/hospital-demo/_site/operations/register-patient.edn @@ -31,7 +31,7 @@ :juxt.site/type "https://data.example.org/types/patient" :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} :juxt.site/methods - {:get {:juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/get-patient"} + {:get {:juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/get-patient"} :options {}}))] (assoc input :juxt.http/content-type "application/json" diff --git a/installers/data.example.org/hospital-demo/_site/permissions/system/assign-doctor-to-patient.edn b/installers/data.example.org/hospital-demo/_site/permissions/system/assign-doctor-to-patient.edn index d03007535..6d9577ddd 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/system/assign-doctor-to-patient.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/system/assign-doctor-to-patient.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/assign-doctor-to-patient"}}} + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/assign-doctor-to-patient"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/system/register-doctor.edn b/installers/data.example.org/hospital-demo/_site/permissions/system/register-doctor.edn index 6dd890b5f..23a99e939 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/system/register-doctor.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/system/register-doctor.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/register-doctor"}}} + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/register-doctor"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient-measurement.edn b/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient-measurement.edn index 2aa81863c..a40a5bb44 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient-measurement.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient-measurement.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/register-patient-measurement"}}} + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/register-patient-measurement"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient.edn b/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient.edn index b175655fb..e5a02fb2e 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/system/register-patient.edn @@ -4,4 +4,4 @@ :juxt.site/input {:xt/id "{{$id}}" :juxt.site/subject "https://auth.example.org/_site/subjects/system" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/register-patient"}}} + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/register-patient"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-any-patient.edn b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-any-patient.edn index adfc5f256..1ec20d012 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-any-patient.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-any-patient.edn @@ -3,6 +3,6 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/get-patient" + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/get-patient" :juxt.site/user "https://data.example.org/_site/users/{{username}}" :patient :all}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-doctor.edn b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-doctor.edn index bcdcbc8f8..c00dc79a8 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-doctor.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-doctor.edn @@ -3,5 +3,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/get-doctor" + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/get-doctor" :juxt.site/user "https://data.example.org/_site/users/{{username}}"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-patient/{{pid}}.edn b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-patient/{{pid}}.edn index 0d35d4964..404420c0a 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-patient/{{pid}}.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/get-patient/{{pid}}.edn @@ -3,6 +3,6 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/get-patient" + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/get-patient" :juxt.site/user "https://data.example.org/_site/users/{{username}}" :patient "https://data.example.org/hospital-demo/patients/{{pid}}"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/list-patients.edn b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/list-patients.edn index 073fb1bb6..57c933d1c 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/list-patients.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/list-patients.edn @@ -3,5 +3,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/list-patients" + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/list-patients" :juxt.site/user "https://data.example.org/_site/users/{{username}}"}}} diff --git a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/read-any-measurement.edn b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/read-any-measurement.edn index aa781ae85..14206eb4b 100644 --- a/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/read-any-measurement.edn +++ b/installers/data.example.org/hospital-demo/_site/permissions/{{username}}/read-any-measurement.edn @@ -3,5 +3,5 @@ :juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id "{{$id}}" - :juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/read-any-measurement" + :juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/read-any-measurement" :juxt.site/user "https://data.example.org/_site/users/{{username}}"}}} diff --git a/installers/data.example.org/hospital-demo/patients/_index.edn b/installers/data.example.org/hospital-demo/patients/_index.edn index 653e5b82c..31f2ccd17 100644 --- a/installers/data.example.org/hospital-demo/patients/_index.edn +++ b/installers/data.example.org/hospital-demo/patients/_index.edn @@ -4,7 +4,7 @@ {:xt/id "{{$id}}" :juxt.site/methods {:get - {:juxt.site/operation "https://data.example.org/hospital-demo/_site/operations/list-patients"}} + {:juxt.site/operation-uri "https://data.example.org/hospital-demo/_site/operations/list-patients"}} :juxt.site/protection-spaces #{"https://auth.example.org/protection-spaces/bearer"} :juxt.http/content-type "application/json" :juxt.site/respond diff --git a/server/src/juxt/site/eql_datalog_compiler.clj b/server/src/juxt/site/eql_datalog_compiler.clj index 63c38a088..c923d9332 100644 --- a/server/src/juxt/site/eql_datalog_compiler.clj +++ b/server/src/juxt/site/eql_datalog_compiler.clj @@ -11,7 +11,7 @@ (assert (map? ctx)) (assert (number? (:depth ctx))) (let [depth (:depth ctx) - operation-id (-> ast :params :juxt.site/operation) + operation-id (-> ast :params :juxt.site/operation-uri) _ (assert operation-id "Operation must be specified on metadata") operation (when operation-id (xt/entity db operation-id)) _ (when operation-id (assert operation (format "Operation not found: %s" operation-id))) @@ -63,7 +63,7 @@ :where ~(cond-> `[[~'operation :xt/id ~operation-id] ~'[permission :juxt.site/type "https://meta.juxt.site/types/permission"] - ~'[permission :juxt.site/operation operation] + ~'[permission :juxt.site/operation-uri operation] ;; We must rename 'allowed?' here because we ;; cannot allow rules from parent queries to ;; affect rules from sub-queries. In other diff --git a/server/src/juxt/site/graphql_compiler.clj b/server/src/juxt/site/graphql_compiler.clj index 86f3e5a07..460349789 100644 --- a/server/src/juxt/site/graphql_compiler.clj +++ b/server/src/juxt/site/graphql_compiler.clj @@ -36,7 +36,7 @@ ['operation :juxt.site/type "https://meta.juxt.site/types/operation"] ['operation :xt/id operations-ids-as-single-or-set] ['permission :juxt.site/type "https://meta.juxt.site/types/permission"] - ['permission :juxt.site/operation operations-ids-as-single-or-set] + ['permission :juxt.site/operation-uri operations-ids-as-single-or-set] '(allowed? permission subject operation e) '(include? operation e)]] (cond-> where-clause diff --git a/server/src/juxt/site/graphql_eql_compiler.clj b/server/src/juxt/site/graphql_eql_compiler.clj index 8a124cf3a..9f641579f 100644 --- a/server/src/juxt/site/graphql_eql_compiler.clj +++ b/server/src/juxt/site/graphql_eql_compiler.clj @@ -18,7 +18,7 @@ args (reduce-kv (fn [acc k v] (assoc acc (keyword k) v)) {} (:juxt.grab.alpha.graphql/arguments field)) - operation (some-> site-dir :juxt.grab.alpha.graphql/arguments (get "operation"))] + operation-uri (some-> site-dir :juxt.grab.alpha.graphql/arguments (get "operation"))] (cond (:juxt.grab.alpha.graphql/selection-set field) @@ -26,7 +26,7 @@ :dispatch-key k :key k :params (cond-> args - operation (assoc :juxt.site/operation operation)) + operation-uri (assoc :juxt.site/operation-uri operation-uri)) :children (mapv #(graphql->eql-ast* schema %) (:juxt.grab.alpha.graphql/selection-set field))} diff --git a/server/src/juxt/site/operations.clj b/server/src/juxt/site/operations.clj index f509ab500..a7d77e1ab 100644 --- a/server/src/juxt/site/operations.clj +++ b/server/src/juxt/site/operations.clj @@ -76,7 +76,7 @@ ;; Only consider a permitted operation [permission :juxt.site/type "https://meta.juxt.site/types/permission"] - [permission :juxt.site/operation operation] + [permission :juxt.site/operation-uri operation] (allowed? subject operation resource permission) @@ -95,7 +95,7 @@ ;; Only consider a permitted operation [permission :juxt.site/type "https://meta.juxt.site/types/permission"] - [permission :juxt.site/operation operation] + [permission :juxt.site/operation-uri operation] (allowed? subject operation resource permission)] :rules rules @@ -142,7 +142,7 @@ ;; Only consider a permitted operation [permission :juxt.site/type "https://meta.juxt.site/types/permission"] - [permission :juxt.site/operation operation] + [permission :juxt.site/operation-uri operation] (allowed? subject operation resource permission) ;; Only permissions that match our purpose @@ -190,7 +190,7 @@ ;; Only consider a permitted operation [permission :juxt.site/type "https://meta.juxt.site/types/permission"] - [permission :juxt.site/operation operation] + [permission :juxt.site/operation-uri operation] (allowed? subject operation resource permission) @@ -251,7 +251,7 @@ ;; Only consider allowed permssions [permission :juxt.site/type "https://meta.juxt.site/types/permission"] - [permission :juxt.site/operation operation] + [permission :juxt.site/operation-uri operation] (allowed? subject operation resource permission) ] @@ -316,7 +316,7 @@ (xt/q db {:find '[(pull operation [*]) permission] - :keys '[juxt.site/operation juxt.site/permission] + :keys '[juxt.site/operation-uri juxt.site/permission] :where '[ [operation :juxt.site/type "https://meta.juxt.site/types/operation"] @@ -327,7 +327,7 @@ ;; Only consider a permitted operation [permission :juxt.site/type "https://meta.juxt.site/types/permission"] - [permission :juxt.site/operation operation] + [permission :juxt.site/operation-uri operation] (allowed? subject operation resource permission) ] @@ -341,10 +341,10 @@ ;; We want to list unique operations but associated with the ;; permissions that let the subject have access. - (group-by :juxt.site/operation) + (group-by :juxt.site/operation-uri) (reduce-kv (fn [acc operation permissions] - (conj acc {:juxt.site/operation operation + (conj acc {:juxt.site/operation-uri operation :juxt.site/permitted-by (mapv :juxt.site/permission permissions)})) [])))) @@ -1079,7 +1079,7 @@ (xt/with-tx [[:xtdb.api/put subject]])) method (if (= method :head) :get method) - operation-uri (get-in resource [:juxt.site/methods method :juxt.site/operation]) + operation-uri (get-in resource [:juxt.site/methods method :juxt.site/operation-uri]) operation (when operation-uri (xt/entity db operation-uri)) diff --git a/server/src/juxt/site/schema.clj b/server/src/juxt/site/schema.clj index 75193513d..0394a06f4 100644 --- a/server/src/juxt/site/schema.clj +++ b/server/src/juxt/site/schema.clj @@ -28,7 +28,6 @@ :juxt.site/client-type [:enum "confidential" "public"] :juxt.site/redirect-uris [:sequential [:and [:string {:min 1}] [:fn string-uri?]]] :juxt.site/subject-uri [:and [:string {:min 1}] [:fn string-uri?]] - :juxt.site/operationg [:and [:string {:min 1}] [:fn string-uri?]] :juxt.site/operation-uri [:and [:string {:min 1}] [:fn string-uri?]] :juxt.site/do-operation-tx-fn [:and [:string {:min 1}] [:fn string-uri?]] :juxt.site/events-base-uri [:and [:string {:min 1}] [:fn string-uri?]] diff --git a/server/test/juxt/site/dynamic_put_test.clj b/server/test/juxt/site/dynamic_put_test.clj index 241c1e609..475762cb0 100644 --- a/server/test/juxt/site/dynamic_put_test.clj +++ b/server/test/juxt/site/dynamic_put_test.clj @@ -77,7 +77,7 @@ ;; with the permission, to ensure that only the granter can ;; revoke. {:xt/id "https://data.example.test/permissions/add-contact" - :juxt.site/operation "https://data.example.test/operations/add-contact" + :juxt.site/operation-uri "https://data.example.test/operations/add-contact" :juxt.site/user "alice"}) (*handler* {:juxt.site/uri "https://data.example.test/_site/permissions" @@ -89,7 +89,7 @@ (pr-str [[:add-method {:method "POST" - :operation "https://data.example.test/operations/add-contact"}]]) + :operation-uri "https://data.example.test/operations/add-contact"}]]) (*handler* {:juxt.site/uri "https://data.example.test/contacts.meta" :ring.request/method :patch diff --git a/server/test/juxt/site/eql_datalog_compiler_test.clj b/server/test/juxt/site/eql_datalog_compiler_test.clj index 2ce223909..9b46a459a 100644 --- a/server/test/juxt/site/eql_datalog_compiler_test.clj +++ b/server/test/juxt/site/eql_datalog_compiler_test.clj @@ -288,11 +288,11 @@ db (eql/query->ast '[ - {(:patients {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-patient"}) + {(:patients {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-patient"}) [:xt/id :name :juxt.site/type - {(:measurements {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/read-any-measurement"}) + {(:measurements {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/read-any-measurement"}) [:reading]}]}])))] (testing "Alice's view" @@ -403,15 +403,15 @@ (eqlc/compile-ast db (eql/query->ast - '[{(:doctors {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-doctor"}) + '[{(:doctors {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-doctor"}) [:xt/id :name :juxt.site/type - {(:patients {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-patient"}) + {(:patients {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-patient"}) [:xt/id :name :juxt.site/type - {(:readings {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/read-any-measurement"}) + {(:readings {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/read-any-measurement"}) [:reading]}]}]}])))] (testing "Alice's view" @@ -504,16 +504,16 @@ (eqlc/compile-ast db (eql/query->ast - '[{(:doctor {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-doctor" + '[{(:doctor {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-doctor" :search "jack"}) [:xt/id :name :juxt.site/type - {(:patients {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-patient"}) + {(:patients {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-patient"}) [:xt/id :name :juxt.site/type - {(:readings {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/read-any-measurement"}) + {(:readings {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/read-any-measurement"}) [:reading]}]}]}])))] (testing "Alice's view" diff --git a/server/test/juxt/site/graphql_compiler_test.clj b/server/test/juxt/site/graphql_compiler_test.clj index f4f1a0090..fe7d28180 100644 --- a/server/test/juxt/site/graphql_compiler_test.clj +++ b/server/test/juxt/site/graphql_compiler_test.clj @@ -24,7 +24,7 @@ :key :doctors :params {:search "jack" - :juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-doctor"} + :juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-doctor"} :children [{:type :prop :dispatch-key :xt/id :key :xt/id}]}]} @@ -44,7 +44,7 @@ :key :doctors :params {:search "jack" - :juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-doctor"} + :juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-doctor"} :children [{:type :prop :dispatch-key :xt/id :key :xt/id} {:type :prop :dispatch-key :name :key :name} @@ -52,7 +52,7 @@ :dispatch-key :patients :key :patients :params - {:juxt.site/operation "https://hospital.com/hospital-demo/_site/operations/get-patient"} + {:juxt.site/operation-uri "https://hospital.com/hospital-demo/_site/operations/get-patient"} :children [{:type :prop :dispatch-key :xt/id :key :xt/id} {:type :prop :dispatch-key :name :key :name}]}]}]} diff --git a/server/test/juxt/site/graphql_scenario_test.clj b/server/test/juxt/site/graphql_scenario_test.clj index d02eb7eb5..e1c082742 100644 --- a/server/test/juxt/site/graphql_scenario_test.clj +++ b/server/test/juxt/site/graphql_scenario_test.clj @@ -36,7 +36,7 @@ :juxt.site/operation-uri "https://example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id id - :juxt.site/operation "https://example.org/operations/get-graphql-type" + :juxt.site/operation-uri "https://example.org/operations/get-graphql-type" :juxt.site/user (format "https://example.org/_site/users/%s" (get params "username"))}})} "https://example.org/operations/delete-graphql-type" @@ -104,7 +104,7 @@ :juxt.site/operation-uri "https://example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id id - :juxt.site/operation "https://example.org/operations/delete-graphql-type" + :juxt.site/operation-uri "https://example.org/operations/delete-graphql-type" :juxt.site/user (format "https://example.org/_site/users/%s" (get params "username"))}})} "https://example.org/operations/install-graphql-type" @@ -126,8 +126,8 @@ {:xt/id (str (:xt/id *resource*) "types/" type-name) :juxt.site/type "https://meta.juxt.site/types/graphql-type" :juxt.site/methods - {:get {:juxt.site/operation "https://example.org/operations/get-graphql-type"} - :delete {:juxt.site/operation "https://example.org/operations/delete-graphql-type"}} + {:get {:juxt.site/operation-uri "https://example.org/operations/get-graphql-type"} + :delete {:juxt.site/operation-uri "https://example.org/operations/delete-graphql-type"}} :juxt.site/graphql-schema (:xt/id *resource*) :juxt.grab/type-definition typedef ;; Inherit the protection space of the resource @@ -177,7 +177,7 @@ :juxt.site/operation-uri "https://example.org/_site/operations/grant-permission" :juxt.site/input {:xt/id id - :juxt.site/operation "https://example.org/operations/install-graphql-type" + :juxt.site/operation-uri "https://example.org/operations/install-graphql-type" :juxt.site/user (format "https://example.org/_site/users/%s" (get params "username"))}})} "https://example.org/graphql/schema/" @@ -189,7 +189,7 @@ :juxt.site/uri-template true :juxt.site/methods {:post - {:juxt.site/operation "https://example.org/operations/install-graphql-type" + {:juxt.site/operation-uri "https://example.org/operations/install-graphql-type" :juxt.site/acceptable {"accept" "text/plain"}}} :juxt.site/protection-spaces #{"https://example.org/protection-spaces/bearer"}}})} @@ -203,7 +203,7 @@ :juxt.site/graphql-schema "https://example.org/graphql/schema/" :juxt.site/methods {:post - {:juxt.site/operation "https://example.org/operations/compile-graphql-schema"}} + {:juxt.site/operation-uri "https://example.org/operations/compile-graphql-schema"}} :juxt.site/protection-spaces #{"https://example.org/protection-spaces/bearer"}}))} @@ -216,7 +216,7 @@ (init/put! ;; install-graphql-endpoint {:xt/id id :juxt.site/methods - {:get {:juxt.site/operation "https://example.org/operations/whoami"}} + {:get {:juxt.site/operation-uri "https://example.org/operations/whoami"}} :juxt.site/protection-spaces #{"https://example.org/protection-spaces/bearer"}}))} }) diff --git a/server/test/juxt/site/installer_test.clj b/server/test/juxt/site/installer_test.clj index c819e48f6..527e23a48 100644 --- a/server/test/juxt/site/installer_test.clj +++ b/server/test/juxt/site/installer_test.clj @@ -59,7 +59,8 @@ (map first (xt/q db '{:find [(pull ev [*])] - :where [[ev :juxt.site/operation-uri "https://auth.example.test/operations/put-openapi-document"]]})) + :where [[ev :juxt.site/operation-uri "https://auth.example.test/operations/put-openapi-document"] + [ev :juxt.site/type "https://meta.juxt.site/types/event"]]})) ev (first events)]