Skip to content

Commit

Permalink
Fix rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
l4e21 committed Oct 30, 2023
1 parent 6e2236a commit f9d8314
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 120 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{:deps
[{:juxt.site/base-uri "https://auth.example.org"
[{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/operations/get-bundle-by-id"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
Expand Down
4 changes: 1 addition & 3 deletions installers/auth.example.org/oauth/introspect.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{:deps
[{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/oauth/install-token-introspection-endpoint"}
]
[{:juxt.site/base-uri "https://auth.example.org" :juxt.site/installer-path "/operations/oauth/install-token-introspection-endpoint"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/oauth/install-token-introspection-endpoint"
:juxt.site/input
{:xt/id "{{$id}}"

;; The introspect endpoint is inside a special protection space
;; that requires the client to authenticate itself using Basic
;; authentication. See RFC 7662 Section 2.1:
Expand Down
5 changes: 3 additions & 2 deletions installers/bundles.edn
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/access-token.txt"}
{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/permissions/whoami"}
:juxt.site/installer-path "/_site/permissions/whoami"}
]}

;; TODO: Shouldn't SystemAPI be broken up into individual endpoints?
Expand Down Expand Up @@ -572,7 +572,8 @@
{:juxt.site/base-uri "https://auth.example.org" :juxt.site/installer-path "/permissions/oauth/introspect-token"}
{:juxt.site/base-uri "https://auth.example.org" :juxt.site/installer-path "/operations/oauth/install-token-introspection-endpoint"}
{:juxt.site/base-uri "https://auth.example.org" :juxt.site/installer-path "/permissions/system/install-token-introspection-endpoint"}
{:juxt.site/base-uri "https://auth.example.org" :juxt.site/installer-path "/oauth/introspect"}]}
{:juxt.site/base-uri "https://auth.example.org" :juxt.site/installer-path "/oauth/introspect"}
]}

"juxt/site/oauth-metadata-endpoints"
{:juxt.site/description "OAuth2 RFC 8414 metadata endpoints"
Expand Down
2 changes: 1 addition & 1 deletion installers/data.example.org/_site/access-token.edn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{:deps
[{:juxt.site/base-uri "https:/data.example.org", :juxt.site/installer-path "/_site/operations/get-access-token"}
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-access-token"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/protection-spaces/bearer"}
]
:install
Expand Down
6 changes: 3 additions & 3 deletions installers/data.example.org/_site/bundle.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:deps
[{:juxt.site/base-uri "https://auth.example.org"
[{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/operations/get-bundle-by-id"}
{:juxt.site/base-uri "https://auth.example.org"
{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/operations/delete-bundle-by-id"}
{:juxt.site/base-uri "https://auth.example.org"
:juxt.site/installer-path "/protection-spaces/bearer"}]
Expand All @@ -15,7 +15,7 @@

:juxt.site/methods
{:get
{:juxt.site/operation "https://auth.example.org/_site/operations/get-bundle-by-id"
{:juxt.site/operation "https://data.example.org/_site/operations/get-bundle-by-id"
:openapi.v3/metadata
{"tags" ["Bundles"]
"summary" "Get a bundle"
Expand Down
8 changes: 4 additions & 4 deletions installers/data.example.org/_site/bundle.txt.edn
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{:deps
[{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/bundle"}
{:juxt.site/base-uri "https://auth.example.org"
{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/operations/get-bundle-by-id"}
{:juxt.site/base-uri "https://auth.example.org"
{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/operations/delete-bundle-by-id"}
{:juxt.site/base-uri "https://auth.example.org"
:juxt.site/installer-path "/operations/put-resource"}]
Expand All @@ -14,8 +14,8 @@
:juxt.site/input
{:xt/id "{{$id}}"
:juxt.site/methods
{:get {:juxt.site/operation "https://auth.example.org/_site/operations/get-bundle-by-id"}
:delete {:juxt.site/operation "https://auth.example.org/_site/operations/delete-bundle-by-id"}}
{:get {:juxt.site/operation "https://data.example.org/_site/operations/get-bundle-by-id"}
:delete {:juxt.site/operation "https://data.example.org/_site/operations/delete-bundle-by-id"}}
:juxt.site/variant-of "https://data.example.org/_site/bundle"
:juxt.http/content-type "text/plain;charset=utf-8"
:juxt.pick/quality-of-source 0.9 ; downgrade in content-negotiation
Expand Down
4 changes: 2 additions & 2 deletions installers/data.example.org/_site/bundles.jsonlines.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:deps
[{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/bundles"}
{:juxt.site/base-uri "https://auth.example.org"
{:juxt.site/base-uri "https://data.example.org"
:juxt.site/installer-path "/_site/operations/all-bundles"}
{:juxt.site/base-uri "https://auth.example.org"
:juxt.site/installer-path "/operations/put-resource"}]
Expand All @@ -11,7 +11,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 "https://data.example.org/_site/operations/all-bundles"}}
:juxt.site/variant-of "https://data.example.org/_site/bundles"
;; See https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html#cm-batch
:juxt.http/content-type "application/jsonlines"
Expand Down
11 changes: 2 additions & 9 deletions installers/data.example.org/_site/logs.json-seq.edn
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/logs"
"https://data.example.org/_site/operations/get-logs"
"https://auth.example.org/operations/put-resource"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
11 changes: 2 additions & 9 deletions installers/data.example.org/_site/logs.jsonlines.edn
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
;; See https://jsonlines.org/
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/logs"
"https://data.example.org/_site/operations/get-logs"
"https://auth.example.org/operations/put-resource"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
11 changes: 2 additions & 9 deletions installers/data.example.org/_site/logs.txt.edn
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
;; See https://jsonlines.org/
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/logs"
"https://data.example.org/_site/operations/get-logs"
"https://auth.example.org/operations/put-resource"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-logs"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
7 changes: 1 addition & 6 deletions installers/data.example.org/_site/openapi.json.edn
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/operations/put-openapi-document"]
=======
[{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-openapi-document"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/put-openapi-document"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://data.example.org/_site/operations/put-openapi-document"
Expand Down
13 changes: 3 additions & 10 deletions installers/data.example.org/_site/openapis.edn
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/operations/get-openapis"
"https://data.example.org/_site/operations/post-openapi"
"https://auth.example.org/protection-spaces/bearer"]
=======
[{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-openapis"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/post-openapi"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/protection-spaces/bearer"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-openapis"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/post-openapi"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/protection-spaces/bearer"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
8 changes: 1 addition & 7 deletions installers/data.example.org/_site/openapis.edn.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/openapis"
"https://data.example.org/_site/operations/get-openapis"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/openapis"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-openapis"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-openapis"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
8 changes: 1 addition & 7 deletions installers/data.example.org/_site/openapis.json.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/openapis"
"https://data.example.org/_site/operations/get-openapis"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/openapis"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-openapis"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-openapis"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
8 changes: 1 addition & 7 deletions installers/data.example.org/_site/operations.edn.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/operations"
"https://data.example.org/_site/operations/get-operations"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-operations"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-operations"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
10 changes: 2 additions & 8 deletions installers/data.example.org/_site/operations.json.edn
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{:deps
<<<<<<< HEAD
["https://data.example.org/_site/operations"
"https://data.example.org/_site/operations/get-operations"]
=======
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/get-operations"}
]
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-operations"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/operations/put-resource"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-openapi-document"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/permissions/get-openapi-document"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/scopes/system/write"}]
ample.org/operations/put-openapi-document.edn
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/_site/operations/create-operation"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{:deps
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/whoami"}]
ample.org/permissions/get-access-token.edn
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{:deps
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-openapi-document"}]
ample.org/permissions/get-openapi-document.edn
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{:deps
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/get-operations"}]
ample.org/permissions/get-operations.edn
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{:deps
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/put-openapi-document"}
]
ample.org/permissions/system/put-openapi-document.edn
[{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/operations/put-openapi-document"}]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
:juxt.site/operation-uri "https://auth.example.org/_site/operations/grant-permission"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:deps
[{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/protection-spaces/basic"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/testing/operations/testing/basic-auth-protected-resource-operation"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/testing/operations/basic-auth-protected-resource-operation"}
]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:deps
[{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/operations/put-resource"}
{:juxt.site/base-uri "https://auth.example.org", :juxt.site/installer-path "/protection-spaces/client-credentials"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/testing/operations/testing/basic-auth-protected-resource-operation"}
{:juxt.site/base-uri "https://data.example.org", :juxt.site/installer-path "/_site/testing/operations/basic-auth-protected-resource-operation"}
]
:install
{:juxt.site/subject-uri "https://auth.example.org/_site/subjects/system"
Expand Down
24 changes: 1 addition & 23 deletions src/juxt/site/site_cli/tasks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -485,31 +485,9 @@
["juxt/site/sessions" {}]
["juxt/site/roles" {}]

<<<<<<< HEAD
;; RFC 7662 token introspection
["juxt/site/oauth-introspection-endpoint" {}]])))
=======
;; RFC 7662 token introspection
["juxt/site/oauth-introspection-endpoint" {}]
;; Register the clients
["juxt/site/system-client"
(let [site-cli-config {"client-id" "site-cli"}]
(if-let [site-cli-secret (:site-cli-secret opts)]
(assoc site-cli-config "client-secret" site-cli-secret)
site-cli-config))]
["juxt/site/system-client"
(let [insite-config {"client-id" "insite"}]
(if-let [insite-secret (:insite-secret opts)]
(assoc insite-config "client-secret" insite-secret)
insite-config))]
])
)
["juxt/site/oauth-introspection-endpoint" {}]])))
;; Delete any stale client-secret files
(doseq [client-id ["site-cli" "insite"]
:let [secret-file (util/client-secret-file opts client-id)]]
;; TODO: Replace with babashka.fs
(.delete secret-file))
>>>>>>> 2f17382f (Update dependencies to use specs instead of strings)

(when-not no-clients
(register-system-clients opts))))))
Expand Down

0 comments on commit f9d8314

Please sign in to comment.