From 9eb9bedbd6915c7ab0963d39afdba6a1b56e1046 Mon Sep 17 00:00:00 2001 From: saltperfect Date: Sat, 16 Oct 2021 00:20:14 +0530 Subject: [PATCH] Removed unpublished:true for sys/internal/* endpoints (#12713) * removed unpublished:true for sys/internal/* endpoints * added changelog file * updated change log and added placeholder summary as these endpoints are not mentioned in docs. * added documentation for internal/ui/namspaces and resultant-acl * updated log configs --- changelog/12713.txt | 3 ++ vault/logical_system_paths.go | 10 ++--- .../system/internal-ui-namespaces.mdx | 38 +++++++++++++++++++ .../system/internal-ui-resultant-acl.mdx | 38 +++++++++++++++++++ website/data/api-docs-nav-data.json | 8 ++++ 5 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 changelog/12713.txt create mode 100644 website/content/api-docs/system/internal-ui-namespaces.mdx create mode 100644 website/content/api-docs/system/internal-ui-resultant-acl.mdx diff --git a/changelog/12713.txt b/changelog/12713.txt new file mode 100644 index 000000000000..2204a3d897e3 --- /dev/null +++ b/changelog/12713.txt @@ -0,0 +1,3 @@ +```release-note:bug +http: removed unpublished true from logical_system path, making openapi spec consistent with documentation +``` \ No newline at end of file diff --git a/vault/logical_system_paths.go b/vault/logical_system_paths.go index b38b293dee8f..114406bc05f5 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -928,7 +928,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: pathInternalUINamespacesRead(b), - Unpublished: true, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-ui-namespaces"][0]), @@ -939,7 +939,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalUIResultantACL, - Unpublished: true, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-ui-resultant-acl"][0]), @@ -950,7 +950,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersRequests, - Unpublished: true, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-requests"][0]), @@ -961,7 +961,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersTokens, - Unpublished: true, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-tokens"][0]), @@ -972,7 +972,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersEntities, - Unpublished: true, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-entities"][0]), diff --git a/website/content/api-docs/system/internal-ui-namespaces.mdx b/website/content/api-docs/system/internal-ui-namespaces.mdx new file mode 100644 index 000000000000..02b5ab7e24f1 --- /dev/null +++ b/website/content/api-docs/system/internal-ui-namespaces.mdx @@ -0,0 +1,38 @@ +--- +layout: api +page_title: /sys/internal/ui/namespaces - HTTP API +description: >- + The `/sys/internal/ui/namespaces` endpoint exposes namespaces to the UI. +--- + +# `/sys/internal/ui/namespaces` + +The `/sys/internal/ui/namespaces` endpoint is used to expose namespaces +to the UI so that it can change its behavior in response, even before a user logs in. + +This is currently only being used internally for the UI and is +an unauthenticated endpoint. Due to the nature of its intended usage, there is no +guarantee on backwards compatibility for this endpoint. + +## Get Namespaces + +This endpoint lists the namespaces relevant to the UI. + +| Method | Path | +| :----- | :------------------------------- | +| `GET` | `/sys/internal/ui/namespaces` | + +### Sample Request + +```shell-session +$ curl \ + http://127.0.0.1:8200/v1/sys/internal/ui/namespaces +``` + +### Sample Response + +```json +{ + "namespaces": [] +} +``` diff --git a/website/content/api-docs/system/internal-ui-resultant-acl.mdx b/website/content/api-docs/system/internal-ui-resultant-acl.mdx new file mode 100644 index 000000000000..89f80ab19537 --- /dev/null +++ b/website/content/api-docs/system/internal-ui-resultant-acl.mdx @@ -0,0 +1,38 @@ +--- +layout: api +page_title: /sys/internal/ui/resultant-acl - HTTP API +description: >- + The `/sys/internal/ui/resultant-acl` endpoint exposes resultant-acl to the UI. +--- + +# `/sys/internal/ui/resultant-acl` + +The `/sys/internal/ui/resultant-acl` endpoint is used to expose resultant-acl +to the UI so that it can change its behavior in response, even before a user logs in. + +This is currently only being used internally for the UI and is +an unauthenticated endpoint. Due to the nature of its intended usage, there is no +guarantee on backwards compatibility for this endpoint. + +## Get Resultant-acl + +This endpoint lists the resultant-acl relevant to the UI. + +| Method | Path | +| :----- | :------------------------------- | +| `GET` | `/sys/internal/ui/resultant-acl` | + +### Sample Request + +```shell-session +$ curl \ + http://127.0.0.1:8200/v1/sys/internal/ui/resultant-acl +``` + +### Sample Response + +```json +{ + "resultant-acl": [] +} +``` diff --git a/website/data/api-docs-nav-data.json b/website/data/api-docs-nav-data.json index 97c508fad770..ce06bbd2eb48 100644 --- a/website/data/api-docs-nav-data.json +++ b/website/data/api-docs-nav-data.json @@ -409,6 +409,14 @@ "title": "/sys/internal/ui/mounts", "path": "system/internal-ui-mounts" }, + { + "title": "/sys/internal/ui/namespaces", + "path": "system/internal-ui-namespaces" + }, + { + "title": "/sys/internal/ui/resultant-acl", + "path": "system/internal-ui-resultant-acl" + }, { "title": "/sys/key-status", "path": "system/key-status"