From afbc5511036fad92c16de874e810f7932733d9fc Mon Sep 17 00:00:00 2001 From: Rupank Pahuja Date: Sat, 2 Oct 2021 12:12:35 +0530 Subject: [PATCH 1/5] removed unpublished:true for sys/internal/* endpoints --- vault/logical_system_paths.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/vault/logical_system_paths.go b/vault/logical_system_paths.go index b38b293dee8f0..6270e73285c19 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -928,7 +928,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: pathInternalUINamespacesRead(b), - Unpublished: true, }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-ui-namespaces"][0]), @@ -939,7 +938,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalUIResultantACL, - Unpublished: true, }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-ui-resultant-acl"][0]), @@ -950,7 +948,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersRequests, - Unpublished: true, }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-requests"][0]), @@ -961,7 +958,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersTokens, - Unpublished: true, }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-tokens"][0]), @@ -972,7 +968,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersEntities, - Unpublished: true, }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-entities"][0]), From b72e7382062cc3494015cc766b6f14cc20e9ba2a Mon Sep 17 00:00:00 2001 From: Rupank Pahuja Date: Sat, 2 Oct 2021 12:22:01 +0530 Subject: [PATCH 2/5] added changelog file --- changelog/_12713.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog/_12713.txt diff --git a/changelog/_12713.txt b/changelog/_12713.txt new file mode 100644 index 0000000000000..4e5493751af62 --- /dev/null +++ b/changelog/_12713.txt @@ -0,0 +1,3 @@ +```release-note:bug +COMPONENT: removed unpublished true from logical_system path, making openapi spec consistent with documentation +``` \ No newline at end of file From 5d6d6aab3429635c1ad762f1a8188f145acff21a Mon Sep 17 00:00:00 2001 From: Rupank Pahuja Date: Tue, 5 Oct 2021 17:45:19 +0530 Subject: [PATCH 3/5] updated change log and added placeholder summary as these endpoints are not mentioned in docs. --- changelog/12713.txt | 3 +++ changelog/_12713.txt | 3 --- vault/logical_system_paths.go | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelog/12713.txt delete mode 100644 changelog/_12713.txt diff --git a/changelog/12713.txt b/changelog/12713.txt new file mode 100644 index 0000000000000..2204a3d897e3c --- /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/changelog/_12713.txt b/changelog/_12713.txt deleted file mode 100644 index 4e5493751af62..0000000000000 --- a/changelog/_12713.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:bug -COMPONENT: 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 6270e73285c19..adba28d7f934d 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -927,6 +927,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/ui/namespaces", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ + Summary: "There is no description of this in vault docs", Callback: pathInternalUINamespacesRead(b), }, }, @@ -937,6 +938,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/ui/resultant-acl", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ + Summary: "There is no description of this in vault docs", Callback: b.pathInternalUIResultantACL, }, }, @@ -947,6 +949,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/counters/requests", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ + Summary: "There is no description of this in vault docs", Callback: b.pathInternalCountersRequests, }, }, @@ -957,6 +960,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/counters/tokens", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ + Summary: "There is no description of this in vault docs", Callback: b.pathInternalCountersTokens, }, }, @@ -967,6 +971,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/counters/entities", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ + Summary: "There is no description of this in vault docs", Callback: b.pathInternalCountersEntities, }, }, From f817eb48cad09fac2a73be7d942b4b1325731670 Mon Sep 17 00:00:00 2001 From: Rupank Pahuja Date: Thu, 7 Oct 2021 10:26:51 +0530 Subject: [PATCH 4/5] added documentation for internal/ui/namspaces and resultant-acl --- vault/logical_system_paths.go | 5 --- .../system/internal-ui-namespaces.mdx | 38 +++++++++++++++++++ .../system/internal-ui-resultant-acl.mdx | 38 +++++++++++++++++++ 3 files changed, 76 insertions(+), 5 deletions(-) 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/vault/logical_system_paths.go b/vault/logical_system_paths.go index adba28d7f934d..6270e73285c19 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -927,7 +927,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/ui/namespaces", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ - Summary: "There is no description of this in vault docs", Callback: pathInternalUINamespacesRead(b), }, }, @@ -938,7 +937,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/ui/resultant-acl", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ - Summary: "There is no description of this in vault docs", Callback: b.pathInternalUIResultantACL, }, }, @@ -949,7 +947,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/counters/requests", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ - Summary: "There is no description of this in vault docs", Callback: b.pathInternalCountersRequests, }, }, @@ -960,7 +957,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/counters/tokens", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ - Summary: "There is no description of this in vault docs", Callback: b.pathInternalCountersTokens, }, }, @@ -971,7 +967,6 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Pattern: "internal/counters/entities", Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ - Summary: "There is no description of this in vault docs", Callback: b.pathInternalCountersEntities, }, }, 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 0000000000000..02b5ab7e24f1a --- /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 0000000000000..89f80ab195374 --- /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": [] +} +``` From 71cf7924edff90810eefe1baef3a4a5521aa4d69 Mon Sep 17 00:00:00 2001 From: Rupank Pahuja Date: Fri, 15 Oct 2021 10:40:22 +0530 Subject: [PATCH 5/5] updated log configs --- vault/logical_system_paths.go | 5 +++++ website/data/api-docs-nav-data.json | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/vault/logical_system_paths.go b/vault/logical_system_paths.go index 6270e73285c19..114406bc05f57 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -928,6 +928,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: pathInternalUINamespacesRead(b), + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-ui-namespaces"][0]), @@ -938,6 +939,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalUIResultantACL, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-ui-resultant-acl"][0]), @@ -948,6 +950,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersRequests, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-requests"][0]), @@ -958,6 +961,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersTokens, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-tokens"][0]), @@ -968,6 +972,7 @@ func (b *SystemBackend) internalPaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.ReadOperation: &framework.PathOperation{ Callback: b.pathInternalCountersEntities, + Summary: "Backwards compatibility is not guaranteed for this API", }, }, HelpSynopsis: strings.TrimSpace(sysHelp["internal-counters-entities"][0]), diff --git a/website/data/api-docs-nav-data.json b/website/data/api-docs-nav-data.json index 97c508fad7708..ce06bbd2eb484 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"