Skip to content

Commit a0ea298

Browse files
authored
Add remaining security API examples (#3546) (#3559)
(cherry picked from commit a1856fe)
1 parent 2d0f83d commit a0ea298

File tree

94 files changed

+1619
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1619
-481
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 174 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 39 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 321 additions & 239 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,7 @@ reroute-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branc
477477
render-search-template-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/render-search-template-api.html
478478
reset-transform,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/reset-transform.html
479479
restore-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/snapshots-restore-snapshot.html
480-
sql-delete-async-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-async-sql-search-api.html
481-
sql-clear-cursor-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-sql-cursor-api.html
480+
role-restriction,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/role-restriction.html
482481
rollup-agg-limitations,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rollup-agg-limitations.html
483482
rollup-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rollup-delete-job.html
484483
rollup-get-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rollup-get-job.html
@@ -665,8 +664,13 @@ security-api-update-key,https://www.elastic.co/guide/en/elasticsearch/reference/
665664
security-api-update-user-data,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-update-user-profile-data.html
666665
security-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-privileges.html
667666
security-api-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-update-settings.html
667+
security-application-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-privileges.html#application-privileges
668+
security-encrypt-http,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-basic-setup-https.html#encrypt-http-communication
668669
security-encrypt-internode,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-basic-setup.html#encrypt-internode-communication
669670
security-saml-guide,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/saml-guide-stack.html
671+
security-settings-api-keys,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-settings.html#api-key-service-settings
672+
security-settings-hashing,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-settings.html#hashing-settings
673+
security-user-cache,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/controlling-user-cache.html
670674
service-accounts,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/service-accounts.html
671675
set-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/set-processor.html
672676
shape,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/shape.html
@@ -701,6 +705,8 @@ query-dsl-sparse-vector-query,https://www.elastic.co/guide/en/elasticsearch/refe
701705
split-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/split-processor.html
702706
sql-async-search-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-async-sql-search-api.html
703707
sql-async-status-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-async-sql-search-status-api.html
708+
sql-clear-cursor-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-sql-cursor-api.html
709+
sql-delete-async-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-async-sql-search-api.html
704710
sql-rest-columnar,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sql-rest-columnar.html
705711
sql-rest-filtering,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sql-rest-filtering.html
706712
sql-rest-format,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sql-rest-format.html

specification/security/_types/Privileges.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export enum RemoteClusterPrivilege {
217217
export class IndicesPrivileges {
218218
/**
219219
* The document fields that the owners of the role have read access to.
220-
* @doc_id field-and-document-access-control
220+
* @ext_doc_id field-and-document-access-control
221221
*/
222222
field_security?: FieldSecurity
223223
// We're using IndexName | IndexName[] instead of Indices in this file on purpose:
@@ -253,7 +253,7 @@ export class RemoteIndicesPrivileges {
253253
clusters: Names
254254
/**
255255
* The document fields that the owners of the role have read access to.
256-
* @doc_id field-and-document-access-control
256+
* @ext_doc_id field-and-document-access-control
257257
*/
258258
field_security?: FieldSecurity
259259
/**
@@ -293,7 +293,7 @@ export class RemoteClusterPrivileges {
293293
export class UserIndicesPrivileges {
294294
/**
295295
* The document fields that the owners of the role have read access to.
296-
* @doc_id field-and-document-access-control
296+
* @ext_doc_id field-and-document-access-control
297297
*/
298298
field_security?: FieldSecurity[]
299299
/**
@@ -430,7 +430,7 @@ export class ReplicationAccess {
430430
export class SearchAccess {
431431
/**
432432
* The document fields that the owners of the role have read access to.
433-
* @doc_id field-and-document-access-control
433+
* @ext_doc_id field-and-document-access-control
434434
*/
435435
field_security?: FieldSecurity
436436
/**

specification/security/_types/RoleDescriptor.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export class RoleDescriptor {
4646
*/
4747
remote_indices?: RemoteIndicesPrivileges[]
4848
/**
49-
* A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.
49+
* A list of cluster permissions for remote clusters.
50+
* NOTE: This is limited a subset of the cluster permissions.
5051
* @availability stack since=8.15.0
5152
*/
5253
remote_cluster?: RemoteClusterPrivileges[]
@@ -64,8 +65,10 @@ export class RoleDescriptor {
6465
*/
6566
metadata?: Metadata
6667
/**
67-
* A list of users that the API keys can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.
68-
* @doc_id run-as-privilege
68+
* A list of users that the API keys can impersonate.
69+
* NOTE: In Elastic Cloud Serverless, the run-as feature is disabled.
70+
* For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.
71+
* @ext_doc_id run-as-privilege
6972
*/
7073
run_as?: string[]
7174
/**
@@ -95,7 +98,8 @@ export class RoleDescriptorRead implements OverloadOf<RoleDescriptor> {
9598
*/
9699
remote_indices?: RemoteIndicesPrivileges[]
97100
/**
98-
* A list of cluster permissions for remote clusters. Note - this is limited a subset of the cluster permissions.
101+
* A list of cluster permissions for remote clusters.
102+
* NOTE: This is limited a subset of the cluster permissions.
99103
* @availability stack since=8.15.0
100104
*/
101105
remote_cluster?: RemoteClusterPrivileges[]
@@ -113,21 +117,26 @@ export class RoleDescriptorRead implements OverloadOf<RoleDescriptor> {
113117
metadata?: Metadata
114118
/**
115119
* A list of users that the API keys can impersonate.
116-
* @doc_id run-as-privilege
120+
* @ext_doc_id run-as-privilege
117121
*/
118122
run_as?: string[]
119123
/**
120-
* Optional description of the role descriptor
124+
* An optional description of the role descriptor.
121125
*/
122126
description?: string
123127
/**
124-
* Restriction for when the role descriptor is allowed to be effective.
128+
* A restriction for when the role descriptor is allowed to be effective.
129+
* @ext_doc_id role-restriction
125130
*/
126131
restriction?: Restriction
127132
transient_metadata?: Dictionary<string, UserDefinedValue>
128133
}
129134

130135
export class Restriction {
136+
/**
137+
* A list of workflows to which the API key is restricted.
138+
* NOTE: In order to use a role restriction, an API key must be created with a single role descriptor.
139+
*/
131140
workflows: RestrictionWorkflow[]
132141
}
133142

specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ import { Name } from '@_types/common'
3333
*/
3434
export interface Request extends RequestBase {
3535
path_parts: {
36+
/**
37+
* A comma-separated list of applications.
38+
* To clear all applications, use an asterism (`*`).
39+
* It does not support other wildcard patterns.
40+
*/
3641
application: Name
3742
}
3843
}

specification/security/clear_cached_realms/SecurityClearCachedRealmsRequest.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,32 @@ import { Names } from '@_types/common'
2323
/**
2424
* Clear the user cache.
2525
*
26-
* Evict users from the user cache. You can completely clear the cache or evict specific users.
26+
* Evict users from the user cache.
27+
* You can completely clear the cache or evict specific users.
28+
*
29+
* 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.
30+
* There are realm settings that you can use to configure the user cache.
31+
* For more information, refer to the documentation about controlling the user cache.
2732
* @rest_spec_name security.clear_cached_realms
2833
* @availability stack stability=stable
2934
* @availability serverless stability=stable visibility=private
3035
* @doc_id security-api-clear-cache
36+
* @ext_doc_id security-user-cache
3137
*/
3238
export interface Request extends RequestBase {
3339
path_parts: {
40+
/**
41+
* A comma-separated list of realms.
42+
* To clear all realms, use an asterisk (`*`).
43+
* It does not support other wildcard patterns.
44+
*/
3445
realms: Names
3546
}
3647
query_parameters: {
48+
/**
49+
* A comma-separated list of the users to clear from the cache.
50+
* If you do not specify this parameter, the API evicts all users from the user cache.
51+
*/
3752
usernames?: string[]
3853
}
3954
}

specification/security/clear_cached_roles/ClearCachedRolesRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ import { Names } from '@_types/common'
3232
*/
3333
export interface Request extends RequestBase {
3434
path_parts: {
35+
/**
36+
* A comma-separated list of roles to evict from the role cache.
37+
* To evict all roles, use an asterisk (`*`).
38+
* It does not support other wildcard patterns.
39+
*/
3540
name: Names
3641
}
3742
}

specification/security/clear_cached_service_tokens/ClearCachedServiceTokensRequest.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ import { Names, Namespace, Service } from '@_types/common'
2424
* Clear service account token caches.
2525
*
2626
* Evict a subset of all entries from the service account token caches.
27+
* Two separate caches exist for service account tokens: one cache for tokens backed by the `service_tokens` file, and another for tokens backed by the `.security` index.
28+
* This API clears matching entries from both caches.
29+
*
30+
* The cache for service account tokens backed by the `.security` index is cleared automatically on state changes of the security index.
31+
* The cache for tokens backed by the `service_tokens` file is cleared automatically on file changes.
2732
* @rest_spec_name security.clear_cached_service_tokens
2833
* @availability stack stability=stable
2934
* @availability serverless stability=stable visibility=private
@@ -33,8 +38,15 @@ import { Names, Namespace, Service } from '@_types/common'
3338
*/
3439
export interface Request extends RequestBase {
3540
path_parts: {
41+
/** The namespace, which is a top-level grouping of service accounts. */
3642
namespace: Namespace
43+
/** The name of the service, which must be unique within its namespace. */
3744
service: Service
45+
/**
46+
* A comma-separated list of token names to evict from the service account token caches.
47+
* Use a wildcard (`*`) to evict all tokens that belong to a service account.
48+
* It does not support other wildcard patterns.
49+
*/
3850
name: Names
3951
}
4052
}

0 commit comments

Comments
 (0)