From 1320fc94e8245137bc4f695864b000a83f89be82 Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Thu, 7 Aug 2025 02:10:18 +0100 Subject: [PATCH 1/5] WIP --- docs/hydra/reference/configuration.mdx | 2 +- docs/keto/reference/configuration.mdx | 2 +- docs/kratos/reference/configuration.mdx | 2 +- docs/oathkeeper/reference/configuration.mdx | 2 +- src/components/ConfigMarkdown/index.tsx | 3 +++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/hydra/reference/configuration.mdx b/docs/hydra/reference/configuration.mdx index 830085e894..1f251eddd1 100644 --- a/docs/hydra/reference/configuration.mdx +++ b/docs/hydra/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/docs/keto/reference/configuration.mdx b/docs/keto/reference/configuration.mdx index b390e3d8bd..26aca5111b 100644 --- a/docs/keto/reference/configuration.mdx +++ b/docs/keto/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/docs/kratos/reference/configuration.mdx b/docs/kratos/reference/configuration.mdx index 200bb24ce4..4c1ddda2ea 100644 --- a/docs/kratos/reference/configuration.mdx +++ b/docs/kratos/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/docs/oathkeeper/reference/configuration.mdx b/docs/oathkeeper/reference/configuration.mdx index ad909fb72e..b3b674743a 100644 --- a/docs/oathkeeper/reference/configuration.mdx +++ b/docs/oathkeeper/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/src/components/ConfigMarkdown/index.tsx b/src/components/ConfigMarkdown/index.tsx index d2a93f89bc..51a33039e6 100644 --- a/src/components/ConfigMarkdown/index.tsx +++ b/src/components/ConfigMarkdown/index.tsx @@ -13,6 +13,9 @@ const parser = new RefParser() const refs = { "ory://tracing-config": `https://raw.githubusercontent.com/ory/x/master/otelx/config.schema.json`, "ory://logging-config": `https://raw.githubusercontent.com/ory/x/master/logrusx/config.schema.json`, + "ory://serve-config": `https://raw.githubusercontent.com/ory/x/master/configx/serve.schema.json`, + "ory://cors-config": `https://raw.githubusercontent.com/ory/x/master/configx/cors.schema.json`, + "ory://tls-config": `https://raw.githubusercontent.com/ory/x/master/configx/tls.schema.json`, } const enhance = From 9d624b1044b4029d27ae27065a729fbaa862d366 Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Wed, 20 Aug 2025 17:06:57 +0100 Subject: [PATCH 2/5] temp hack for oathkeeper schema id --- src/components/ConfigMarkdown/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/ConfigMarkdown/index.tsx b/src/components/ConfigMarkdown/index.tsx index 51a33039e6..07616faf9a 100644 --- a/src/components/ConfigMarkdown/index.tsx +++ b/src/components/ConfigMarkdown/index.tsx @@ -135,6 +135,10 @@ export default function ConfigMarkdown(props: { src: string; binary: string }) { .then((r) => r.json()) .then((schema) => { new Promise((resolve, reject) => { + if (schema.title === "ORY Oathkeeper Configuration") { + schema["$id"] = + "https://github.com/ory/oathkeeper/spec/config.schema.json" + } parser.dereference( schema, { From 46fde2263692ca21db1ebbb4764da1b6354c83b7 Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Wed, 20 Aug 2025 17:33:44 +0100 Subject: [PATCH 3/5] temp hack for oathkeeper schema id --- src/components/ConfigMarkdown/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ConfigMarkdown/index.tsx b/src/components/ConfigMarkdown/index.tsx index 07616faf9a..3e23f4c181 100644 --- a/src/components/ConfigMarkdown/index.tsx +++ b/src/components/ConfigMarkdown/index.tsx @@ -137,7 +137,7 @@ export default function ConfigMarkdown(props: { src: string; binary: string }) { new Promise((resolve, reject) => { if (schema.title === "ORY Oathkeeper Configuration") { schema["$id"] = - "https://github.com/ory/oathkeeper/spec/config.schema.json" + "https://github.com/ory/oathkeeper/schema/config.schema.json" } parser.dereference( schema, From 2f7bd47a61f1743ef4919ce2781ba340964c164e Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Wed, 20 Aug 2025 17:39:27 +0100 Subject: [PATCH 4/5] revert schema urls --- docs/hydra/reference/configuration.mdx | 2 +- docs/keto/reference/configuration.mdx | 2 +- docs/kratos/reference/configuration.mdx | 2 +- docs/oathkeeper/reference/configuration.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/hydra/reference/configuration.mdx b/docs/hydra/reference/configuration.mdx index 1f251eddd1..830085e894 100644 --- a/docs/hydra/reference/configuration.mdx +++ b/docs/hydra/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/docs/keto/reference/configuration.mdx b/docs/keto/reference/configuration.mdx index 26aca5111b..b390e3d8bd 100644 --- a/docs/keto/reference/configuration.mdx +++ b/docs/keto/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/docs/kratos/reference/configuration.mdx b/docs/kratos/reference/configuration.mdx index 4c1ddda2ea..200bb24ce4 100644 --- a/docs/kratos/reference/configuration.mdx +++ b/docs/kratos/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` diff --git a/docs/oathkeeper/reference/configuration.mdx b/docs/oathkeeper/reference/configuration.mdx index b3b674743a..ad909fb72e 100644 --- a/docs/oathkeeper/reference/configuration.mdx +++ b/docs/oathkeeper/reference/configuration.mdx @@ -6,5 +6,5 @@ title: Configuration ```mdx-code-block import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; - + ``` From c05ec7ae270b910e71167c252c9a475583220f35 Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Thu, 21 Aug 2025 11:57:21 +0100 Subject: [PATCH 5/5] - added new config pages for OEL - updated dep - resolve internal refs in ory resolvers correctly --- docs/self-hosted/oel/keto/configuration.mdx | 10 ++++++ docs/self-hosted/oel/kratos/configuration.mdx | 10 ++++++ .../oel/oathkeeper/configuration.mdx | 10 ++++++ docs/self-hosted/oel/oauth2/configuration.mdx | 10 ++++++ package-lock.json | 17 +++++----- package.json | 2 +- src/components/ConfigMarkdown/index.tsx | 31 ++++++++++++++++++- src/sidebar.ts | 8 +++++ 8 files changed, 87 insertions(+), 11 deletions(-) create mode 100644 docs/self-hosted/oel/keto/configuration.mdx create mode 100644 docs/self-hosted/oel/kratos/configuration.mdx create mode 100644 docs/self-hosted/oel/oathkeeper/configuration.mdx create mode 100644 docs/self-hosted/oel/oauth2/configuration.mdx diff --git a/docs/self-hosted/oel/keto/configuration.mdx b/docs/self-hosted/oel/keto/configuration.mdx new file mode 100644 index 0000000000..484a6248b9 --- /dev/null +++ b/docs/self-hosted/oel/keto/configuration.mdx @@ -0,0 +1,10 @@ +--- +id: configuration +title: OEL Configuration +--- + +```mdx-code-block +import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; + + +``` diff --git a/docs/self-hosted/oel/kratos/configuration.mdx b/docs/self-hosted/oel/kratos/configuration.mdx new file mode 100644 index 0000000000..bffd20a384 --- /dev/null +++ b/docs/self-hosted/oel/kratos/configuration.mdx @@ -0,0 +1,10 @@ +--- +id: configuration +title: OEL Configuration +--- + +```mdx-code-block +import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; + + +``` diff --git a/docs/self-hosted/oel/oathkeeper/configuration.mdx b/docs/self-hosted/oel/oathkeeper/configuration.mdx new file mode 100644 index 0000000000..0e26458058 --- /dev/null +++ b/docs/self-hosted/oel/oathkeeper/configuration.mdx @@ -0,0 +1,10 @@ +--- +id: configuration +title: OEL Configuration +--- + +```mdx-code-block +import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; + + +``` diff --git a/docs/self-hosted/oel/oauth2/configuration.mdx b/docs/self-hosted/oel/oauth2/configuration.mdx new file mode 100644 index 0000000000..6e9b315e13 --- /dev/null +++ b/docs/self-hosted/oel/oauth2/configuration.mdx @@ -0,0 +1,10 @@ +--- +id: configuration +title: OEL Configuration +--- + +```mdx-code-block +import ConfigMarkdown from '@site/src/components/ConfigMarkdown'; + + +``` diff --git a/package-lock.json b/package-lock.json index 8a6e69573e..285d60509a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "ory-docs", "version": "1.0.0", "dependencies": { - "@apidevtools/json-schema-ref-parser": "11.7.3", + "@apidevtools/json-schema-ref-parser": "14.2.0", "@docusaurus/core": "3.8.0", "@docusaurus/plugin-client-redirects": "3.8.0", "@docusaurus/plugin-content-docs": "3.8.0", @@ -352,18 +352,21 @@ } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "11.7.3", + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-14.2.0.tgz", + "integrity": "sha512-NaGMMWwppbByagq+LwQMq6PMXHFWVu6kSwwx+eJfYTJ5zdpOvb9TIk6ZWxEEeXMUvGdVOZq3JalYsjsTZDvtkA==", "license": "MIT", "dependencies": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0" }, "engines": { - "node": ">= 16" + "node": ">= 20" }, "funding": { "url": "https://github.com/sponsors/philsturgeon" + }, + "peerDependencies": { + "@types/json-schema": "^7.0.15" } }, "node_modules/@babel/code-frame": { @@ -4736,10 +4739,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jsdevtools/ono": { - "version": "7.1.3", - "license": "MIT" - }, "node_modules/@jsep-plugin/assignment": { "version": "1.3.0", "license": "MIT", diff --git a/package.json b/package.json index 2b5d5a87e2..4b05452826 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ ] }, "dependencies": { - "@apidevtools/json-schema-ref-parser": "11.7.3", + "@apidevtools/json-schema-ref-parser": "14.2.0", "@docusaurus/core": "3.8.0", "@docusaurus/plugin-client-redirects": "3.8.0", "@docusaurus/plugin-content-docs": "3.8.0", diff --git a/src/components/ConfigMarkdown/index.tsx b/src/components/ConfigMarkdown/index.tsx index 3e23f4c181..0141758597 100644 --- a/src/components/ConfigMarkdown/index.tsx +++ b/src/components/ConfigMarkdown/index.tsx @@ -116,7 +116,36 @@ const enhance = export const oryResolver = { order: 1, canRead: /^ory:/i, - read: ({ url }) => axios.get(refs[url]).then(({ data }) => data), + read: ({ url }) => + axios.get(refs[url]).then(({ data }) => { + // Manually resolve internal $refs for schemas that have this issue + const resolveInternalRefs = (obj, definitions) => { + if (typeof obj === "object" && obj !== null) { + for (const key in obj) { + if ( + key === "$ref" && + typeof obj[key] === "string" && + obj[key].startsWith("#/definitions/") + ) { + const defName = obj[key].replace("#/definitions/", "") + if (definitions && definitions[defName]) { + // Replace the $ref with the actual definition + delete obj["$ref"] + Object.assign(obj, definitions[defName]) + } + } else if (typeof obj[key] === "object") { + resolveInternalRefs(obj[key], definitions) + } + } + } + } + + if (data.definitions) { + resolveInternalRefs(data, data.definitions) + } + + return data + }), } export default function ConfigMarkdown(props: { src: string; binary: string }) { diff --git a/src/sidebar.ts b/src/sidebar.ts index 8bd87cb744..6b22a823c6 100644 --- a/src/sidebar.ts +++ b/src/sidebar.ts @@ -1192,6 +1192,7 @@ const oel: SidebarItemsConfig = [ "self-hosted/oel/oauth2/token-prefix", "self-hosted/oel/oauth2/migrate-postgresql-ttl", "self-hosted/oel/oauth2/revert-database-migrations", + "self-hosted/oel/oauth2/configuration", ], }, { @@ -1200,6 +1201,7 @@ const oel: SidebarItemsConfig = [ items: [ "self-hosted/oel/oathkeeper/upgrade-oathkeeper", "self-hosted/oel/oathkeeper/changelog", + "self-hosted/oel/oathkeeper/configuration", ], }, { @@ -1208,8 +1210,14 @@ const oel: SidebarItemsConfig = [ items: [ "self-hosted/oel/kratos/upgrade", "self-hosted/oel/kratos/changelog", + "self-hosted/oel/kratos/configuration", ], }, + { + type: "category", + label: "Ory Keto Permissions", + items: ["self-hosted/oel/keto/configuration"], + }, { type: "category", label: "Ory Polis",