Skip to content

Commit 8980faa

Browse files
authored
Add remaining security API examples (#3546) (#3558)
(cherry picked from commit a1856fe)
1 parent 3fc0035 commit 8980faa

File tree

94 files changed

+1612
-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

+1612
-481
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 175 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: 316 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
@@ -479,8 +479,7 @@ reroute-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branc
479479
render-search-template-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/render-search-template-api.html
480480
reset-transform,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/reset-transform.html
481481
restore-snapshot,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/snapshots-restore-snapshot.html
482-
sql-delete-async-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-async-sql-search-api.html
483-
sql-clear-cursor-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-sql-cursor-api.html
482+
role-restriction,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/role-restriction.html
484483
rollup-agg-limitations,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rollup-agg-limitations.html
485484
rollup-delete-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rollup-delete-job.html
486485
rollup-get-job,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/rollup-get-job.html
@@ -665,9 +664,14 @@ security-api-cross-cluster-key-update,https://www.elastic.co/guide/en/elasticsea
665664
security-api-update-key,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-update-api-key.html
666665
security-api-update-user-data,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-api-update-user-profile-data.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-privileges,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-privileges.html
670671
security-saml-guide,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/saml-guide-stack.html
672+
security-settings-api-keys,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-settings.html#api-key-service-settings
673+
security-settings-hashing,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/security-settings.html#hashing-settings
674+
security-user-cache,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/controlling-user-cache.html
671675
service-accounts,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/service-accounts.html
672676
set-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/set-processor.html
673677
shape,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/shape.html
@@ -702,6 +706,8 @@ query-dsl-sparse-vector-query,https://www.elastic.co/guide/en/elasticsearch/refe
702706
split-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/split-processor.html
703707
sql-async-search-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-async-sql-search-api.html
704708
sql-async-status-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-async-sql-search-status-api.html
709+
sql-clear-cursor-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/clear-sql-cursor-api.html
710+
sql-delete-async-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-async-sql-search-api.html
705711
sql-rest-columnar,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sql-rest-columnar.html
706712
sql-rest-filtering,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/sql-rest-filtering.html
707713
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
@@ -216,7 +216,7 @@ export enum RemoteClusterPrivilege {
216216
export class IndicesPrivileges {
217217
/**
218218
* The document fields that the owners of the role have read access to.
219-
* @doc_id field-and-document-access-control
219+
* @ext_doc_id field-and-document-access-control
220220
*/
221221
field_security?: FieldSecurity
222222
// We're using IndexName | IndexName[] instead of Indices in this file on purpose:
@@ -252,7 +252,7 @@ export class RemoteIndicesPrivileges {
252252
clusters: Names
253253
/**
254254
* The document fields that the owners of the role have read access to.
255-
* @doc_id field-and-document-access-control
255+
* @ext_doc_id field-and-document-access-control
256256
*/
257257
field_security?: FieldSecurity
258258
/**
@@ -292,7 +292,7 @@ export class RemoteClusterPrivileges {
292292
export class UserIndicesPrivileges {
293293
/**
294294
* The document fields that the owners of the role have read access to.
295-
* @doc_id field-and-document-access-control
295+
* @ext_doc_id field-and-document-access-control
296296
*/
297297
field_security?: FieldSecurity[]
298298
/**
@@ -429,7 +429,7 @@ export class ReplicationAccess {
429429
export class SearchAccess {
430430
/**
431431
* The document fields that the owners of the role have read access to.
432-
* @doc_id field-and-document-access-control
432+
* @ext_doc_id field-and-document-access-control
433433
*/
434434
field_security?: FieldSecurity
435435
/**

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
@@ -39,6 +39,11 @@ export interface Request extends RequestBase {
3939
}
4040
]
4141
path_parts: {
42+
/**
43+
* A comma-separated list of applications.
44+
* To clear all applications, use an asterism (`*`).
45+
* It does not support other wildcard patterns.
46+
*/
4247
application: Name
4348
}
4449
}

specification/security/clear_cached_realms/SecurityClearCachedRealmsRequest.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,17 @@ 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
urls: [
@@ -37,9 +43,18 @@ export interface Request extends RequestBase {
3743
}
3844
]
3945
path_parts: {
46+
/**
47+
* A comma-separated list of realms.
48+
* To clear all realms, use an asterisk (`*`).
49+
* It does not support other wildcard patterns.
50+
*/
4051
realms: Names
4152
}
4253
query_parameters: {
54+
/**
55+
* A comma-separated list of the users to clear from the cache.
56+
* If you do not specify this parameter, the API evicts all users from the user cache.
57+
*/
4358
usernames?: string[]
4459
}
4560
}

specification/security/clear_cached_roles/ClearCachedRolesRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ export interface Request extends RequestBase {
3838
}
3939
]
4040
path_parts: {
41+
/**
42+
* A comma-separated list of roles to evict from the role cache.
43+
* To evict all roles, use an asterisk (`*`).
44+
* It does not support other wildcard patterns.
45+
*/
4146
name: Names
4247
}
4348
}

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
@@ -39,8 +44,15 @@ export interface Request extends RequestBase {
3944
}
4045
]
4146
path_parts: {
47+
/** The namespace, which is a top-level grouping of service accounts. */
4248
namespace: Namespace
49+
/** The name of the service, which must be unique within its namespace. */
4350
service: Service
51+
/**
52+
* A comma-separated list of token names to evict from the service account token caches.
53+
* Use a wildcard (`*`) to evict all tokens that belong to a service account.
54+
* It does not support other wildcard patterns.
55+
*/
4456
name: Names
4557
}
4658
}

0 commit comments

Comments
 (0)