1Search::Elasticsearch::UCsSleeiraernCctoh:n::t:8rE_il0ba:us:ttDeiidcrsePeceatrr:lc:hSD:eo:ccCuulrmiieetnnytt(a:3t:)i8o_n0::Direct::Security(3)
2
3
4

NAME

6       Search::Elasticsearch::Client::8_0::Direct::Security - Plugin providing
7       Security API for Search::Elasticsearch 8.x
8

VERSION

10       version 8.00
11

SYNOPSIS

13           my $response = $es->security->authenticate();
14
15   DESCRIPTION
16       This class extends the Search::Elasticsearch client with a "security"
17       namespace, to support the Security APIs
18       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
19       api.html>.
20
21       The full documentation for the Security feature is available here:
22       <https://www.elastic.co/guide/en/x-pack/current/xpack-security.html>
23

GENERAL METHODS

25   authenticate()
26           $response = $es->security->authenticate()
27
28       The authenticate() method checks that the "userinfo" is correct and
29       returns a list of which roles are assigned to the user.
30
31       See the authenticate docs
32       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
33       api-authenticate.html> for more information.
34
35       Query string parameters:
36           "error_trace",
37           "human"
38
39   clear_cached_realms()
40           $response = $es->security->clear_cached_realms(
41               realms => $realms       # required  (comma-separated string)
42           );
43
44       The clear_cached_realms() method clears the caches for the specified
45       realms
46
47       Query string parameters:
48           "error_trace",
49           "human",
50           "usernames"
51
52       See the clear_cached_realms docs
53       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
54       api-clear-cache.html> for more information.
55

USER METHODS

57   put_user()
58           $response = $es->security->put_user(
59               username => $username,     # required
60               body     => {...}          # required
61           );
62
63       The put_user() method creates a new user or updates an existing user.
64
65       See the User Management docs
66       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
67       api-users.html> for more information.
68
69       Query string parameters:
70           "error_trace",
71           "human"
72
73   get_user()
74           $response = $es->security->get_user(
75               username => $username | \@usernames     # optional
76           );
77
78       The get_user() method retrieves info for the specified users (or all
79       users).
80
81       See the User Management docs
82       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
83       api-users.html> for more information.
84
85       Query string parameters:
86           "error_trace",
87           "human"
88
89   delete_user()
90           $response = $es->security->delete_user(
91               username => $username       # required
92           );
93
94       The delete_user() method deletes the specified user.
95
96       See the User Management docs
97       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
98       api-users.html> for more information.
99
100       Query string parameters:
101           "error_trace",
102           "human"
103
104   change_password()
105           $response = $es->security->change_password(
106               username => $username       # optional
107               body => {
108                   password => $password   # required
109               }
110           )
111
112       The change_password() method changes the password for the specified
113       user.
114
115       See the User Management docs
116       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
117       api-users.html> for more information.
118
119   disable_user()
120           $response = $es->security->disable_user(
121               username => $username       # required
122           );
123
124       The disable_user() method disables the specified user.
125
126       See the User Management docs
127       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
128       api-users.html> for more information.
129
130       Query string parameters:
131           "error_trace",
132           "human"
133
134   enable_user()
135           $response = $es->security->enable_user(
136               username => $username       # required
137           );
138
139       The enable_user() method enables the specified user.
140
141       See the User Management docs
142       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
143       api-users.html> for more information.
144
145       Query string parameters:
146           "error_trace",
147           "human"
148

ROLE METHODS

150   put_role()
151           $response = $es->security->put_role(
152               name => $name,             # required
153               body     => {...}          # required
154           );
155
156       The put_role() method creates a new role or updates an existing role.
157
158       See the Role Management docs
159       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
160       api-roles.html> for more information.
161
162       Query string parameters:
163           "error_trace",
164           "human"
165
166   get_role()
167           $response = $es->security->get_role(
168               name => $name | \@names     # optional
169           );
170
171       The get_role() method retrieves info for the specified roles (or all
172       roles).
173
174       See the Role Management docs
175       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
176       api-roles.html> for more information.
177
178       Query string parameters:
179           "error_trace",
180           "human"
181
182   delete_role()
183           $response = $es->security->delete_role(
184               name => $name       # required
185           );
186
187       The delete_role() method deletes the specified role.
188
189       See the Role Management docs
190       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
191       api-roles.html> for more information.
192
193       Query string parameters:
194           "error_trace",
195           "human"
196
197   clear_cached_roles()
198           $response = $es->security->clear_cached_roles(
199               names => $names       # required  (comma-separated string)
200           );
201
202       The clear_cached_roles() method clears the caches for the specified
203       roles.
204
205       See the Role Management docs
206       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
207       api-roles.html> for more information.
208
209       Query string parameters:
210           "error_trace",
211           "human"
212

ROLE MAPPING METHODS

214   put_role_mapping()
215           $response = $es->security->put_role_mapping(
216               name => $name,             # required
217               body     => {...}          # required
218           );
219
220       The put_role_mapping() method creates a new role mapping or updates an
221       existing role mapping.
222
223       See the Role Mapping docs
224       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
225       api-role-mapping.html> for more information.
226
227       Query string parameters:
228           "error_trace",
229           "human"
230
231   get_role_mapping()
232           $response = $es->security->get_role_mapping(
233               name => $name,             # optional
234           );
235
236       The get_role_mapping() method retrieves one or more role mappings.
237
238       See the Role Mapping docs
239       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
240       api-role-mapping.html> for more information.
241
242       Query string parameters:
243           "error_trace",
244           "human"
245
246   delete_role_mapping()
247           $response = $es->security->delete_role_mapping(
248               name => $name,             # required
249           );
250
251       The delete_role_mapping() method deletes a role mapping.
252
253       See the Role Mapping docs
254       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
255       api-role-mapping.html> for more information.
256
257       Query string parameters:
258           "error_trace",
259           "human"
260

TOKEN METHODS

262   get_token()
263           $response = $es->security->get_token(
264               body     => {...}          # required
265           );
266
267       The get_token() method enables you to create bearer tokens for access
268       without requiring basic authentication.
269
270       See the Token Management docs
271       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
272       api-tokens.html> for more information.
273
274       Query string parameters:
275           "error_trace",
276           "human"
277
278   invalidate_token()
279           $response = $es->security->invalidate_token(
280               body     => {...}          # required
281           );
282
283       The invalidate_token() method enables you to invalidate bearer tokens
284       for access without requiring basic authentication.
285
286       See the Token Management docs
287       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
288       api-tokens.html> for more information.
289
290       Query string parameters:
291           "error_trace",
292           "human"
293

API KEY METHODS

295   create_api_key()
296           $response = $es->security->create_api_key(
297               body    => {...}            # required
298           )
299
300       The create_api_key() API is used to create API keys which can be used
301       for access instead of basic authentication.
302
303       Query string parameters:
304           "error_trace",
305           "filter_path",
306           "human",
307           "refresh"
308
309       See the Create API Key docs
310       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
311       api-create-api-key.html> for more.
312
313   get_api_key()
314           $response = $es->security->get_api_key(
315               id          => $id,         # optional
316               name        => $name,       # optional
317               realm_name  => $realm,      # optional
318               username    => $username    # optional
319           )
320
321       The get_api_key() API is used to get information about an API key.
322
323       Query string parameters:
324           "error_trace",
325           "filter_path",
326           "human",
327           "id",
328           "name",
329           "realm_name",
330           "username"
331
332       See the Get API Key docs
333       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
334       api-get-api-key.html> for more.
335
336   invalidate_api_key()
337           $response = $es->security->invalidate_api_key(
338               id          => $id,         # optional
339               name        => $name,       # optional
340               realm_name  => $realm,      # optional
341               username    => $username    # optional
342           )
343
344       The invalidate_api_key() API is used to invalidate an API key.
345
346       Query string parameters:
347           "error_trace",
348           "filter_path",
349           "human",
350           "id",
351           "name",
352           "realm_name",
353           "username"
354
355       See the Invalidate API Key docs
356       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
357       api-invalidate-api-key.html> for more.
358

USER PRIVILEGE METHODS

360   get_user_privileges()
361           $response = $es->get_user_privileges();
362
363        The C<get_user_privileges()> method retrieves the privileges granted to the current user.
364
365        Query string parameters:
366           C<error_trace>,
367           C<filter_path>,
368           C<human>
369
370   has_privileges() $response = $es->has_privileges( user    => $user,   #
371       optional body    => {...}    # required );
372        The C<has_privileges()> method checks whether the current or specified user has the listed privileges.
373
374        Query string parameters:
375           C<error_trace>,
376           C<filter_path>,
377           C<human>
378
379       See the Has Privileges docs
380       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
381       api-has-privileges.html> for more.
382

APPLICATION PRIVILEGE METHODS

384   put_privileges()
385           $response = $es->put_privileges(
386               application     => $application,    # required
387               name            => $name,           # required
388               body            => {...}            # required
389           );
390
391        The C<put_privileges()> method creates or updates the named privilege for a particular application.
392
393        Query string parameters:
394           C<error_trace>,
395           C<filter_path>,
396           C<human>,
397           C<refresh>
398
399       See the Create or Update Application Privileges docs
400       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
401       api-put-privileges.html> for more.
402
403   get_privileges()
404           $response = $es->get_privileges(
405               application     => $application,    # required
406               name            => $name,           # required
407           );
408
409        The C<get_privileges()> method retrieves the named privilege for a particular application.
410
411        Query string parameters:
412           C<error_trace>,
413           C<filter_path>,
414           C<human>
415
416       See the Get Application Privileges docs
417       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
418       api-get-privileges.html> for more.
419
420   delete_privileges()
421           $response = $es->delete_privileges(
422               application     => $application,    # required
423               name            => $name,           # required
424           );
425
426        The C<delete_privileges()> method deletes the named privilege for a particular application.
427
428        Query string parameters:
429           C<error_trace>,
430           C<filter_path>,
431           C<human>,
432           C<refresh>
433
434       See the Delete Application Privileges docs
435       <https://www.elastic.co/guide/en/elasticsearch/reference/current/security-
436       api-delete-privilege.html> for more.
437

AUTHOR

439       Enrico Zimuel <enrico.zimuel@elastic.co>
440
442       This software is Copyright (c) 2022 by Elasticsearch BV.
443
444       This is free software, licensed under:
445
446         The Apache License, Version 2.0, January 2004
447
448
449
450perl v5.36.0           Search::Ela2s0t2i3c-s0e1a-r2c0h::Client::8_0::Direct::Security(3)
Impressum