Skip to content

Commit f453058

Browse files
author
Adam Locke
authored
[DOCS] Updating password usage for create user API (#63292) (#63440)
* Updating password usage. * Add asterisk * Add explanation of asterisk for settings that are only sometimes required. * Clarify change password guidance
1 parent 659988a commit f453058

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

x-pack/docs/en/rest-api/security/create-users.asciidoc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<titleabbrev>Create or update users</titleabbrev>
66
++++
77

8-
Adds and updates users in the native realm. These users are commonly referred
8+
Adds and updates users in the native realm. These users are commonly referred
99
to as _native users_.
1010

1111

@@ -14,7 +14,7 @@ to as _native users_.
1414

1515
`POST /_security/user/<username>` +
1616

17-
`PUT /_security/user/<username>`
17+
`PUT /_security/user/<username>`
1818

1919

2020
[[security-api-put-user-prereqs]]
@@ -26,12 +26,12 @@ to as _native users_.
2626
[[security-api-put-user-desc]]
2727
==== {api-description-title}
2828

29-
When updating a user, you can update everything but its `username` and `password`.
30-
To change a user's password, use the
31-
<<security-api-change-password, change password API>>.
29+
A `password` is required for adding a new user but is optional when updating an
30+
existing user. To change a user's password without updating any other fields,
31+
use the <<security-api-change-password, change password API>>.
3232

33-
For more information about the native realm, see
34-
<<realms>> and <<native-realm>>.
33+
For more information about the native realm, see
34+
<<realms>> and <<native-realm>>.
3535

3636
[[security-api-put-user-path-params]]
3737
==== {api-path-parms-title}
@@ -73,7 +73,7 @@ The following parameters can be specified in the body of a POST or PUT request:
7373
(object) Arbitrary metadata that you want to associate with the user.
7474

7575
`password`::
76-
(string) The user's password. Passwords must be at least 6 characters long.
76+
(Required<<not-always-required,*>>, string) The user's password. Passwords must be at least 6 characters long.
7777
+
7878
When adding a user, one of `password` or `password_hash` is required.
7979
When updating an existing user, the password is optional, so that other
@@ -98,6 +98,10 @@ used in the same request.
9898
access permissions. To create a user without any roles, specify an empty list:
9999
`[]`.
100100

101+
--
102+
[[not-always-required]]
103+
*Indicates that the setting is required in some, but not all situations.
104+
--
101105

102106
[[security-api-put-user-example]]
103107
==== {api-examples-title}

0 commit comments

Comments
 (0)