@@ -32,10 +32,13 @@ cluster privilege can create API keys.
32
32
For security reasons, we recommend using a unique API key per {agent}. You
33
33
can create as many API keys per user as necessary.
34
34
35
+ If you are using link:{serverless-docs}[{serverless-full}], API key authentication is required.
36
+
35
37
To create an API key for {agent}:
36
38
37
- . In {kib}, navigate to *{stack-manage-app} > API keys* and click
38
- *Create API key*.
39
+ . In an {ecloud} or premises environment, in {kib} navigate to *{stack-manage-app} > API keys* and click *Create API key*.
40
+ +
41
+ In a {serverless-short} environment, in {kib} navigate to *Project settings* > *Management* > *API keys* and click *Create API key*.
39
42
40
43
. Enter a name for your API key and select *Restrict privileges*. In the role
41
44
descriptors box, copy and paste the following JSON. This example creates an
@@ -97,7 +100,7 @@ outputs:
97
100
api_key: _Nj4oH0aWZVGqM7MGop8:349p_U1ERHyIc4Nm8_AYkw <1>
98
101
[...]
99
102
----
100
- <1> The format of this key is `<id>. <key>`. Base64 encoded API keys are not
103
+ <1> The format of this key is `<id>: <key>`. Base64 encoded API keys are not
101
104
currently supported in this configuration.
102
105
103
106
For more information about creating API keys in {kib}, see
@@ -108,11 +111,11 @@ For more information about creating API keys in {kib}, see
108
111
== Create a standalone agent role
109
112
110
113
Although it's recommended that you use an API key instead of a username and
111
- password to access {es}, you can create a role with the required privileges,
114
+ password to access {es} (and an API key is required in a {serverless} environment) , you can create a role with the required privileges,
112
115
assign it to a user, and specify the user's credentials in the
113
116
`elastic-agent.yml` file.
114
117
115
- . In {kib}, go to *{stack-manage-app} > Roles*.
118
+ . In {kib}, for a go to *{stack-manage-app} > Roles*.
116
119
117
120
. Click *Create role* and enter a name for the role.
118
121
0 commit comments