elasticsearch 8.17.1__py3-none-any.whl → 8.17.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elasticsearch/__init__.py +2 -2
- elasticsearch/_async/client/__init__.py +1971 -779
- elasticsearch/_async/client/async_search.py +33 -22
- elasticsearch/_async/client/autoscaling.py +27 -21
- elasticsearch/_async/client/cat.py +216 -141
- elasticsearch/_async/client/ccr.py +96 -70
- elasticsearch/_async/client/cluster.py +150 -142
- elasticsearch/_async/client/connector.py +182 -86
- elasticsearch/_async/client/dangling_indices.py +19 -13
- elasticsearch/_async/client/enrich.py +25 -6
- elasticsearch/_async/client/eql.py +22 -9
- elasticsearch/_async/client/esql.py +295 -3
- elasticsearch/_async/client/features.py +25 -25
- elasticsearch/_async/client/fleet.py +15 -9
- elasticsearch/_async/client/graph.py +9 -8
- elasticsearch/_async/client/ilm.py +85 -55
- elasticsearch/_async/client/indices.py +692 -549
- elasticsearch/_async/client/inference.py +32 -28
- elasticsearch/_async/client/ingest.py +61 -22
- elasticsearch/_async/client/license.py +48 -31
- elasticsearch/_async/client/logstash.py +17 -6
- elasticsearch/_async/client/migration.py +23 -14
- elasticsearch/_async/client/ml.py +532 -284
- elasticsearch/_async/client/monitoring.py +5 -2
- elasticsearch/_async/client/nodes.py +43 -27
- elasticsearch/_async/client/query_rules.py +51 -25
- elasticsearch/_async/client/rollup.py +111 -73
- elasticsearch/_async/client/search_application.py +49 -21
- elasticsearch/_async/client/searchable_snapshots.py +21 -8
- elasticsearch/_async/client/security.py +810 -472
- elasticsearch/_async/client/shutdown.py +31 -26
- elasticsearch/_async/client/simulate.py +16 -22
- elasticsearch/_async/client/slm.py +55 -30
- elasticsearch/_async/client/snapshot.py +173 -192
- elasticsearch/_async/client/sql.py +37 -16
- elasticsearch/_async/client/ssl.py +16 -17
- elasticsearch/_async/client/synonyms.py +50 -29
- elasticsearch/_async/client/tasks.py +74 -39
- elasticsearch/_async/client/text_structure.py +61 -52
- elasticsearch/_async/client/transform.py +108 -79
- elasticsearch/_async/client/watcher.py +93 -57
- elasticsearch/_async/client/xpack.py +16 -7
- elasticsearch/_async/helpers.py +1 -1
- elasticsearch/_sync/client/__init__.py +1971 -779
- elasticsearch/_sync/client/async_search.py +33 -22
- elasticsearch/_sync/client/autoscaling.py +27 -21
- elasticsearch/_sync/client/cat.py +216 -141
- elasticsearch/_sync/client/ccr.py +96 -70
- elasticsearch/_sync/client/cluster.py +150 -142
- elasticsearch/_sync/client/connector.py +182 -86
- elasticsearch/_sync/client/dangling_indices.py +19 -13
- elasticsearch/_sync/client/enrich.py +25 -6
- elasticsearch/_sync/client/eql.py +22 -9
- elasticsearch/_sync/client/esql.py +295 -3
- elasticsearch/_sync/client/features.py +25 -25
- elasticsearch/_sync/client/fleet.py +15 -9
- elasticsearch/_sync/client/graph.py +9 -8
- elasticsearch/_sync/client/ilm.py +85 -55
- elasticsearch/_sync/client/indices.py +692 -549
- elasticsearch/_sync/client/inference.py +32 -28
- elasticsearch/_sync/client/ingest.py +61 -22
- elasticsearch/_sync/client/license.py +48 -31
- elasticsearch/_sync/client/logstash.py +17 -6
- elasticsearch/_sync/client/migration.py +23 -14
- elasticsearch/_sync/client/ml.py +532 -284
- elasticsearch/_sync/client/monitoring.py +5 -2
- elasticsearch/_sync/client/nodes.py +43 -27
- elasticsearch/_sync/client/query_rules.py +51 -25
- elasticsearch/_sync/client/rollup.py +111 -73
- elasticsearch/_sync/client/search_application.py +49 -21
- elasticsearch/_sync/client/searchable_snapshots.py +21 -8
- elasticsearch/_sync/client/security.py +810 -472
- elasticsearch/_sync/client/shutdown.py +31 -26
- elasticsearch/_sync/client/simulate.py +16 -22
- elasticsearch/_sync/client/slm.py +55 -30
- elasticsearch/_sync/client/snapshot.py +173 -192
- elasticsearch/_sync/client/sql.py +37 -16
- elasticsearch/_sync/client/ssl.py +16 -17
- elasticsearch/_sync/client/synonyms.py +50 -29
- elasticsearch/_sync/client/tasks.py +74 -39
- elasticsearch/_sync/client/text_structure.py +61 -52
- elasticsearch/_sync/client/transform.py +108 -79
- elasticsearch/_sync/client/utils.py +1 -1
- elasticsearch/_sync/client/watcher.py +93 -57
- elasticsearch/_sync/client/xpack.py +16 -7
- elasticsearch/_version.py +1 -1
- elasticsearch/client.py +2 -0
- elasticsearch/helpers/actions.py +1 -1
- elasticsearch/helpers/vectorstore/_sync/vectorstore.py +4 -1
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/METADATA +1 -1
- elasticsearch-8.17.2.dist-info/RECORD +119 -0
- elasticsearch-8.17.1.dist-info/RECORD +0 -119
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/WHEEL +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/LICENSE +0 -0
- {elasticsearch-8.17.1.dist-info → elasticsearch-8.17.2.dist-info}/licenses/NOTICE +0 -0
|
@@ -44,21 +44,19 @@ class SecurityClient(NamespacedClient):
|
|
|
44
44
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
45
45
|
) -> ObjectApiResponse[t.Any]:
|
|
46
46
|
"""
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
the document if it was disabled. Any updates do not change existing content for
|
|
61
|
-
either the `labels` or `data` fields.
|
|
47
|
+
.. raw:: html
|
|
48
|
+
|
|
49
|
+
<p>Activate a user profile.</p>
|
|
50
|
+
<p>Create or update a user profile on behalf of another user.</p>
|
|
51
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
|
|
52
|
+
Individual users and external applications should not call this API directly.
|
|
53
|
+
The calling application must have either an <code>access_token</code> or a combination of <code>username</code> and <code>password</code> for the user that the profile document is intended for.
|
|
54
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
55
|
+
<p>This API creates or updates a profile document for end users with information that is extracted from the user's authentication object including <code>username</code>, <code>full_name,</code> <code>roles</code>, and the authentication realm.
|
|
56
|
+
For example, in the JWT <code>access_token</code> case, the profile user's <code>username</code> is extracted from the JWT token claim pointed to by the <code>claims.principal</code> setting of the JWT realm that authenticated the token.</p>
|
|
57
|
+
<p>When updating a profile document, the API enables the document if it was disabled.
|
|
58
|
+
Any updates do not change existing content for either the <code>labels</code> or <code>data</code> fields.</p>
|
|
59
|
+
|
|
62
60
|
|
|
63
61
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-activate-user-profile.html>`_
|
|
64
62
|
|
|
@@ -117,12 +115,14 @@ class SecurityClient(NamespacedClient):
|
|
|
117
115
|
pretty: t.Optional[bool] = None,
|
|
118
116
|
) -> ObjectApiResponse[t.Any]:
|
|
119
117
|
"""
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
.. raw:: html
|
|
119
|
+
|
|
120
|
+
<p>Authenticate a user.</p>
|
|
121
|
+
<p>Authenticates a user and returns information about the authenticated user.
|
|
122
|
+
Include the user information in a <a href="https://en.wikipedia.org/wiki/Basic_access_authentication">basic auth header</a>.
|
|
123
|
+
A successful call returns a JSON structure that shows user information such as their username, the roles that are assigned to the user, any assigned metadata, and information about the realms that authenticated and authorized the user.
|
|
124
|
+
If the user cannot be authenticated, this API returns a 401 status code.</p>
|
|
125
|
+
|
|
126
126
|
|
|
127
127
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-authenticate.html>`_
|
|
128
128
|
"""
|
|
@@ -164,9 +164,12 @@ class SecurityClient(NamespacedClient):
|
|
|
164
164
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
165
165
|
) -> ObjectApiResponse[t.Any]:
|
|
166
166
|
"""
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
.. raw:: html
|
|
168
|
+
|
|
169
|
+
<p>Bulk delete roles.</p>
|
|
170
|
+
<p>The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
|
|
171
|
+
The bulk delete roles API cannot delete roles that are defined in roles files.</p>
|
|
172
|
+
|
|
170
173
|
|
|
171
174
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-delete-role.html>`_
|
|
172
175
|
|
|
@@ -222,9 +225,12 @@ class SecurityClient(NamespacedClient):
|
|
|
222
225
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
223
226
|
) -> ObjectApiResponse[t.Any]:
|
|
224
227
|
"""
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
.. raw:: html
|
|
229
|
+
|
|
230
|
+
<p>Bulk create or update roles.</p>
|
|
231
|
+
<p>The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
|
|
232
|
+
The bulk create or update roles API cannot update roles that are defined in roles files.</p>
|
|
233
|
+
|
|
228
234
|
|
|
229
235
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-put-role.html>`_
|
|
230
236
|
|
|
@@ -280,23 +286,19 @@ class SecurityClient(NamespacedClient):
|
|
|
280
286
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
281
287
|
) -> ObjectApiResponse[t.Any]:
|
|
282
288
|
"""
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
created or last modified. A successful request returns a JSON structure that
|
|
297
|
-
contains the IDs of all updated API keys, the IDs of API keys that already had
|
|
298
|
-
the requested changes and did not require an update, and error details for any
|
|
299
|
-
failed update.
|
|
289
|
+
.. raw:: html
|
|
290
|
+
|
|
291
|
+
<p>Bulk update API keys.
|
|
292
|
+
Update the attributes for multiple API keys.</p>
|
|
293
|
+
<p>IMPORTANT: It is not possible to use an API key as the authentication credential for this API. To update API keys, the owner user's credentials are required.</p>
|
|
294
|
+
<p>This API is similar to the update API key API but enables you to apply the same update to multiple API keys in one API call. This operation can greatly improve performance over making individual updates.</p>
|
|
295
|
+
<p>It is not possible to update expired or invalidated API keys.</p>
|
|
296
|
+
<p>This API supports updates to API key access scope, metadata and expiration.
|
|
297
|
+
The access scope of each API key is derived from the <code>role_descriptors</code> you specify in the request and a snapshot of the owner user's permissions at the time of the request.
|
|
298
|
+
The snapshot of the owner's permissions is updated automatically on every call.</p>
|
|
299
|
+
<p>IMPORTANT: If you don't specify <code>role_descriptors</code> in the request, a call to this API might still change an API key's access scope. This change can occur if the owner user's permissions have changed since the API key was created or last modified.</p>
|
|
300
|
+
<p>A successful request returns a JSON structure that contains the IDs of all updated API keys, the IDs of API keys that already had the requested changes and did not require an update, and error details for any failed update.</p>
|
|
301
|
+
|
|
300
302
|
|
|
301
303
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-bulk-update-api-keys.html>`_
|
|
302
304
|
|
|
@@ -370,8 +372,11 @@ class SecurityClient(NamespacedClient):
|
|
|
370
372
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
371
373
|
) -> ObjectApiResponse[t.Any]:
|
|
372
374
|
"""
|
|
373
|
-
|
|
374
|
-
|
|
375
|
+
.. raw:: html
|
|
376
|
+
|
|
377
|
+
<p>Change passwords.</p>
|
|
378
|
+
<p>Change the passwords of users in the native realm and built-in users.</p>
|
|
379
|
+
|
|
375
380
|
|
|
376
381
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-change-password.html>`_
|
|
377
382
|
|
|
@@ -433,8 +438,12 @@ class SecurityClient(NamespacedClient):
|
|
|
433
438
|
pretty: t.Optional[bool] = None,
|
|
434
439
|
) -> ObjectApiResponse[t.Any]:
|
|
435
440
|
"""
|
|
436
|
-
|
|
437
|
-
|
|
441
|
+
.. raw:: html
|
|
442
|
+
|
|
443
|
+
<p>Clear the API key cache.</p>
|
|
444
|
+
<p>Evict a subset of all entries from the API key cache.
|
|
445
|
+
The cache is also automatically cleared on state changes of the security index.</p>
|
|
446
|
+
|
|
438
447
|
|
|
439
448
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-api-key-cache.html>`_
|
|
440
449
|
|
|
@@ -475,13 +484,17 @@ class SecurityClient(NamespacedClient):
|
|
|
475
484
|
pretty: t.Optional[bool] = None,
|
|
476
485
|
) -> ObjectApiResponse[t.Any]:
|
|
477
486
|
"""
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
487
|
+
.. raw:: html
|
|
488
|
+
|
|
489
|
+
<p>Clear the privileges cache.</p>
|
|
490
|
+
<p>Evict privileges from the native application privilege cache.
|
|
491
|
+
The cache is also automatically cleared for applications that have their privileges updated.</p>
|
|
492
|
+
|
|
481
493
|
|
|
482
494
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-privilege-cache.html>`_
|
|
483
495
|
|
|
484
|
-
:param application: A comma-separated list of
|
|
496
|
+
:param application: A comma-separated list of applications. To clear all applications,
|
|
497
|
+
use an asterism (`*`). It does not support other wildcard patterns.
|
|
485
498
|
"""
|
|
486
499
|
if application in SKIP_IN_PATH:
|
|
487
500
|
raise ValueError("Empty value passed for parameter 'application'")
|
|
@@ -518,13 +531,23 @@ class SecurityClient(NamespacedClient):
|
|
|
518
531
|
usernames: t.Optional[t.Sequence[str]] = None,
|
|
519
532
|
) -> ObjectApiResponse[t.Any]:
|
|
520
533
|
"""
|
|
521
|
-
|
|
522
|
-
|
|
534
|
+
.. raw:: html
|
|
535
|
+
|
|
536
|
+
<p>Clear the user cache.</p>
|
|
537
|
+
<p>Evict users from the user cache.
|
|
538
|
+
You can completely clear the cache or evict specific users.</p>
|
|
539
|
+
<p>User credentials are cached in memory on each node to avoid connecting to a remote authentication service or hitting the disk for every incoming request.
|
|
540
|
+
There are realm settings that you can use to configure the user cache.
|
|
541
|
+
For more information, refer to the documentation about controlling the user cache.</p>
|
|
542
|
+
|
|
523
543
|
|
|
524
544
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-cache.html>`_
|
|
525
545
|
|
|
526
|
-
:param realms:
|
|
527
|
-
|
|
546
|
+
:param realms: A comma-separated list of realms. To clear all realms, use an
|
|
547
|
+
asterisk (`*`). It does not support other wildcard patterns.
|
|
548
|
+
:param usernames: A comma-separated list of the users to clear from the cache.
|
|
549
|
+
If you do not specify this parameter, the API evicts all users from the user
|
|
550
|
+
cache.
|
|
528
551
|
"""
|
|
529
552
|
if realms in SKIP_IN_PATH:
|
|
530
553
|
raise ValueError("Empty value passed for parameter 'realms'")
|
|
@@ -562,11 +585,17 @@ class SecurityClient(NamespacedClient):
|
|
|
562
585
|
pretty: t.Optional[bool] = None,
|
|
563
586
|
) -> ObjectApiResponse[t.Any]:
|
|
564
587
|
"""
|
|
565
|
-
|
|
588
|
+
.. raw:: html
|
|
589
|
+
|
|
590
|
+
<p>Clear the roles cache.</p>
|
|
591
|
+
<p>Evict roles from the native role cache.</p>
|
|
592
|
+
|
|
566
593
|
|
|
567
594
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-role-cache.html>`_
|
|
568
595
|
|
|
569
|
-
:param name:
|
|
596
|
+
:param name: A comma-separated list of roles to evict from the role cache. To
|
|
597
|
+
evict all roles, use an asterisk (`*`). It does not support other wildcard
|
|
598
|
+
patterns.
|
|
570
599
|
"""
|
|
571
600
|
if name in SKIP_IN_PATH:
|
|
572
601
|
raise ValueError("Empty value passed for parameter 'name'")
|
|
@@ -604,14 +633,23 @@ class SecurityClient(NamespacedClient):
|
|
|
604
633
|
pretty: t.Optional[bool] = None,
|
|
605
634
|
) -> ObjectApiResponse[t.Any]:
|
|
606
635
|
"""
|
|
607
|
-
|
|
608
|
-
|
|
636
|
+
.. raw:: html
|
|
637
|
+
|
|
638
|
+
<p>Clear service account token caches.</p>
|
|
639
|
+
<p>Evict a subset of all entries from the service account token caches.
|
|
640
|
+
Two separate caches exist for service account tokens: one cache for tokens backed by the <code>service_tokens</code> file, and another for tokens backed by the <code>.security</code> index.
|
|
641
|
+
This API clears matching entries from both caches.</p>
|
|
642
|
+
<p>The cache for service account tokens backed by the <code>.security</code> index is cleared automatically on state changes of the security index.
|
|
643
|
+
The cache for tokens backed by the <code>service_tokens</code> file is cleared automatically on file changes.</p>
|
|
644
|
+
|
|
609
645
|
|
|
610
646
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-clear-service-token-caches.html>`_
|
|
611
647
|
|
|
612
|
-
:param namespace:
|
|
613
|
-
:param service:
|
|
614
|
-
:param name: A comma-separated list of
|
|
648
|
+
:param namespace: The namespace, which is a top-level grouping of service accounts.
|
|
649
|
+
:param service: The name of the service, which must be unique within its namespace.
|
|
650
|
+
:param name: A comma-separated list of token names to evict from the service
|
|
651
|
+
account token caches. Use a wildcard (`*`) to evict all tokens that belong
|
|
652
|
+
to a service account. It does not support other wildcard patterns.
|
|
615
653
|
"""
|
|
616
654
|
if namespace in SKIP_IN_PATH:
|
|
617
655
|
raise ValueError("Empty value passed for parameter 'namespace'")
|
|
@@ -664,31 +702,43 @@ class SecurityClient(NamespacedClient):
|
|
|
664
702
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
665
703
|
) -> ObjectApiResponse[t.Any]:
|
|
666
704
|
"""
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
705
|
+
.. raw:: html
|
|
706
|
+
|
|
707
|
+
<p>Create an API key.</p>
|
|
708
|
+
<p>Create an API key for access without requiring basic authentication.</p>
|
|
709
|
+
<p>IMPORTANT: If the credential that is used to authenticate this request is an API key, the derived API key cannot have any privileges.
|
|
710
|
+
If you specify privileges, the API returns an error.</p>
|
|
711
|
+
<p>A successful request returns a JSON structure that contains the API key, its unique id, and its name.
|
|
712
|
+
If applicable, it also returns expiration information for the API key in milliseconds.</p>
|
|
713
|
+
<p>NOTE: By default, API keys never expire. You can specify expiration information when you create the API keys.</p>
|
|
714
|
+
<p>The API keys are created by the Elasticsearch API key service, which is automatically enabled.
|
|
715
|
+
To configure or turn off the API key service, refer to API key service setting documentation.</p>
|
|
716
|
+
|
|
672
717
|
|
|
673
718
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-api-key.html>`_
|
|
674
719
|
|
|
675
|
-
:param expiration:
|
|
676
|
-
expire.
|
|
720
|
+
:param expiration: The expiration time for the API key. By default, API keys
|
|
721
|
+
never expire.
|
|
677
722
|
:param metadata: Arbitrary metadata that you want to associate with the API key.
|
|
678
723
|
It supports nested data structure. Within the metadata object, keys beginning
|
|
679
724
|
with `_` are reserved for system usage.
|
|
680
|
-
:param name:
|
|
725
|
+
:param name: A name for the API key.
|
|
681
726
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
682
727
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
683
728
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
684
|
-
:param role_descriptors: An array of role descriptors for this API key.
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
or update roles API.
|
|
729
|
+
:param role_descriptors: An array of role descriptors for this API key. When
|
|
730
|
+
it is not specified or it is an empty array, the API key will have a point
|
|
731
|
+
in time snapshot of permissions of the authenticated user. If you supply
|
|
732
|
+
role descriptors, the resultant permissions are an intersection of API keys
|
|
733
|
+
permissions and the authenticated user's permissions thereby limiting the
|
|
734
|
+
access scope for API keys. The structure of role descriptor is the same as
|
|
735
|
+
the request for the create role API. For more details, refer to the create
|
|
736
|
+
or update roles API. NOTE: Due to the way in which this permission intersection
|
|
737
|
+
is calculated, it is not possible to create an API key that is a child of
|
|
738
|
+
another API key, unless the derived key is created without any privileges.
|
|
739
|
+
In this case, you must explicitly specify a role descriptor with no privileges.
|
|
740
|
+
The derived API key can be used for authentication; it will not have authority
|
|
741
|
+
to call Elasticsearch APIs.
|
|
692
742
|
"""
|
|
693
743
|
__path_parts: t.Dict[str, str] = {}
|
|
694
744
|
__path = "/_security/api_key"
|
|
@@ -741,21 +791,19 @@ class SecurityClient(NamespacedClient):
|
|
|
741
791
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
742
792
|
) -> ObjectApiResponse[t.Any]:
|
|
743
793
|
"""
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
API key API. Attempting to update them with the update REST API key API or the
|
|
758
|
-
bulk update REST API keys API will result in an error.
|
|
794
|
+
.. raw:: html
|
|
795
|
+
|
|
796
|
+
<p>Create a cross-cluster API key.</p>
|
|
797
|
+
<p>Create an API key of the <code>cross_cluster</code> type for the API key based remote cluster access.
|
|
798
|
+
A <code>cross_cluster</code> API key cannot be used to authenticate through the REST interface.</p>
|
|
799
|
+
<p>IMPORTANT: To authenticate this request you must use a credential that is not an API key. Even if you use an API key that has the required privilege, the API returns an error.</p>
|
|
800
|
+
<p>Cross-cluster API keys are created by the Elasticsearch API key service, which is automatically enabled.</p>
|
|
801
|
+
<p>NOTE: Unlike REST API keys, a cross-cluster API key does not capture permissions of the authenticated user. The API key’s effective permission is exactly as specified with the <code>access</code> property.</p>
|
|
802
|
+
<p>A successful request returns a JSON structure that contains the API key, its unique ID, and its name. If applicable, it also returns expiration information for the API key in milliseconds.</p>
|
|
803
|
+
<p>By default, API keys never expire. You can specify expiration information when you create the API keys.</p>
|
|
804
|
+
<p>Cross-cluster API keys can only be updated with the update cross-cluster API key API.
|
|
805
|
+
Attempting to update them with the update REST API key API or the bulk update REST API keys API will result in an error.</p>
|
|
806
|
+
|
|
759
807
|
|
|
760
808
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-cross-cluster-api-key.html>`_
|
|
761
809
|
|
|
@@ -824,14 +872,26 @@ class SecurityClient(NamespacedClient):
|
|
|
824
872
|
] = None,
|
|
825
873
|
) -> ObjectApiResponse[t.Any]:
|
|
826
874
|
"""
|
|
827
|
-
|
|
828
|
-
|
|
875
|
+
.. raw:: html
|
|
876
|
+
|
|
877
|
+
<p>Create a service account token.</p>
|
|
878
|
+
<p>Create a service accounts token for access without requiring basic authentication.</p>
|
|
879
|
+
<p>NOTE: Service account tokens never expire.
|
|
880
|
+
You must actively delete them if they are no longer needed.</p>
|
|
881
|
+
|
|
829
882
|
|
|
830
883
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-create-service-token.html>`_
|
|
831
884
|
|
|
832
|
-
:param namespace:
|
|
833
|
-
|
|
834
|
-
:param
|
|
885
|
+
:param namespace: The name of the namespace, which is a top-level grouping of
|
|
886
|
+
service accounts.
|
|
887
|
+
:param service: The name of the service.
|
|
888
|
+
:param name: The name for the service account token. If omitted, a random name
|
|
889
|
+
will be generated. Token names must be at least one and no more than 256
|
|
890
|
+
characters. They can contain alphanumeric characters (a-z, A-Z, 0-9), dashes
|
|
891
|
+
(`-`), and underscores (`_`), but cannot begin with an underscore. NOTE:
|
|
892
|
+
Token names must be unique in the context of the associated service account.
|
|
893
|
+
They must also be globally unique with their fully qualified names, which
|
|
894
|
+
are comprised of the service account principal and token name, such as `<namespace>/<service>/<token-name>`.
|
|
835
895
|
:param refresh: If `true` then refresh the affected shards to make this operation
|
|
836
896
|
visible to search, if `wait_for` (the default) then wait for a refresh to
|
|
837
897
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -894,20 +954,17 @@ class SecurityClient(NamespacedClient):
|
|
|
894
954
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
895
955
|
) -> ObjectApiResponse[t.Any]:
|
|
896
956
|
"""
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
delegated to the proxy that calls this API. The proxy is trusted to have performed
|
|
909
|
-
the TLS authentication and this API translates that authentication into an Elasticsearch
|
|
910
|
-
access token.
|
|
957
|
+
.. raw:: html
|
|
958
|
+
|
|
959
|
+
<p>Delegate PKI authentication.</p>
|
|
960
|
+
<p>This API implements the exchange of an X509Certificate chain for an Elasticsearch access token.
|
|
961
|
+
The certificate chain is validated, according to RFC 5280, by sequentially considering the trust configuration of every installed PKI realm that has <code>delegation.enabled</code> set to <code>true</code>.
|
|
962
|
+
A successfully trusted client certificate is also subject to the validation of the subject distinguished name according to thw <code>username_pattern</code> of the respective realm.</p>
|
|
963
|
+
<p>This API is called by smart and trusted proxies, such as Kibana, which terminate the user's TLS session but still want to authenticate the user by using a PKI realm—-as if the user connected directly to Elasticsearch.</p>
|
|
964
|
+
<p>IMPORTANT: The association between the subject public key in the target certificate and the corresponding private key is not validated.
|
|
965
|
+
This is part of the TLS authentication process and it is delegated to the proxy that calls this API.
|
|
966
|
+
The proxy is trusted to have performed the TLS authentication and this API translates that authentication into an Elasticsearch access token.</p>
|
|
967
|
+
|
|
911
968
|
|
|
912
969
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delegate-pki-authentication.html>`_
|
|
913
970
|
|
|
@@ -963,12 +1020,21 @@ class SecurityClient(NamespacedClient):
|
|
|
963
1020
|
] = None,
|
|
964
1021
|
) -> ObjectApiResponse[t.Any]:
|
|
965
1022
|
"""
|
|
966
|
-
|
|
1023
|
+
.. raw:: html
|
|
1024
|
+
|
|
1025
|
+
<p>Delete application privileges.</p>
|
|
1026
|
+
<p>To use this API, you must have one of the following privileges:</p>
|
|
1027
|
+
<ul>
|
|
1028
|
+
<li>The <code>manage_security</code> cluster privilege (or a greater privilege such as <code>all</code>).</li>
|
|
1029
|
+
<li>The "Manage Application Privileges" global privilege for the application being referenced in the request.</li>
|
|
1030
|
+
</ul>
|
|
1031
|
+
|
|
967
1032
|
|
|
968
1033
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-privilege.html>`_
|
|
969
1034
|
|
|
970
|
-
:param application: Application
|
|
971
|
-
|
|
1035
|
+
:param application: The name of the application. Application privileges are always
|
|
1036
|
+
associated with exactly one application.
|
|
1037
|
+
:param name: The name of the privilege.
|
|
972
1038
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
973
1039
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
974
1040
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1019,11 +1085,17 @@ class SecurityClient(NamespacedClient):
|
|
|
1019
1085
|
] = None,
|
|
1020
1086
|
) -> ObjectApiResponse[t.Any]:
|
|
1021
1087
|
"""
|
|
1022
|
-
|
|
1088
|
+
.. raw:: html
|
|
1089
|
+
|
|
1090
|
+
<p>Delete roles.</p>
|
|
1091
|
+
<p>Delete roles in the native realm.
|
|
1092
|
+
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
|
|
1093
|
+
The delete roles API cannot remove roles that are defined in roles files.</p>
|
|
1094
|
+
|
|
1023
1095
|
|
|
1024
1096
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role.html>`_
|
|
1025
1097
|
|
|
1026
|
-
:param name:
|
|
1098
|
+
:param name: The name of the role.
|
|
1027
1099
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
1028
1100
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
1029
1101
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1067,11 +1139,19 @@ class SecurityClient(NamespacedClient):
|
|
|
1067
1139
|
] = None,
|
|
1068
1140
|
) -> ObjectApiResponse[t.Any]:
|
|
1069
1141
|
"""
|
|
1070
|
-
|
|
1142
|
+
.. raw:: html
|
|
1143
|
+
|
|
1144
|
+
<p>Delete role mappings.</p>
|
|
1145
|
+
<p>Role mappings define which roles are assigned to each user.
|
|
1146
|
+
The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.
|
|
1147
|
+
The delete role mappings API cannot remove role mappings that are defined in role mapping files.</p>
|
|
1148
|
+
|
|
1071
1149
|
|
|
1072
1150
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-role-mapping.html>`_
|
|
1073
1151
|
|
|
1074
|
-
:param name:
|
|
1152
|
+
:param name: The distinct name that identifies the role mapping. The name is
|
|
1153
|
+
used solely as an identifier to facilitate interaction via the API; it does
|
|
1154
|
+
not affect the behavior of the mapping in any way.
|
|
1075
1155
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
1076
1156
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
1077
1157
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1117,14 +1197,17 @@ class SecurityClient(NamespacedClient):
|
|
|
1117
1197
|
] = None,
|
|
1118
1198
|
) -> ObjectApiResponse[t.Any]:
|
|
1119
1199
|
"""
|
|
1120
|
-
|
|
1121
|
-
|
|
1200
|
+
.. raw:: html
|
|
1201
|
+
|
|
1202
|
+
<p>Delete service account tokens.</p>
|
|
1203
|
+
<p>Delete service account tokens for a service in a specified namespace.</p>
|
|
1204
|
+
|
|
1122
1205
|
|
|
1123
1206
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-service-token.html>`_
|
|
1124
1207
|
|
|
1125
|
-
:param namespace:
|
|
1126
|
-
:param service:
|
|
1127
|
-
:param name:
|
|
1208
|
+
:param namespace: The namespace, which is a top-level grouping of service accounts.
|
|
1209
|
+
:param service: The service name.
|
|
1210
|
+
:param name: The name of the service account token.
|
|
1128
1211
|
:param refresh: If `true` then refresh the affected shards to make this operation
|
|
1129
1212
|
visible to search, if `wait_for` (the default) then wait for a refresh to
|
|
1130
1213
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1176,11 +1259,15 @@ class SecurityClient(NamespacedClient):
|
|
|
1176
1259
|
] = None,
|
|
1177
1260
|
) -> ObjectApiResponse[t.Any]:
|
|
1178
1261
|
"""
|
|
1179
|
-
|
|
1262
|
+
.. raw:: html
|
|
1263
|
+
|
|
1264
|
+
<p>Delete users.</p>
|
|
1265
|
+
<p>Delete users from the native realm.</p>
|
|
1266
|
+
|
|
1180
1267
|
|
|
1181
1268
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-delete-user.html>`_
|
|
1182
1269
|
|
|
1183
|
-
:param username:
|
|
1270
|
+
:param username: An identifier for the user.
|
|
1184
1271
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
1185
1272
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
1186
1273
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1224,11 +1311,17 @@ class SecurityClient(NamespacedClient):
|
|
|
1224
1311
|
] = None,
|
|
1225
1312
|
) -> ObjectApiResponse[t.Any]:
|
|
1226
1313
|
"""
|
|
1227
|
-
|
|
1314
|
+
.. raw:: html
|
|
1315
|
+
|
|
1316
|
+
<p>Disable users.</p>
|
|
1317
|
+
<p>Disable users in the native realm.
|
|
1318
|
+
By default, when you create users, they are enabled.
|
|
1319
|
+
You can use this API to revoke a user's access to Elasticsearch.</p>
|
|
1320
|
+
|
|
1228
1321
|
|
|
1229
1322
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user.html>`_
|
|
1230
1323
|
|
|
1231
|
-
:param username:
|
|
1324
|
+
:param username: An identifier for the user.
|
|
1232
1325
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
1233
1326
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
1234
1327
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1272,15 +1365,16 @@ class SecurityClient(NamespacedClient):
|
|
|
1272
1365
|
] = None,
|
|
1273
1366
|
) -> ObjectApiResponse[t.Any]:
|
|
1274
1367
|
"""
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1368
|
+
.. raw:: html
|
|
1369
|
+
|
|
1370
|
+
<p>Disable a user profile.</p>
|
|
1371
|
+
<p>Disable user profiles so that they are not visible in user profile searches.</p>
|
|
1372
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
|
|
1373
|
+
Individual users and external applications should not call this API directly.
|
|
1374
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
1375
|
+
<p>When you activate a user profile, its automatically enabled and visible in user profile searches. You can use the disable user profile API to disable a user profile so it’s not visible in these searches.
|
|
1376
|
+
To re-enable a disabled user profile, use the enable user profile API .</p>
|
|
1377
|
+
|
|
1284
1378
|
|
|
1285
1379
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-disable-user-profile.html>`_
|
|
1286
1380
|
|
|
@@ -1328,11 +1422,16 @@ class SecurityClient(NamespacedClient):
|
|
|
1328
1422
|
] = None,
|
|
1329
1423
|
) -> ObjectApiResponse[t.Any]:
|
|
1330
1424
|
"""
|
|
1331
|
-
|
|
1425
|
+
.. raw:: html
|
|
1426
|
+
|
|
1427
|
+
<p>Enable users.</p>
|
|
1428
|
+
<p>Enable users in the native realm.
|
|
1429
|
+
By default, when you create users, they are enabled.</p>
|
|
1430
|
+
|
|
1332
1431
|
|
|
1333
1432
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user.html>`_
|
|
1334
1433
|
|
|
1335
|
-
:param username:
|
|
1434
|
+
:param username: An identifier for the user.
|
|
1336
1435
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
1337
1436
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
1338
1437
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
@@ -1376,14 +1475,16 @@ class SecurityClient(NamespacedClient):
|
|
|
1376
1475
|
] = None,
|
|
1377
1476
|
) -> ObjectApiResponse[t.Any]:
|
|
1378
1477
|
"""
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1478
|
+
.. raw:: html
|
|
1479
|
+
|
|
1480
|
+
<p>Enable a user profile.</p>
|
|
1481
|
+
<p>Enable user profiles to make them visible in user profile searches.</p>
|
|
1482
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
|
|
1483
|
+
Individual users and external applications should not call this API directly.
|
|
1484
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
1485
|
+
<p>When you activate a user profile, it's automatically enabled and visible in user profile searches.
|
|
1486
|
+
If you later disable the user profile, you can use the enable user profile API to make the profile visible in these searches again.</p>
|
|
1487
|
+
|
|
1387
1488
|
|
|
1388
1489
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-enable-user-profile.html>`_
|
|
1389
1490
|
|
|
@@ -1427,8 +1528,13 @@ class SecurityClient(NamespacedClient):
|
|
|
1427
1528
|
pretty: t.Optional[bool] = None,
|
|
1428
1529
|
) -> ObjectApiResponse[t.Any]:
|
|
1429
1530
|
"""
|
|
1430
|
-
|
|
1431
|
-
|
|
1531
|
+
.. raw:: html
|
|
1532
|
+
|
|
1533
|
+
<p>Enroll Kibana.</p>
|
|
1534
|
+
<p>Enable a Kibana instance to configure itself for communication with a secured Elasticsearch cluster.</p>
|
|
1535
|
+
<p>NOTE: This API is currently intended for internal use only by Kibana.
|
|
1536
|
+
Kibana uses this API internally to configure itself for communications with an Elasticsearch cluster that already has security features enabled.</p>
|
|
1537
|
+
|
|
1432
1538
|
|
|
1433
1539
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-kibana-enrollment.html>`_
|
|
1434
1540
|
"""
|
|
@@ -1463,8 +1569,13 @@ class SecurityClient(NamespacedClient):
|
|
|
1463
1569
|
pretty: t.Optional[bool] = None,
|
|
1464
1570
|
) -> ObjectApiResponse[t.Any]:
|
|
1465
1571
|
"""
|
|
1466
|
-
|
|
1467
|
-
|
|
1572
|
+
.. raw:: html
|
|
1573
|
+
|
|
1574
|
+
<p>Enroll a node.</p>
|
|
1575
|
+
<p>Enroll a new node to allow it to join an existing cluster with security features enabled.</p>
|
|
1576
|
+
<p>The response contains all the necessary information for the joining node to bootstrap discovery and security related settings so that it can successfully join the cluster.
|
|
1577
|
+
The response contains key and certificate material that allows the caller to generate valid signed certificates for the HTTP layer of all nodes in the cluster.</p>
|
|
1578
|
+
|
|
1468
1579
|
|
|
1469
1580
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-node-enrollment.html>`_
|
|
1470
1581
|
"""
|
|
@@ -1507,11 +1618,13 @@ class SecurityClient(NamespacedClient):
|
|
|
1507
1618
|
with_profile_uid: t.Optional[bool] = None,
|
|
1508
1619
|
) -> ObjectApiResponse[t.Any]:
|
|
1509
1620
|
"""
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1621
|
+
.. raw:: html
|
|
1622
|
+
|
|
1623
|
+
<p>Get API key information.</p>
|
|
1624
|
+
<p>Retrieves information for one or more API keys.
|
|
1625
|
+
NOTE: If you have only the <code>manage_own_api_key</code> privilege, this API returns only the API keys that you own.
|
|
1626
|
+
If you have <code>read_security</code>, <code>manage_api_key</code> or greater privileges (including <code>manage_security</code>), this API returns all API keys regardless of ownership.</p>
|
|
1627
|
+
|
|
1515
1628
|
|
|
1516
1629
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-api-key.html>`_
|
|
1517
1630
|
|
|
@@ -1585,8 +1698,11 @@ class SecurityClient(NamespacedClient):
|
|
|
1585
1698
|
pretty: t.Optional[bool] = None,
|
|
1586
1699
|
) -> ObjectApiResponse[t.Any]:
|
|
1587
1700
|
"""
|
|
1588
|
-
|
|
1589
|
-
|
|
1701
|
+
.. raw:: html
|
|
1702
|
+
|
|
1703
|
+
<p>Get builtin privileges.</p>
|
|
1704
|
+
<p>Get the list of cluster privileges and index privileges that are available in this version of Elasticsearch.</p>
|
|
1705
|
+
|
|
1590
1706
|
|
|
1591
1707
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-builtin-privileges.html>`_
|
|
1592
1708
|
"""
|
|
@@ -1623,12 +1739,23 @@ class SecurityClient(NamespacedClient):
|
|
|
1623
1739
|
pretty: t.Optional[bool] = None,
|
|
1624
1740
|
) -> ObjectApiResponse[t.Any]:
|
|
1625
1741
|
"""
|
|
1626
|
-
|
|
1742
|
+
.. raw:: html
|
|
1743
|
+
|
|
1744
|
+
<p>Get application privileges.</p>
|
|
1745
|
+
<p>To use this API, you must have one of the following privileges:</p>
|
|
1746
|
+
<ul>
|
|
1747
|
+
<li>The <code>read_security</code> cluster privilege (or a greater privilege such as <code>manage_security</code> or <code>all</code>).</li>
|
|
1748
|
+
<li>The "Manage Application Privileges" global privilege for the application being referenced in the request.</li>
|
|
1749
|
+
</ul>
|
|
1750
|
+
|
|
1627
1751
|
|
|
1628
1752
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-privileges.html>`_
|
|
1629
1753
|
|
|
1630
|
-
:param application: Application
|
|
1631
|
-
|
|
1754
|
+
:param application: The name of the application. Application privileges are always
|
|
1755
|
+
associated with exactly one application. If you do not specify this parameter,
|
|
1756
|
+
the API returns information about all privileges for all applications.
|
|
1757
|
+
:param name: The name of the privilege. If you do not specify this parameter,
|
|
1758
|
+
the API returns information about all privileges for the requested application.
|
|
1632
1759
|
"""
|
|
1633
1760
|
__path_parts: t.Dict[str, str]
|
|
1634
1761
|
if application not in SKIP_IN_PATH and name not in SKIP_IN_PATH:
|
|
@@ -1670,9 +1797,13 @@ class SecurityClient(NamespacedClient):
|
|
|
1670
1797
|
pretty: t.Optional[bool] = None,
|
|
1671
1798
|
) -> ObjectApiResponse[t.Any]:
|
|
1672
1799
|
"""
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1800
|
+
.. raw:: html
|
|
1801
|
+
|
|
1802
|
+
<p>Get roles.</p>
|
|
1803
|
+
<p>Get roles in the native realm.
|
|
1804
|
+
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
|
|
1805
|
+
The get roles API cannot retrieve roles that are defined in roles files.</p>
|
|
1806
|
+
|
|
1676
1807
|
|
|
1677
1808
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-role.html>`_
|
|
1678
1809
|
|
|
@@ -1717,10 +1848,13 @@ class SecurityClient(NamespacedClient):
|
|
|
1717
1848
|
pretty: t.Optional[bool] = None,
|
|
1718
1849
|
) -> ObjectApiResponse[t.Any]:
|
|
1719
1850
|
"""
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1851
|
+
.. raw:: html
|
|
1852
|
+
|
|
1853
|
+
<p>Get role mappings.</p>
|
|
1854
|
+
<p>Role mappings define which roles are assigned to each user.
|
|
1855
|
+
The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files.
|
|
1856
|
+
The get role mappings API cannot retrieve role mappings that are defined in role mapping files.</p>
|
|
1857
|
+
|
|
1724
1858
|
|
|
1725
1859
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-role-mapping.html>`_
|
|
1726
1860
|
|
|
@@ -1768,15 +1902,19 @@ class SecurityClient(NamespacedClient):
|
|
|
1768
1902
|
pretty: t.Optional[bool] = None,
|
|
1769
1903
|
) -> ObjectApiResponse[t.Any]:
|
|
1770
1904
|
"""
|
|
1771
|
-
|
|
1772
|
-
|
|
1905
|
+
.. raw:: html
|
|
1906
|
+
|
|
1907
|
+
<p>Get service accounts.</p>
|
|
1908
|
+
<p>Get a list of service accounts that match the provided path parameters.</p>
|
|
1909
|
+
<p>NOTE: Currently, only the <code>elastic/fleet-server</code> service account is available.</p>
|
|
1910
|
+
|
|
1773
1911
|
|
|
1774
1912
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-accounts.html>`_
|
|
1775
1913
|
|
|
1776
|
-
:param namespace:
|
|
1777
|
-
about all service accounts. If you omit this parameter, you must
|
|
1778
|
-
the `service` parameter.
|
|
1779
|
-
:param service:
|
|
1914
|
+
:param namespace: The name of the namespace. Omit this parameter to retrieve
|
|
1915
|
+
information about all service accounts. If you omit this parameter, you must
|
|
1916
|
+
also omit the `service` parameter.
|
|
1917
|
+
:param service: The service name. Omit this parameter to retrieve information
|
|
1780
1918
|
about all service accounts that belong to the specified `namespace`.
|
|
1781
1919
|
"""
|
|
1782
1920
|
__path_parts: t.Dict[str, str]
|
|
@@ -1820,12 +1958,19 @@ class SecurityClient(NamespacedClient):
|
|
|
1820
1958
|
pretty: t.Optional[bool] = None,
|
|
1821
1959
|
) -> ObjectApiResponse[t.Any]:
|
|
1822
1960
|
"""
|
|
1823
|
-
|
|
1961
|
+
.. raw:: html
|
|
1962
|
+
|
|
1963
|
+
<p>Get service account credentials.</p>
|
|
1964
|
+
<p>To use this API, you must have at least the <code>read_security</code> cluster privilege (or a greater privilege such as <code>manage_service_account</code> or <code>manage_security</code>).</p>
|
|
1965
|
+
<p>The response includes service account tokens that were created with the create service account tokens API as well as file-backed tokens from all nodes of the cluster.</p>
|
|
1966
|
+
<p>NOTE: For tokens backed by the <code>service_tokens</code> file, the API collects them from all nodes of the cluster.
|
|
1967
|
+
Tokens with the same name from different nodes are assumed to be the same token and are only counted once towards the total number of service tokens.</p>
|
|
1968
|
+
|
|
1824
1969
|
|
|
1825
1970
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-service-credentials.html>`_
|
|
1826
1971
|
|
|
1827
|
-
:param namespace:
|
|
1828
|
-
:param service:
|
|
1972
|
+
:param namespace: The name of the namespace.
|
|
1973
|
+
:param service: The service name.
|
|
1829
1974
|
"""
|
|
1830
1975
|
if namespace in SKIP_IN_PATH:
|
|
1831
1976
|
raise ValueError("Empty value passed for parameter 'namespace'")
|
|
@@ -1866,8 +2011,17 @@ class SecurityClient(NamespacedClient):
|
|
|
1866
2011
|
pretty: t.Optional[bool] = None,
|
|
1867
2012
|
) -> ObjectApiResponse[t.Any]:
|
|
1868
2013
|
"""
|
|
1869
|
-
|
|
1870
|
-
|
|
2014
|
+
.. raw:: html
|
|
2015
|
+
|
|
2016
|
+
<p>Get security index settings.</p>
|
|
2017
|
+
<p>Get the user-configurable settings for the security internal index (<code>.security</code> and associated indices).
|
|
2018
|
+
Only a subset of the index settings — those that are user-configurable—will be shown.
|
|
2019
|
+
This includes:</p>
|
|
2020
|
+
<ul>
|
|
2021
|
+
<li><code>index.auto_expand_replicas</code></li>
|
|
2022
|
+
<li><code>index.number_of_replicas</code></li>
|
|
2023
|
+
</ul>
|
|
2024
|
+
|
|
1871
2025
|
|
|
1872
2026
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-settings.html>`_
|
|
1873
2027
|
|
|
@@ -1931,16 +2085,39 @@ class SecurityClient(NamespacedClient):
|
|
|
1931
2085
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
1932
2086
|
) -> ObjectApiResponse[t.Any]:
|
|
1933
2087
|
"""
|
|
1934
|
-
|
|
2088
|
+
.. raw:: html
|
|
2089
|
+
|
|
2090
|
+
<p>Get a token.</p>
|
|
2091
|
+
<p>Create a bearer token for access without requiring basic authentication.
|
|
2092
|
+
The tokens are created by the Elasticsearch Token Service, which is automatically enabled when you configure TLS on the HTTP interface.
|
|
2093
|
+
Alternatively, you can explicitly enable the <code>xpack.security.authc.token.enabled</code> setting.
|
|
2094
|
+
When you are running in production mode, a bootstrap check prevents you from enabling the token service unless you also enable TLS on the HTTP interface.</p>
|
|
2095
|
+
<p>The get token API takes the same parameters as a typical OAuth 2.0 token API except for the use of a JSON request body.</p>
|
|
2096
|
+
<p>A successful get token API call returns a JSON structure that contains the access token, the amount of time (seconds) that the token expires in, the type, and the scope if available.</p>
|
|
2097
|
+
<p>The tokens returned by the get token API have a finite period of time for which they are valid and after that time period, they can no longer be used.
|
|
2098
|
+
That time period is defined by the <code>xpack.security.authc.token.timeout</code> setting.
|
|
2099
|
+
If you want to invalidate a token immediately, you can do so by using the invalidate token API.</p>
|
|
2100
|
+
|
|
1935
2101
|
|
|
1936
2102
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-token.html>`_
|
|
1937
2103
|
|
|
1938
|
-
:param grant_type:
|
|
1939
|
-
|
|
1940
|
-
:param
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
:param
|
|
2104
|
+
:param grant_type: The type of grant. Supported grant types are: `password`,
|
|
2105
|
+
`_kerberos`, `client_credentials`, and `refresh_token`.
|
|
2106
|
+
:param kerberos_ticket: The base64 encoded kerberos ticket. If you specify the
|
|
2107
|
+
`_kerberos` grant type, this parameter is required. This parameter is not
|
|
2108
|
+
valid with any other supported grant type.
|
|
2109
|
+
:param password: The user's password. If you specify the `password` grant type,
|
|
2110
|
+
this parameter is required. This parameter is not valid with any other supported
|
|
2111
|
+
grant type.
|
|
2112
|
+
:param refresh_token: The string that was returned when you created the token,
|
|
2113
|
+
which enables you to extend its life. If you specify the `refresh_token`
|
|
2114
|
+
grant type, this parameter is required. This parameter is not valid with
|
|
2115
|
+
any other supported grant type.
|
|
2116
|
+
:param scope: The scope of the token. Currently tokens are only issued for a
|
|
2117
|
+
scope of FULL regardless of the value sent with the request.
|
|
2118
|
+
:param username: The username that identifies the user. If you specify the `password`
|
|
2119
|
+
grant type, this parameter is required. This parameter is not valid with
|
|
2120
|
+
any other supported grant type.
|
|
1944
2121
|
"""
|
|
1945
2122
|
__path_parts: t.Dict[str, str] = {}
|
|
1946
2123
|
__path = "/_security/oauth2/token"
|
|
@@ -1990,15 +2167,19 @@ class SecurityClient(NamespacedClient):
|
|
|
1990
2167
|
with_profile_uid: t.Optional[bool] = None,
|
|
1991
2168
|
) -> ObjectApiResponse[t.Any]:
|
|
1992
2169
|
"""
|
|
1993
|
-
|
|
2170
|
+
.. raw:: html
|
|
2171
|
+
|
|
2172
|
+
<p>Get users.</p>
|
|
2173
|
+
<p>Get information about users in the native realm and built-in users.</p>
|
|
2174
|
+
|
|
1994
2175
|
|
|
1995
2176
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user.html>`_
|
|
1996
2177
|
|
|
1997
2178
|
:param username: An identifier for the user. You can specify multiple usernames
|
|
1998
2179
|
as a comma-separated list. If you omit this parameter, the API retrieves
|
|
1999
2180
|
information about all users.
|
|
2000
|
-
:param with_profile_uid:
|
|
2001
|
-
if
|
|
2181
|
+
:param with_profile_uid: Determines whether to retrieve the user profile UID,
|
|
2182
|
+
if it exists, for the users.
|
|
2002
2183
|
"""
|
|
2003
2184
|
__path_parts: t.Dict[str, str]
|
|
2004
2185
|
if username not in SKIP_IN_PATH:
|
|
@@ -2041,7 +2222,14 @@ class SecurityClient(NamespacedClient):
|
|
|
2041
2222
|
username: t.Optional[t.Union[None, str]] = None,
|
|
2042
2223
|
) -> ObjectApiResponse[t.Any]:
|
|
2043
2224
|
"""
|
|
2044
|
-
|
|
2225
|
+
.. raw:: html
|
|
2226
|
+
|
|
2227
|
+
<p>Get user privileges.</p>
|
|
2228
|
+
<p>Get the security privileges for the logged in user.
|
|
2229
|
+
All users can use this API, but only to determine their own privileges.
|
|
2230
|
+
To check the privileges of other users, you must use the run as feature.
|
|
2231
|
+
To check whether a user has a specific list of privileges, use the has privileges API.</p>
|
|
2232
|
+
|
|
2045
2233
|
|
|
2046
2234
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-privileges.html>`_
|
|
2047
2235
|
|
|
@@ -2091,11 +2279,14 @@ class SecurityClient(NamespacedClient):
|
|
|
2091
2279
|
pretty: t.Optional[bool] = None,
|
|
2092
2280
|
) -> ObjectApiResponse[t.Any]:
|
|
2093
2281
|
"""
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2282
|
+
.. raw:: html
|
|
2283
|
+
|
|
2284
|
+
<p>Get a user profile.</p>
|
|
2285
|
+
<p>Get a user's profile using the unique profile ID.</p>
|
|
2286
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
|
|
2287
|
+
Individual users and external applications should not call this API directly.
|
|
2288
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
2289
|
+
|
|
2099
2290
|
|
|
2100
2291
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-get-user-profile.html>`_
|
|
2101
2292
|
|
|
@@ -2159,31 +2350,37 @@ class SecurityClient(NamespacedClient):
|
|
|
2159
2350
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2160
2351
|
) -> ObjectApiResponse[t.Any]:
|
|
2161
2352
|
"""
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2353
|
+
.. raw:: html
|
|
2354
|
+
|
|
2355
|
+
<p>Grant an API key.</p>
|
|
2356
|
+
<p>Create an API key on behalf of another user.
|
|
2357
|
+
This API is similar to the create API keys API, however it creates the API key for a user that is different than the user that runs the API.
|
|
2358
|
+
The caller must have authentication credentials for the user on whose behalf the API key will be created.
|
|
2359
|
+
It is not possible to use this API to create an API key without that user's credentials.
|
|
2360
|
+
The supported user authentication credential types are:</p>
|
|
2361
|
+
<ul>
|
|
2362
|
+
<li>username and password</li>
|
|
2363
|
+
<li>Elasticsearch access tokens</li>
|
|
2364
|
+
<li>JWTs</li>
|
|
2365
|
+
</ul>
|
|
2366
|
+
<p>The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user.
|
|
2367
|
+
In this case, the API key will be created on behalf of the impersonated user.</p>
|
|
2368
|
+
<p>This API is intended be used by applications that need to create and manage API keys for end users, but cannot guarantee that those users have permission to create API keys on their own behalf.
|
|
2369
|
+
The API keys are created by the Elasticsearch API key service, which is automatically enabled.</p>
|
|
2370
|
+
<p>A successful grant API key API call returns a JSON structure that contains the API key, its unique id, and its name.
|
|
2371
|
+
If applicable, it also returns expiration information for the API key in milliseconds.</p>
|
|
2372
|
+
<p>By default, API keys never expire. You can specify expiration information when you create the API keys.</p>
|
|
2373
|
+
|
|
2177
2374
|
|
|
2178
2375
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-grant-api-key.html>`_
|
|
2179
2376
|
|
|
2180
|
-
:param api_key:
|
|
2377
|
+
:param api_key: The API key.
|
|
2181
2378
|
:param grant_type: The type of grant. Supported grant types are: `access_token`,
|
|
2182
2379
|
`password`.
|
|
2183
|
-
:param access_token: The user
|
|
2380
|
+
:param access_token: The user's access token. If you specify the `access_token`
|
|
2184
2381
|
grant type, this parameter is required. It is not valid with other grant
|
|
2185
2382
|
types.
|
|
2186
|
-
:param password: The user
|
|
2383
|
+
:param password: The user's password. If you specify the `password` grant type,
|
|
2187
2384
|
this parameter is required. It is not valid with other grant types.
|
|
2188
2385
|
:param run_as: The name of the user to be impersonated.
|
|
2189
2386
|
:param username: The user name that identifies the user. If you specify the `password`
|
|
@@ -2314,8 +2511,13 @@ class SecurityClient(NamespacedClient):
|
|
|
2314
2511
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2315
2512
|
) -> ObjectApiResponse[t.Any]:
|
|
2316
2513
|
"""
|
|
2317
|
-
|
|
2318
|
-
|
|
2514
|
+
.. raw:: html
|
|
2515
|
+
|
|
2516
|
+
<p>Check user privileges.</p>
|
|
2517
|
+
<p>Determine whether the specified user has a specified list of privileges.
|
|
2518
|
+
All users can use this API, but only to determine their own privileges.
|
|
2519
|
+
To check the privileges of other users, you must use the run as feature.</p>
|
|
2520
|
+
|
|
2319
2521
|
|
|
2320
2522
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges.html>`_
|
|
2321
2523
|
|
|
@@ -2374,12 +2576,13 @@ class SecurityClient(NamespacedClient):
|
|
|
2374
2576
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2375
2577
|
) -> ObjectApiResponse[t.Any]:
|
|
2376
2578
|
"""
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2579
|
+
.. raw:: html
|
|
2580
|
+
|
|
2581
|
+
<p>Check user profile privileges.</p>
|
|
2582
|
+
<p>Determine whether the users associated with the specified user profile IDs have all the requested privileges.</p>
|
|
2583
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly.
|
|
2584
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
2585
|
+
|
|
2383
2586
|
|
|
2384
2587
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-has-privileges-user-profile.html>`_
|
|
2385
2588
|
|
|
@@ -2438,17 +2641,22 @@ class SecurityClient(NamespacedClient):
|
|
|
2438
2641
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2439
2642
|
) -> ObjectApiResponse[t.Any]:
|
|
2440
2643
|
"""
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2644
|
+
.. raw:: html
|
|
2645
|
+
|
|
2646
|
+
<p>Invalidate API keys.</p>
|
|
2647
|
+
<p>This API invalidates API keys created by the create API key or grant API key APIs.
|
|
2648
|
+
Invalidated API keys fail authentication, but they can still be viewed using the get API key information and query API key information APIs, for at least the configured retention period, until they are automatically deleted.</p>
|
|
2649
|
+
<p>To use this API, you must have at least the <code>manage_security</code>, <code>manage_api_key</code>, or <code>manage_own_api_key</code> cluster privileges.
|
|
2650
|
+
The <code>manage_security</code> privilege allows deleting any API key, including both REST and cross cluster API keys.
|
|
2651
|
+
The <code>manage_api_key</code> privilege allows deleting any REST API key, but not cross cluster API keys.
|
|
2652
|
+
The <code>manage_own_api_key</code> only allows deleting REST API keys that are owned by the user.
|
|
2653
|
+
In addition, with the <code>manage_own_api_key</code> privilege, an invalidation request must be issued in one of the three formats:</p>
|
|
2654
|
+
<ul>
|
|
2655
|
+
<li>Set the parameter <code>owner=true</code>.</li>
|
|
2656
|
+
<li>Or, set both <code>username</code> and <code>realm_name</code> to match the user's identity.</li>
|
|
2657
|
+
<li>Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the <code>ids</code> field.</li>
|
|
2658
|
+
</ul>
|
|
2659
|
+
|
|
2452
2660
|
|
|
2453
2661
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-api-key.html>`_
|
|
2454
2662
|
|
|
@@ -2457,14 +2665,15 @@ class SecurityClient(NamespacedClient):
|
|
|
2457
2665
|
`name`, `realm_name`, or `username`.
|
|
2458
2666
|
:param name: An API key name. This parameter cannot be used with any of `ids`,
|
|
2459
2667
|
`realm_name` or `username`.
|
|
2460
|
-
:param owner:
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2668
|
+
:param owner: Query API keys owned by the currently authenticated user. The `realm_name`
|
|
2669
|
+
or `username` parameters cannot be specified when this parameter is set to
|
|
2670
|
+
`true` as they are assumed to be the currently authenticated ones. NOTE:
|
|
2671
|
+
At least one of `ids`, `name`, `username`, and `realm_name` must be specified
|
|
2672
|
+
if `owner` is `false`.
|
|
2464
2673
|
:param realm_name: The name of an authentication realm. This parameter cannot
|
|
2465
2674
|
be used with either `ids` or `name`, or when `owner` flag is set to `true`.
|
|
2466
2675
|
:param username: The username of a user. This parameter cannot be used with either
|
|
2467
|
-
`ids` or `name
|
|
2676
|
+
`ids` or `name` or when `owner` flag is set to `true`.
|
|
2468
2677
|
"""
|
|
2469
2678
|
__path_parts: t.Dict[str, str] = {}
|
|
2470
2679
|
__path = "/_security/api_key"
|
|
@@ -2519,19 +2728,30 @@ class SecurityClient(NamespacedClient):
|
|
|
2519
2728
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2520
2729
|
) -> ObjectApiResponse[t.Any]:
|
|
2521
2730
|
"""
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2731
|
+
.. raw:: html
|
|
2732
|
+
|
|
2733
|
+
<p>Invalidate a token.</p>
|
|
2734
|
+
<p>The access tokens returned by the get token API have a finite period of time for which they are valid.
|
|
2735
|
+
After that time period, they can no longer be used.
|
|
2736
|
+
The time period is defined by the <code>xpack.security.authc.token.timeout</code> setting.</p>
|
|
2737
|
+
<p>The refresh tokens returned by the get token API are only valid for 24 hours.
|
|
2738
|
+
They can also be used exactly once.
|
|
2739
|
+
If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.</p>
|
|
2740
|
+
<p>NOTE: While all parameters are optional, at least one of them is required.
|
|
2741
|
+
More specifically, either one of <code>token</code> or <code>refresh_token</code> parameters is required.
|
|
2742
|
+
If none of these two are specified, then <code>realm_name</code> and/or <code>username</code> need to be specified.</p>
|
|
2743
|
+
|
|
2528
2744
|
|
|
2529
2745
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-invalidate-token.html>`_
|
|
2530
2746
|
|
|
2531
|
-
:param realm_name:
|
|
2532
|
-
|
|
2533
|
-
:param token
|
|
2534
|
-
|
|
2747
|
+
:param realm_name: The name of an authentication realm. This parameter cannot
|
|
2748
|
+
be used with either `refresh_token` or `token`.
|
|
2749
|
+
:param refresh_token: A refresh token. This parameter cannot be used if any of
|
|
2750
|
+
`refresh_token`, `realm_name`, or `username` are used.
|
|
2751
|
+
:param token: An access token. This parameter cannot be used if any of `refresh_token`,
|
|
2752
|
+
`realm_name`, or `username` are used.
|
|
2753
|
+
:param username: The username of a user. This parameter cannot be used with either
|
|
2754
|
+
`refresh_token` or `token`.
|
|
2535
2755
|
"""
|
|
2536
2756
|
__path_parts: t.Dict[str, str] = {}
|
|
2537
2757
|
__path = "/_security/oauth2/token"
|
|
@@ -2582,12 +2802,13 @@ class SecurityClient(NamespacedClient):
|
|
|
2582
2802
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2583
2803
|
) -> ObjectApiResponse[t.Any]:
|
|
2584
2804
|
"""
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2805
|
+
.. raw:: html
|
|
2806
|
+
|
|
2807
|
+
<p>Authenticate OpenID Connect.</p>
|
|
2808
|
+
<p>Exchange an OpenID Connect authentication response message for an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.</p>
|
|
2809
|
+
<p>Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.
|
|
2810
|
+
These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.</p>
|
|
2811
|
+
|
|
2591
2812
|
|
|
2592
2813
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-oidc-authenticate.html>`_
|
|
2593
2814
|
|
|
@@ -2660,15 +2881,14 @@ class SecurityClient(NamespacedClient):
|
|
|
2660
2881
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2661
2882
|
) -> ObjectApiResponse[t.Any]:
|
|
2662
2883
|
"""
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
or other clients.
|
|
2884
|
+
.. raw:: html
|
|
2885
|
+
|
|
2886
|
+
<p>Logout of OpenID Connect.</p>
|
|
2887
|
+
<p>Invalidate an access token and a refresh token that were generated as a response to the <code>/_security/oidc/authenticate</code> API.</p>
|
|
2888
|
+
<p>If the OpenID Connect authentication realm in Elasticsearch is accordingly configured, the response to this call will contain a URI pointing to the end session endpoint of the OpenID Connect Provider in order to perform single logout.</p>
|
|
2889
|
+
<p>Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.
|
|
2890
|
+
These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.</p>
|
|
2891
|
+
|
|
2672
2892
|
|
|
2673
2893
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-oidc-logout.html>`_
|
|
2674
2894
|
|
|
@@ -2723,15 +2943,14 @@ class SecurityClient(NamespacedClient):
|
|
|
2723
2943
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2724
2944
|
) -> ObjectApiResponse[t.Any]:
|
|
2725
2945
|
"""
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
or other clients.
|
|
2946
|
+
.. raw:: html
|
|
2947
|
+
|
|
2948
|
+
<p>Prepare OpenID connect authentication.</p>
|
|
2949
|
+
<p>Create an oAuth 2.0 authentication request as a URL string based on the configuration of the OpenID Connect authentication realm in Elasticsearch.</p>
|
|
2950
|
+
<p>The response of this API is a URL pointing to the Authorization Endpoint of the configured OpenID Connect Provider, which can be used to redirect the browser of the user in order to continue the authentication process.</p>
|
|
2951
|
+
<p>Elasticsearch exposes all the necessary OpenID Connect related functionality with the OpenID Connect APIs.
|
|
2952
|
+
These APIs are used internally by Kibana in order to provide OpenID Connect based authentication, but can also be used by other, custom web applications or other clients.</p>
|
|
2953
|
+
|
|
2735
2954
|
|
|
2736
2955
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-oidc-prepare-authentication.html>`_
|
|
2737
2956
|
|
|
@@ -2808,7 +3027,26 @@ class SecurityClient(NamespacedClient):
|
|
|
2808
3027
|
] = None,
|
|
2809
3028
|
) -> ObjectApiResponse[t.Any]:
|
|
2810
3029
|
"""
|
|
2811
|
-
|
|
3030
|
+
.. raw:: html
|
|
3031
|
+
|
|
3032
|
+
<p>Create or update application privileges.</p>
|
|
3033
|
+
<p>To use this API, you must have one of the following privileges:</p>
|
|
3034
|
+
<ul>
|
|
3035
|
+
<li>The <code>manage_security</code> cluster privilege (or a greater privilege such as <code>all</code>).</li>
|
|
3036
|
+
<li>The "Manage Application Privileges" global privilege for the application being referenced in the request.</li>
|
|
3037
|
+
</ul>
|
|
3038
|
+
<p>Application names are formed from a prefix, with an optional suffix that conform to the following rules:</p>
|
|
3039
|
+
<ul>
|
|
3040
|
+
<li>The prefix must begin with a lowercase ASCII letter.</li>
|
|
3041
|
+
<li>The prefix must contain only ASCII letters or digits.</li>
|
|
3042
|
+
<li>The prefix must be at least 3 characters long.</li>
|
|
3043
|
+
<li>If the suffix exists, it must begin with either a dash <code>-</code> or <code>_</code>.</li>
|
|
3044
|
+
<li>The suffix cannot contain any of the following characters: <code>\\</code>, <code>/</code>, <code>*</code>, <code>?</code>, <code>"</code>, <code><</code>, <code>></code>, <code>|</code>, <code>,</code>, <code>*</code>.</li>
|
|
3045
|
+
<li>No part of the name can contain whitespace.</li>
|
|
3046
|
+
</ul>
|
|
3047
|
+
<p>Privilege names must begin with a lowercase ASCII letter and must contain only ASCII letters and digits along with the characters <code>_</code>, <code>-</code>, and <code>.</code>.</p>
|
|
3048
|
+
<p>Action names can contain any number of printable ASCII characters and must contain at least one of the following characters: <code>/</code>, <code>*</code>, <code>:</code>.</p>
|
|
3049
|
+
|
|
2812
3050
|
|
|
2813
3051
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-privileges.html>`_
|
|
2814
3052
|
|
|
@@ -2954,10 +3192,13 @@ class SecurityClient(NamespacedClient):
|
|
|
2954
3192
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
2955
3193
|
) -> ObjectApiResponse[t.Any]:
|
|
2956
3194
|
"""
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
3195
|
+
.. raw:: html
|
|
3196
|
+
|
|
3197
|
+
<p>Create or update roles.</p>
|
|
3198
|
+
<p>The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.
|
|
3199
|
+
The create or update roles API cannot update roles that are defined in roles files.
|
|
3200
|
+
File-based role management is not available in Elastic Serverless.</p>
|
|
3201
|
+
|
|
2961
3202
|
|
|
2962
3203
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role.html>`_
|
|
2963
3204
|
|
|
@@ -2976,7 +3217,10 @@ class SecurityClient(NamespacedClient):
|
|
|
2976
3217
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
2977
3218
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
2978
3219
|
:param remote_cluster: A list of remote cluster permissions entries.
|
|
2979
|
-
:param remote_indices: A list of remote indices permissions entries.
|
|
3220
|
+
:param remote_indices: A list of remote indices permissions entries. NOTE: Remote
|
|
3221
|
+
indices are effective for remote clusters configured with the API key based
|
|
3222
|
+
model. They have no effect for remote clusters configured with the certificate
|
|
3223
|
+
based model.
|
|
2980
3224
|
:param run_as: A list of users that the owners of this role can impersonate.
|
|
2981
3225
|
*Note*: in Serverless, the run-as feature is disabled. For API compatibility,
|
|
2982
3226
|
you can still specify an empty `run_as` field, but a non-empty list will
|
|
@@ -3066,26 +3310,48 @@ class SecurityClient(NamespacedClient):
|
|
|
3066
3310
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3067
3311
|
) -> ObjectApiResponse[t.Any]:
|
|
3068
3312
|
"""
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3313
|
+
.. raw:: html
|
|
3314
|
+
|
|
3315
|
+
<p>Create or update role mappings.</p>
|
|
3316
|
+
<p>Role mappings define which roles are assigned to each user.
|
|
3317
|
+
Each mapping has rules that identify users and a list of roles that are granted to those users.
|
|
3318
|
+
The role mapping APIs are generally the preferred way to manage role mappings rather than using role mapping files. The create or update role mappings API cannot update role mappings that are defined in role mapping files.</p>
|
|
3319
|
+
<p>NOTE: This API does not create roles. Rather, it maps users to existing roles.
|
|
3320
|
+
Roles can be created by using the create or update roles API or roles files.</p>
|
|
3321
|
+
<p><strong>Role templates</strong></p>
|
|
3322
|
+
<p>The most common use for role mappings is to create a mapping from a known value on the user to a fixed role name.
|
|
3323
|
+
For example, all users in the <code>cn=admin,dc=example,dc=com</code> LDAP group should be given the superuser role in Elasticsearch.
|
|
3324
|
+
The <code>roles</code> field is used for this purpose.</p>
|
|
3325
|
+
<p>For more complex needs, it is possible to use Mustache templates to dynamically determine the names of the roles that should be granted to the user.
|
|
3326
|
+
The <code>role_templates</code> field is used for this purpose.</p>
|
|
3327
|
+
<p>NOTE: To use role templates successfully, the relevant scripting feature must be enabled.
|
|
3328
|
+
Otherwise, all attempts to create a role mapping with role templates fail.</p>
|
|
3329
|
+
<p>All of the user fields that are available in the role mapping rules are also available in the role templates.
|
|
3330
|
+
Thus it is possible to assign a user to a role that reflects their username, their groups, or the name of the realm to which they authenticated.</p>
|
|
3331
|
+
<p>By default a template is evaluated to produce a single string that is the name of the role which should be assigned to the user.
|
|
3332
|
+
If the format of the template is set to "json" then the template is expected to produce a JSON string or an array of JSON strings for the role names.</p>
|
|
3333
|
+
|
|
3077
3334
|
|
|
3078
3335
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-role-mapping.html>`_
|
|
3079
3336
|
|
|
3080
|
-
:param name:
|
|
3081
|
-
|
|
3082
|
-
|
|
3337
|
+
:param name: The distinct name that identifies the role mapping. The name is
|
|
3338
|
+
used solely as an identifier to facilitate interaction via the API; it does
|
|
3339
|
+
not affect the behavior of the mapping in any way.
|
|
3340
|
+
:param enabled: Mappings that have `enabled` set to `false` are ignored when
|
|
3341
|
+
role mapping is performed.
|
|
3342
|
+
:param metadata: Additional metadata that helps define which roles are assigned
|
|
3343
|
+
to each user. Within the metadata object, keys beginning with `_` are reserved
|
|
3344
|
+
for system usage.
|
|
3083
3345
|
:param refresh: If `true` (the default) then refresh the affected shards to make
|
|
3084
3346
|
this operation visible to search, if `wait_for` then wait for a refresh to
|
|
3085
3347
|
make this operation visible to search, if `false` then do nothing with refreshes.
|
|
3086
|
-
:param role_templates:
|
|
3087
|
-
|
|
3088
|
-
|
|
3348
|
+
:param role_templates: A list of Mustache templates that will be evaluated to
|
|
3349
|
+
determine the roles names that should granted to the users that match the
|
|
3350
|
+
role mapping rules. Exactly one of `roles` or `role_templates` must be specified.
|
|
3351
|
+
:param roles: A list of role names that are granted to the users that match the
|
|
3352
|
+
role mapping rules. Exactly one of `roles` or `role_templates` must be specified.
|
|
3353
|
+
:param rules: The rules that determine which users should be matched by the mapping.
|
|
3354
|
+
A rule is a logical condition that is expressed by using a JSON DSL.
|
|
3089
3355
|
:param run_as:
|
|
3090
3356
|
"""
|
|
3091
3357
|
if name in SKIP_IN_PATH:
|
|
@@ -3160,23 +3426,41 @@ class SecurityClient(NamespacedClient):
|
|
|
3160
3426
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3161
3427
|
) -> ObjectApiResponse[t.Any]:
|
|
3162
3428
|
"""
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3429
|
+
.. raw:: html
|
|
3430
|
+
|
|
3431
|
+
<p>Create or update users.</p>
|
|
3432
|
+
<p>Add and update users in the native realm.
|
|
3433
|
+
A password is required for adding a new user but is optional when updating an existing user.
|
|
3434
|
+
To change a user's password without updating any other fields, use the change password API.</p>
|
|
3435
|
+
|
|
3166
3436
|
|
|
3167
3437
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-put-user.html>`_
|
|
3168
3438
|
|
|
3169
|
-
:param username:
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
:param
|
|
3174
|
-
:param
|
|
3175
|
-
:param
|
|
3176
|
-
:param
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3439
|
+
:param username: An identifier for the user. NOTE: Usernames must be at least
|
|
3440
|
+
1 and no more than 507 characters. They can contain alphanumeric characters
|
|
3441
|
+
(a-z, A-Z, 0-9), spaces, punctuation, and printable symbols in the Basic
|
|
3442
|
+
Latin (ASCII) block. Leading or trailing whitespace is not allowed.
|
|
3443
|
+
:param email: The email of the user.
|
|
3444
|
+
:param enabled: Specifies whether the user is enabled.
|
|
3445
|
+
:param full_name: The full name of the user.
|
|
3446
|
+
:param metadata: Arbitrary metadata that you want to associate with the user.
|
|
3447
|
+
:param password: The user's password. Passwords must be at least 6 characters
|
|
3448
|
+
long. When adding a user, one of `password` or `password_hash` is required.
|
|
3449
|
+
When updating an existing user, the password is optional, so that other fields
|
|
3450
|
+
on the user (such as their roles) may be updated without modifying the user's
|
|
3451
|
+
password
|
|
3452
|
+
:param password_hash: A hash of the user's password. This must be produced using
|
|
3453
|
+
the same hashing algorithm as has been configured for password storage. For
|
|
3454
|
+
more details, see the explanation of the `xpack.security.authc.password_hashing.algorithm`
|
|
3455
|
+
setting in the user cache and password hash algorithm documentation. Using
|
|
3456
|
+
this parameter allows the client to pre-hash the password for performance
|
|
3457
|
+
and/or confidentiality reasons. The `password` parameter and the `password_hash`
|
|
3458
|
+
parameter cannot be used in the same request.
|
|
3459
|
+
:param refresh: Valid values are `true`, `false`, and `wait_for`. These values
|
|
3460
|
+
have the same meaning as in the index API, but the default value for this
|
|
3461
|
+
API is true.
|
|
3462
|
+
:param roles: A set of roles the user has. The roles determine the user's access
|
|
3463
|
+
permissions. To create a user without any roles, specify an empty list (`[]`).
|
|
3180
3464
|
"""
|
|
3181
3465
|
if username in SKIP_IN_PATH:
|
|
3182
3466
|
raise ValueError("Empty value passed for parameter 'username'")
|
|
@@ -3259,8 +3543,15 @@ class SecurityClient(NamespacedClient):
|
|
|
3259
3543
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3260
3544
|
) -> ObjectApiResponse[t.Any]:
|
|
3261
3545
|
"""
|
|
3262
|
-
|
|
3263
|
-
|
|
3546
|
+
.. raw:: html
|
|
3547
|
+
|
|
3548
|
+
<p>Find API keys with a query.</p>
|
|
3549
|
+
<p>Get a paginated list of API keys and their information.
|
|
3550
|
+
You can optionally filter the results with a query.</p>
|
|
3551
|
+
<p>To use this API, you must have at least the <code>manage_own_api_key</code> or the <code>read_security</code> cluster privileges.
|
|
3552
|
+
If you have only the <code>manage_own_api_key</code> privilege, this API returns only the API keys that you own.
|
|
3553
|
+
If you have the <code>read_security</code>, <code>manage_api_key</code>, or greater privileges (including <code>manage_security</code>), this API returns all API keys regardless of ownership.</p>
|
|
3554
|
+
|
|
3264
3555
|
|
|
3265
3556
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-api-key.html>`_
|
|
3266
3557
|
|
|
@@ -3276,30 +3567,39 @@ class SecurityClient(NamespacedClient):
|
|
|
3276
3567
|
`terms`, `range`, `date_range`, `missing`, `cardinality`, `value_count`,
|
|
3277
3568
|
`composite`, `filter`, and `filters`. Additionally, aggregations only run
|
|
3278
3569
|
over the same subset of fields that query works with.
|
|
3279
|
-
:param from_:
|
|
3280
|
-
than 10,000 hits using the from and size
|
|
3281
|
-
hits, use the `search_after` parameter.
|
|
3570
|
+
:param from_: The starting document offset. It must not be negative. By default,
|
|
3571
|
+
you cannot page through more than 10,000 hits using the `from` and `size`
|
|
3572
|
+
parameters. To page through more hits, use the `search_after` parameter.
|
|
3282
3573
|
:param query: A query to filter which API keys to return. If the query parameter
|
|
3283
3574
|
is missing, it is equivalent to a `match_all` query. The query supports a
|
|
3284
3575
|
subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
|
|
3285
3576
|
`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
|
|
3286
3577
|
You can query the following public information associated with an API key:
|
|
3287
3578
|
`id`, `type`, `name`, `creation`, `expiration`, `invalidated`, `invalidation`,
|
|
3288
|
-
`username`, `realm`, and `metadata`.
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
:param
|
|
3294
|
-
|
|
3295
|
-
|
|
3579
|
+
`username`, `realm`, and `metadata`. NOTE: The queryable string values associated
|
|
3580
|
+
with API keys are internally mapped as keywords. Consequently, if no `analyzer`
|
|
3581
|
+
parameter is specified for a `match` query, then the provided match query
|
|
3582
|
+
string is interpreted as a single keyword value. Such a match query is hence
|
|
3583
|
+
equivalent to a `term` query.
|
|
3584
|
+
:param search_after: The search after definition.
|
|
3585
|
+
:param size: The number of hits to return. It must not be negative. The `size`
|
|
3586
|
+
parameter can be set to `0`, in which case no API key matches are returned,
|
|
3587
|
+
only the aggregation results. By default, you cannot page through more than
|
|
3588
|
+
10,000 hits using the `from` and `size` parameters. To page through more
|
|
3589
|
+
hits, use the `search_after` parameter.
|
|
3590
|
+
:param sort: The sort definition. Other than `id`, all public fields of an API
|
|
3591
|
+
key are eligible for sorting. In addition, sort can also be applied to the
|
|
3592
|
+
`_doc` field to sort by index order.
|
|
3296
3593
|
:param typed_keys: Determines whether aggregation names are prefixed by their
|
|
3297
3594
|
respective types in the response.
|
|
3298
3595
|
:param with_limited_by: Return the snapshot of the owner user's role descriptors
|
|
3299
3596
|
associated with the API key. An API key's actual permission is the intersection
|
|
3300
|
-
of its assigned role descriptors and the owner user's role descriptors
|
|
3301
|
-
|
|
3302
|
-
|
|
3597
|
+
of its assigned role descriptors and the owner user's role descriptors (effectively
|
|
3598
|
+
limited by it). An API key cannot retrieve any API key’s limited-by role
|
|
3599
|
+
descriptors (including itself) unless it has `manage_api_key` or higher privileges.
|
|
3600
|
+
:param with_profile_uid: Determines whether to also retrieve the profile UID
|
|
3601
|
+
for the API key owner principal. If it exists, the profile UID is returned
|
|
3602
|
+
under the `profile_uid` response field for each API key.
|
|
3303
3603
|
"""
|
|
3304
3604
|
__path_parts: t.Dict[str, str] = {}
|
|
3305
3605
|
__path = "/_security/_query/api_key"
|
|
@@ -3386,26 +3686,34 @@ class SecurityClient(NamespacedClient):
|
|
|
3386
3686
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3387
3687
|
) -> ObjectApiResponse[t.Any]:
|
|
3388
3688
|
"""
|
|
3389
|
-
|
|
3390
|
-
|
|
3689
|
+
.. raw:: html
|
|
3690
|
+
|
|
3691
|
+
<p>Find roles with a query.</p>
|
|
3692
|
+
<p>Get roles in a paginated manner.
|
|
3693
|
+
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
|
|
3694
|
+
The query roles API does not retrieve roles that are defined in roles files, nor built-in ones.
|
|
3695
|
+
You can optionally filter the results with a query.
|
|
3696
|
+
Also, the results can be paginated and sorted.</p>
|
|
3697
|
+
|
|
3391
3698
|
|
|
3392
3699
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-role.html>`_
|
|
3393
3700
|
|
|
3394
|
-
:param from_:
|
|
3395
|
-
than 10,000 hits using the from and size
|
|
3396
|
-
hits, use the `search_after` parameter.
|
|
3701
|
+
:param from_: The starting document offset. It must not be negative. By default,
|
|
3702
|
+
you cannot page through more than 10,000 hits using the `from` and `size`
|
|
3703
|
+
parameters. To page through more hits, use the `search_after` parameter.
|
|
3397
3704
|
:param query: A query to filter which roles to return. If the query parameter
|
|
3398
3705
|
is missing, it is equivalent to a `match_all` query. The query supports a
|
|
3399
3706
|
subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
|
|
3400
3707
|
`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
|
|
3401
3708
|
You can query the following information associated with roles: `name`, `description`,
|
|
3402
|
-
`metadata`, `applications.application`, `applications.privileges`, `applications.resources`.
|
|
3403
|
-
:param search_after:
|
|
3404
|
-
:param size: The number of hits to return.
|
|
3405
|
-
more than 10,000 hits using the `from` and `size`
|
|
3406
|
-
more hits, use the `search_after` parameter.
|
|
3407
|
-
:param sort:
|
|
3408
|
-
sort can also be applied to the `_doc` field to sort by index
|
|
3709
|
+
`metadata`, `applications.application`, `applications.privileges`, and `applications.resources`.
|
|
3710
|
+
:param search_after: The search after definition.
|
|
3711
|
+
:param size: The number of hits to return. It must not be negative. By default,
|
|
3712
|
+
you cannot page through more than 10,000 hits using the `from` and `size`
|
|
3713
|
+
parameters. To page through more hits, use the `search_after` parameter.
|
|
3714
|
+
:param sort: The sort definition. You can sort on `username`, `roles`, or `enabled`.
|
|
3715
|
+
In addition, sort can also be applied to the `_doc` field to sort by index
|
|
3716
|
+
order.
|
|
3409
3717
|
"""
|
|
3410
3718
|
__path_parts: t.Dict[str, str] = {}
|
|
3411
3719
|
__path = "/_security/_query/role"
|
|
@@ -3472,28 +3780,35 @@ class SecurityClient(NamespacedClient):
|
|
|
3472
3780
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3473
3781
|
) -> ObjectApiResponse[t.Any]:
|
|
3474
3782
|
"""
|
|
3475
|
-
|
|
3476
|
-
|
|
3783
|
+
.. raw:: html
|
|
3784
|
+
|
|
3785
|
+
<p>Find users with a query.</p>
|
|
3786
|
+
<p>Get information for users in a paginated manner.
|
|
3787
|
+
You can optionally filter the results with a query.</p>
|
|
3788
|
+
<p>NOTE: As opposed to the get user API, built-in users are excluded from the result.
|
|
3789
|
+
This API is only for native users.</p>
|
|
3790
|
+
|
|
3477
3791
|
|
|
3478
3792
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-query-user.html>`_
|
|
3479
3793
|
|
|
3480
|
-
:param from_:
|
|
3481
|
-
than 10,000 hits using the from and size
|
|
3482
|
-
hits, use the `search_after` parameter.
|
|
3794
|
+
:param from_: The starting document offset. It must not be negative. By default,
|
|
3795
|
+
you cannot page through more than 10,000 hits using the `from` and `size`
|
|
3796
|
+
parameters. To page through more hits, use the `search_after` parameter.
|
|
3483
3797
|
:param query: A query to filter which users to return. If the query parameter
|
|
3484
3798
|
is missing, it is equivalent to a `match_all` query. The query supports a
|
|
3485
3799
|
subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
|
|
3486
3800
|
`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
|
|
3487
3801
|
You can query the following information associated with user: `username`,
|
|
3488
|
-
`roles`, `enabled`
|
|
3489
|
-
:param search_after:
|
|
3490
|
-
:param size: The number of hits to return.
|
|
3491
|
-
more than 10,000 hits using the `from` and `size`
|
|
3492
|
-
more hits, use the `search_after` parameter.
|
|
3493
|
-
:param sort: Fields eligible for sorting are: username
|
|
3494
|
-
sort can also be applied to the `_doc` field
|
|
3495
|
-
|
|
3496
|
-
|
|
3802
|
+
`roles`, `enabled`, `full_name`, and `email`.
|
|
3803
|
+
:param search_after: The search after definition
|
|
3804
|
+
:param size: The number of hits to return. It must not be negative. By default,
|
|
3805
|
+
you cannot page through more than 10,000 hits using the `from` and `size`
|
|
3806
|
+
parameters. To page through more hits, use the `search_after` parameter.
|
|
3807
|
+
:param sort: The sort definition. Fields eligible for sorting are: `username`,
|
|
3808
|
+
`roles`, `enabled`. In addition, sort can also be applied to the `_doc` field
|
|
3809
|
+
to sort by index order.
|
|
3810
|
+
:param with_profile_uid: Determines whether to retrieve the user profile UID,
|
|
3811
|
+
if it exists, for the users.
|
|
3497
3812
|
"""
|
|
3498
3813
|
__path_parts: t.Dict[str, str] = {}
|
|
3499
3814
|
__path = "/_security/_query/user"
|
|
@@ -3551,19 +3866,21 @@ class SecurityClient(NamespacedClient):
|
|
|
3551
3866
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3552
3867
|
) -> ObjectApiResponse[t.Any]:
|
|
3553
3868
|
"""
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3869
|
+
.. raw:: html
|
|
3870
|
+
|
|
3871
|
+
<p>Authenticate SAML.</p>
|
|
3872
|
+
<p>Submit a SAML response message to Elasticsearch for consumption.</p>
|
|
3873
|
+
<p>NOTE: This API is intended for use by custom web applications other than Kibana.
|
|
3874
|
+
If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
|
|
3875
|
+
<p>The SAML message that is submitted can be:</p>
|
|
3876
|
+
<ul>
|
|
3877
|
+
<li>A response to a SAML authentication request that was previously created using the SAML prepare authentication API.</li>
|
|
3878
|
+
<li>An unsolicited SAML message in the case of an IdP-initiated single sign-on (SSO) flow.</li>
|
|
3879
|
+
</ul>
|
|
3880
|
+
<p>In either case, the SAML message needs to be a base64 encoded XML document with a root element of <code><Response></code>.</p>
|
|
3881
|
+
<p>After successful validation, Elasticsearch responds with an Elasticsearch internal access token and refresh token that can be subsequently used for authentication.
|
|
3882
|
+
This API endpoint essentially exchanges SAML responses that indicate successful authentication in the IdP for Elasticsearch access and refresh tokens, which can be used for authentication against Elasticsearch.</p>
|
|
3883
|
+
|
|
3567
3884
|
|
|
3568
3885
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-authenticate.html>`_
|
|
3569
3886
|
|
|
@@ -3625,16 +3942,18 @@ class SecurityClient(NamespacedClient):
|
|
|
3625
3942
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3626
3943
|
) -> ObjectApiResponse[t.Any]:
|
|
3627
3944
|
"""
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3945
|
+
.. raw:: html
|
|
3946
|
+
|
|
3947
|
+
<p>Logout of SAML completely.</p>
|
|
3948
|
+
<p>Verifies the logout response sent from the SAML IdP.</p>
|
|
3949
|
+
<p>NOTE: This API is intended for use by custom web applications other than Kibana.
|
|
3950
|
+
If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
|
|
3951
|
+
<p>The SAML IdP may send a logout response back to the SP after handling the SP-initiated SAML Single Logout.
|
|
3952
|
+
This API verifies the response by ensuring the content is relevant and validating its signature.
|
|
3953
|
+
An empty response is returned if the verification process is successful.
|
|
3954
|
+
The response can be sent by the IdP with either the HTTP-Redirect or the HTTP-Post binding.
|
|
3955
|
+
The caller of this API must prepare the request accordingly so that this API can handle either of them.</p>
|
|
3956
|
+
|
|
3638
3957
|
|
|
3639
3958
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-complete-logout.html>`_
|
|
3640
3959
|
|
|
@@ -3700,15 +4019,17 @@ class SecurityClient(NamespacedClient):
|
|
|
3700
4019
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3701
4020
|
) -> ObjectApiResponse[t.Any]:
|
|
3702
4021
|
"""
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
4022
|
+
.. raw:: html
|
|
4023
|
+
|
|
4024
|
+
<p>Invalidate SAML.</p>
|
|
4025
|
+
<p>Submit a SAML LogoutRequest message to Elasticsearch for consumption.</p>
|
|
4026
|
+
<p>NOTE: This API is intended for use by custom web applications other than Kibana.
|
|
4027
|
+
If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
|
|
4028
|
+
<p>The logout request comes from the SAML IdP during an IdP initiated Single Logout.
|
|
4029
|
+
The custom web application can use this API to have Elasticsearch process the <code>LogoutRequest</code>.
|
|
4030
|
+
After successful validation of the request, Elasticsearch invalidates the access token and refresh token that corresponds to that specific SAML principal and provides a URL that contains a SAML LogoutResponse message.
|
|
4031
|
+
Thus the user can be redirected back to their IdP.</p>
|
|
4032
|
+
|
|
3712
4033
|
|
|
3713
4034
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-invalidate.html>`_
|
|
3714
4035
|
|
|
@@ -3775,14 +4096,15 @@ class SecurityClient(NamespacedClient):
|
|
|
3775
4096
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3776
4097
|
) -> ObjectApiResponse[t.Any]:
|
|
3777
4098
|
"""
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
4099
|
+
.. raw:: html
|
|
4100
|
+
|
|
4101
|
+
<p>Logout of SAML.</p>
|
|
4102
|
+
<p>Submits a request to invalidate an access token and refresh token.</p>
|
|
4103
|
+
<p>NOTE: This API is intended for use by custom web applications other than Kibana.
|
|
4104
|
+
If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
|
|
4105
|
+
<p>This API invalidates the tokens that were generated for a user by the SAML authenticate API.
|
|
4106
|
+
If the SAML realm in Elasticsearch is configured accordingly and the SAML IdP supports this, the Elasticsearch response contains a URL to redirect the user to the IdP that contains a SAML logout request (starting an SP-initiated SAML Single Logout).</p>
|
|
4107
|
+
|
|
3786
4108
|
|
|
3787
4109
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-logout.html>`_
|
|
3788
4110
|
|
|
@@ -3839,20 +4161,20 @@ class SecurityClient(NamespacedClient):
|
|
|
3839
4161
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3840
4162
|
) -> ObjectApiResponse[t.Any]:
|
|
3841
4163
|
"""
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
4164
|
+
.. raw:: html
|
|
4165
|
+
|
|
4166
|
+
<p>Prepare SAML authentication.</p>
|
|
4167
|
+
<p>Create a SAML authentication request (<code><AuthnRequest></code>) as a URL string based on the configuration of the respective SAML realm in Elasticsearch.</p>
|
|
4168
|
+
<p>NOTE: This API is intended for use by custom web applications other than Kibana.
|
|
4169
|
+
If you are using Kibana, refer to the documentation for configuring SAML single-sign-on on the Elastic Stack.</p>
|
|
4170
|
+
<p>This API returns a URL pointing to the SAML Identity Provider.
|
|
4171
|
+
You can use the URL to redirect the browser of the user in order to continue the authentication process.
|
|
4172
|
+
The URL includes a single parameter named <code>SAMLRequest</code>, which contains a SAML Authentication request that is deflated and Base64 encoded.
|
|
4173
|
+
If the configuration dictates that SAML authentication requests should be signed, the URL has two extra parameters named <code>SigAlg</code> and <code>Signature</code>.
|
|
4174
|
+
These parameters contain the algorithm used for the signature and the signature value itself.
|
|
4175
|
+
It also returns a random string that uniquely identifies this SAML Authentication request.
|
|
4176
|
+
The caller of this API needs to store this identifier as it needs to be used in a following step of the authentication process.</p>
|
|
4177
|
+
|
|
3856
4178
|
|
|
3857
4179
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-prepare-authentication.html>`_
|
|
3858
4180
|
|
|
@@ -3907,11 +4229,13 @@ class SecurityClient(NamespacedClient):
|
|
|
3907
4229
|
pretty: t.Optional[bool] = None,
|
|
3908
4230
|
) -> ObjectApiResponse[t.Any]:
|
|
3909
4231
|
"""
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
4232
|
+
.. raw:: html
|
|
4233
|
+
|
|
4234
|
+
<p>Create SAML service provider metadata.</p>
|
|
4235
|
+
<p>Generate SAML metadata for a SAML 2.0 Service Provider.</p>
|
|
4236
|
+
<p>The SAML 2.0 specification provides a mechanism for Service Providers to describe their capabilities and configuration using a metadata file.
|
|
4237
|
+
This API generates Service Provider metadata based on the configuration of a SAML realm in Elasticsearch.</p>
|
|
4238
|
+
|
|
3915
4239
|
|
|
3916
4240
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-saml-sp-metadata.html>`_
|
|
3917
4241
|
|
|
@@ -3957,12 +4281,14 @@ class SecurityClient(NamespacedClient):
|
|
|
3957
4281
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
3958
4282
|
) -> ObjectApiResponse[t.Any]:
|
|
3959
4283
|
"""
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
4284
|
+
.. raw:: html
|
|
4285
|
+
|
|
4286
|
+
<p>Suggest a user profile.</p>
|
|
4287
|
+
<p>Get suggestions for user profiles that match specified search criteria.</p>
|
|
4288
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
|
|
4289
|
+
Individual users and external applications should not call this API directly.
|
|
4290
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
4291
|
+
|
|
3966
4292
|
|
|
3967
4293
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-suggest-user-profile.html>`_
|
|
3968
4294
|
|
|
@@ -4033,38 +4359,43 @@ class SecurityClient(NamespacedClient):
|
|
|
4033
4359
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4034
4360
|
) -> ObjectApiResponse[t.Any]:
|
|
4035
4361
|
"""
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4362
|
+
.. raw:: html
|
|
4363
|
+
|
|
4364
|
+
<p>Update an API key.</p>
|
|
4365
|
+
<p>Update attributes of an existing API key.
|
|
4366
|
+
This API supports updates to an API key's access scope, expiration, and metadata.</p>
|
|
4367
|
+
<p>To use this API, you must have at least the <code>manage_own_api_key</code> cluster privilege.
|
|
4368
|
+
Users can only update API keys that they created or that were granted to them.
|
|
4369
|
+
To update another user’s API key, use the <code>run_as</code> feature to submit a request on behalf of another user.</p>
|
|
4370
|
+
<p>IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required.</p>
|
|
4371
|
+
<p>Use this API to update API keys created by the create API key or grant API Key APIs.
|
|
4372
|
+
If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead.
|
|
4373
|
+
It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API.</p>
|
|
4374
|
+
<p>The access scope of an API key is derived from the <code>role_descriptors</code> you specify in the request and a snapshot of the owner user's permissions at the time of the request.
|
|
4375
|
+
The snapshot of the owner's permissions is updated automatically on every call.</p>
|
|
4376
|
+
<p>IMPORTANT: If you don't specify <code>role_descriptors</code> in the request, a call to this API might still change the API key's access scope.
|
|
4377
|
+
This change can occur if the owner user's permissions have changed since the API key was created or last modified.</p>
|
|
4378
|
+
|
|
4052
4379
|
|
|
4053
4380
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-api-key.html>`_
|
|
4054
4381
|
|
|
4055
4382
|
:param id: The ID of the API key to update.
|
|
4056
|
-
:param expiration:
|
|
4383
|
+
:param expiration: The expiration time for the API key. By default, API keys
|
|
4384
|
+
never expire. This property can be omitted to leave the expiration unchanged.
|
|
4057
4385
|
:param metadata: Arbitrary metadata that you want to associate with the API key.
|
|
4058
|
-
It supports nested data structure. Within the metadata object, keys beginning
|
|
4059
|
-
with _ are reserved for system usage.
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4386
|
+
It supports a nested data structure. Within the metadata object, keys beginning
|
|
4387
|
+
with `_` are reserved for system usage. When specified, this value fully
|
|
4388
|
+
replaces the metadata previously associated with the API key.
|
|
4389
|
+
:param role_descriptors: The role descriptors to assign to this API key. The
|
|
4390
|
+
API key's effective permissions are an intersection of its assigned privileges
|
|
4391
|
+
and the point in time snapshot of permissions of the owner user. You can
|
|
4392
|
+
assign new privileges by specifying them in this parameter. To remove assigned
|
|
4393
|
+
privileges, you can supply an empty `role_descriptors` parameter, that is
|
|
4394
|
+
to say, an empty object `{}`. If an API key has no assigned privileges, it
|
|
4395
|
+
inherits the owner user's full permissions. The snapshot of the owner's permissions
|
|
4396
|
+
is always updated, whether you supply the `role_descriptors` parameter or
|
|
4397
|
+
not. The structure of a role descriptor is the same as the request for the
|
|
4398
|
+
create API keys API.
|
|
4068
4399
|
"""
|
|
4069
4400
|
if id in SKIP_IN_PATH:
|
|
4070
4401
|
raise ValueError("Empty value passed for parameter 'id'")
|
|
@@ -4119,19 +4450,20 @@ class SecurityClient(NamespacedClient):
|
|
|
4119
4450
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4120
4451
|
) -> ObjectApiResponse[t.Any]:
|
|
4121
4452
|
"""
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4453
|
+
.. raw:: html
|
|
4454
|
+
|
|
4455
|
+
<p>Update a cross-cluster API key.</p>
|
|
4456
|
+
<p>Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.</p>
|
|
4457
|
+
<p>To use this API, you must have at least the <code>manage_security</code> cluster privilege.
|
|
4458
|
+
Users can only update API keys that they created.
|
|
4459
|
+
To update another user's API key, use the <code>run_as</code> feature to submit a request on behalf of another user.</p>
|
|
4460
|
+
<p>IMPORTANT: It's not possible to use an API key as the authentication credential for this API.
|
|
4461
|
+
To update an API key, the owner user's credentials are required.</p>
|
|
4462
|
+
<p>It's not possible to update expired API keys, or API keys that have been invalidated by the invalidate API key API.</p>
|
|
4463
|
+
<p>This API supports updates to an API key's access scope, metadata, and expiration.
|
|
4464
|
+
The owner user's information, such as the <code>username</code> and <code>realm</code>, is also updated automatically on every call.</p>
|
|
4465
|
+
<p>NOTE: This API cannot update REST API keys, which should be updated by either the update API key or bulk update API keys API.</p>
|
|
4466
|
+
|
|
4135
4467
|
|
|
4136
4468
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-cross-cluster-api-key.html>`_
|
|
4137
4469
|
|
|
@@ -4203,12 +4535,14 @@ class SecurityClient(NamespacedClient):
|
|
|
4203
4535
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4204
4536
|
) -> ObjectApiResponse[t.Any]:
|
|
4205
4537
|
"""
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4538
|
+
.. raw:: html
|
|
4539
|
+
|
|
4540
|
+
<p>Update security index settings.</p>
|
|
4541
|
+
<p>Update the user-configurable settings for the security internal index (<code>.security</code> and associated indices). Only a subset of settings are allowed to be modified. This includes <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
|
|
4542
|
+
<p>NOTE: If <code>index.auto_expand_replicas</code> is set, <code>index.number_of_replicas</code> will be ignored during updates.</p>
|
|
4543
|
+
<p>If a specific index is not in use on the system and settings are provided for it, the request will be rejected.
|
|
4544
|
+
This API does not yet support configuring the settings for indices before they are in use.</p>
|
|
4545
|
+
|
|
4212
4546
|
|
|
4213
4547
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-settings.html>`_
|
|
4214
4548
|
|
|
@@ -4277,19 +4611,23 @@ class SecurityClient(NamespacedClient):
|
|
|
4277
4611
|
body: t.Optional[t.Dict[str, t.Any]] = None,
|
|
4278
4612
|
) -> ObjectApiResponse[t.Any]:
|
|
4279
4613
|
"""
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4614
|
+
.. raw:: html
|
|
4615
|
+
|
|
4616
|
+
<p>Update user profile data.</p>
|
|
4617
|
+
<p>Update specific data for the user profile that is associated with a unique ID.</p>
|
|
4618
|
+
<p>NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions.
|
|
4619
|
+
Individual users and external applications should not call this API directly.
|
|
4620
|
+
Elastic reserves the right to change or remove this feature in future releases without prior notice.</p>
|
|
4621
|
+
<p>To use this API, you must have one of the following privileges:</p>
|
|
4622
|
+
<ul>
|
|
4623
|
+
<li>The <code>manage_user_profile</code> cluster privilege.</li>
|
|
4624
|
+
<li>The <code>update_profile_data</code> global privilege for the namespaces that are referenced in the request.</li>
|
|
4625
|
+
</ul>
|
|
4626
|
+
<p>This API updates the <code>labels</code> and <code>data</code> fields of an existing user profile document with JSON objects.
|
|
4627
|
+
New keys and their values are added to the profile document and conflicting keys are replaced by data that's included in the request.</p>
|
|
4628
|
+
<p>For both labels and data, content is namespaced by the top-level fields.
|
|
4629
|
+
The <code>update_profile_data</code> global privilege grants privileges for updating only the allowed namespaces.</p>
|
|
4630
|
+
|
|
4293
4631
|
|
|
4294
4632
|
`<https://www.elastic.co/guide/en/elasticsearch/reference/8.17/security-api-update-user-profile-data.html>`_
|
|
4295
4633
|
|