Skip to content

Commit

Permalink
[DOCS] Adds get setting and update settings asciidoc files to securit…
Browse files Browse the repository at this point in the history
…y API index (#104916) (#104924)

* [DOCS] Adds get setting and update settings asciidoc files to security API index.

* [DOCS] Fixes references in docs.
  • Loading branch information
szabosteve authored Jan 30, 2024
1 parent 98d1c72 commit c95df79
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/reference/rest-api/security.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,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 @@ -200,6 +201,7 @@ include::security/oidc-authenticate-api.asciidoc[]
include::security/oidc-logout-api.asciidoc[]
include::security/query-api-key.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.

0 comments on commit c95df79

Please sign in to comment.