Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Adds get setting and update settings asciidoc files to security API index #104916

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference/rest-api/security.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ include::security/get-role-mappings.asciidoc[]
include::security/get-roles.asciidoc[]
include::security/get-service-accounts.asciidoc[]
include::security/get-service-credentials.asciidoc[]
include::security/get-settings.asciidoc[]
include::security/get-tokens.asciidoc[]
include::security/get-user-privileges.asciidoc[]

Expand All @@ -202,6 +203,7 @@ include::security/oidc-logout-api.asciidoc[]
include::security/query-api-key.asciidoc[]
include::security/query-user.asciidoc[]
include::security/update-api-key.asciidoc[]
include::security/update-settings.asciidoc[]
include::security/bulk-update-api-keys.asciidoc[]
include::security/saml-prepare-authentication-api.asciidoc[]
include::security/saml-authenticate-api.asciidoc[]
Expand Down
11 changes: 8 additions & 3 deletions docs/reference/rest-api/security/get-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@
<titleabbrev>Get Security settings</titleabbrev>
++++

[[security-api-get-settings-prereqs]]
==== {api-prereq-title}

* To use this API, you must have at least the `read_security` cluster privilege.

[[security-api-get-settings-desc]]
==== {api-description-title}
This API allows a user to retrieve the user-configurable settings for the Security internal index (`.security` and associated indices). Only a subset of the index settings — those that are user-configurable—will be shown. This includes:
This API allows a user to retrieve the user-configurable settings for the
Security internal index (`.security` and associated indices). Only a subset of
the index settings — those that are user-configurable—will be shown. This includes:

- `index.auto_expand_replicas`
- `index.number_of_replicas`

An example of retrieving the Security settings:
An example of retrieving the security settings:

[source,console]
-----------------------------------------------------------
Expand All @@ -24,4 +28,5 @@ GET /_security/settings
// TEST[setup:user_profiles]
// TEST[setup:service_token42]

The configurable settings can be modified using the <<security-api-update-settings,Update Security index settings>> API.
The configurable settings can be modified using the
<<security-api-update-settings,Update Security index settings>> API.
26 changes: 18 additions & 8 deletions docs/reference/rest-api/security/update-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
<titleabbrev>Update Security settings</titleabbrev>
++++

[[security-api-update-settings-prereqs]]
==== {api-prereq-title}

* To use this API, you must have at least the `manage_security` cluster privilege.

[[security-api-update-settings-desc]]
==== {api-description-title}
This API allows a user to modify the settings for the Security internal indices (`.security` and associated indices). Only a subset of settings are allowed to be modified. This includes:
This API allows a user to modify the settings for the Security internal indices
(`.security` and associated indices). Only a subset of settings are allowed to
be modified. This includes:

- `index.auto_expand_replicas`
- `index.number_of_replicas`
Expand All @@ -34,17 +38,23 @@ PUT /_security/settings
-----------------------------------------------------------
// TEST[skip:making sure all the indices have been created reliably is difficult]

The configured settings can be retrieved using the <<security-api-get-settings,Get Security index settings>> API. If a
given index is not in use on the system, but settings are provided for it, the request will be rejected - this API does
not yet support configuring the settings for these indices before they are in use.
The configured settings can be retrieved using the
<<security-api-get-settings,Get Security index settings>> API. If a given index
is not in use on the system, but settings are provided for it, the request will
be rejected - this API does not yet support configuring the settings for these
indices before they are in use.


==== {api-request-body-title}

`security`::
(Optional, object) Settings to be used for the index used for most security configuration, including Native realm users
and roles configured via the API.
(Optional, object) Settings to be used for the index used for most security
configuration, including Native realm users and roles configured via the API.

`security-tokens`::
(Optional, object) Settings to be used for the index used to store <<tokens,security-api-get-token>>.
(Optional, object) Settings to be used for the index used to store
<<security-api-get-token,tokens>>.

`security`::
(Optional, object) Settings to be used for the index used to store <<Profile,security-api-activate-user-profile>> information.
(Optional, object) Settings to be used for the index used to store
<<security-api-activate-user-profile, profile>> information.