Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.16][OpenAPI] Edit more security API summaries (#3036) #3050

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions specification/_doc_ids/table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ data-stream-path-param,https://www.elastic.co/guide/en/elasticsearch/reference/{
data-streams,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/data-streams.html
date-index-name-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/date-index-name-processor.html
dcg,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-rank-eval.html#_discounted_cumulative_gain_dcg
defining-roles,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/defining-roles.html
delete-async-sql-search-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-async-sql-search-api.html
delete-enrich-policy-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-enrich-policy-api.html
delete-license,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-license.html
Expand Down Expand Up @@ -621,6 +622,7 @@ uppercase-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{bra
urldecode-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/urldecode-processor.html
usage-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/usage-api.html
user-agent-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-agent-processor.html
user-profile,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/user-profile.html
voting-config-exclusions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/voting-config-exclusions.html
watcher-api-ack-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-ack-watch.html
watcher-api-activate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-activate-watch.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { RequestBase } from '@_types/Base'
import { Name } from '@_types/common'

/**
* Get user privileges.
* @rest_spec_name security.get_user_privileges
* @availability stack since=6.5.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
4 changes: 3 additions & 1 deletion specification/security/get_user_profile/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import { UserProfileId } from '@security/_types/UserProfile'
import { RequestBase } from '@_types/Base'

/**
* Retrieves a user's profile using the unique profile ID.
* Get a user profile.
*
* Get a user's profile using the unique profile ID.
* @rest_spec_name security.get_user_profile
* @availability stack since=8.2.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ import { Password, Username } from '@_types/common'
import { ApiKeyGrantType, GrantApiKey } from './types'

/**
* Creates an API key on behalf of another user.
* This API is similar to Create API keys, however it creates the API key for a user that is different than the user that runs the API.
* Grant an API key.
*
* Create an API key on behalf of another user.
* 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.
* The caller must have authentication credentials (either an access token, or a username and password) for the user on whose behalf the API key will be created.
* It is not possible to use this API to create an API key without that user’s credentials.
* The user, for whom the authentication credentials is provided, can optionally "run as" (impersonate) another user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ import { ApplicationPrivilegesCheck, IndexPrivilegesCheck } from './types'

/**
* Check user privileges.
* Determines whether the specified user has a specified list of privileges.
*
* Determine whether the specified user has a specified list of privileges.
* @rest_spec_name security.has_privileges
* @availability stack since=6.4.0 stability=stable
* @availability serverless stability=stable visibility=public
* @ext_doc_id security-privileges
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
4 changes: 4 additions & 0 deletions specification/security/has_privileges_user_profile/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ import { RequestBase } from '@_types/Base'
import { PrivilegesCheck } from './types'

/**
* Check user profile privileges.
*
* Determine whether the users associated with the specified user profile IDs have all the requested privileges.
* @rest_spec_name security.has_privileges_user_profile
* @availability stack since=8.3.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_user_profile
* @ext_doc_id user-profile
*/
export interface Request extends RequestBase {
body: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ import { Id, Name, Username } from '@_types/common'

/**
* Invalidate API keys.
* Invalidates one or more API keys.
*
* This API invalidates API keys created by the create API key or grant API key APIs.
* 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.
* The `manage_api_key` privilege allows deleting any API keys.
* The `manage_own_api_key` only allows deleting API keys that are owned by the user.
* In addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats:
* - Set the parameter `owner=true`.
* - Or, set both `username` and `realm_name` to match the user’s identity.
* - Or, if the request is issued by an API key, i.e. an API key invalidates itself, specify its ID in the `ids` field.
* - Or, if the request is issued by an API key, that is to say an API key invalidates itself, specify its ID in the `ids` field.
* @rest_spec_name security.invalidate_api_key
* @availability stack since=6.7.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ import { RequestBase } from '@_types/Base'
import { Name, Username } from '@_types/common'

/**
* Invalidate a token.
*
* The access tokens returned by the get token API have a finite period of time for which they are valid.
* After that time period, they can no longer be used.
* The time period is defined by the `xpack.security.authc.token.timeout` setting.
*
* The refresh tokens returned by the get token API are only valid for 24 hours. They can also be used exactly once.
* If you want to invalidate one or more access or refresh tokens immediately, use this invalidate token API.
* @rest_spec_name security.invalidate_token
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ import { Refresh } from '@_types/common'
import { Actions } from './types'

/**
* Create or update application privileges.
* @rest_spec_name security.put_privileges
* @availability stack since=6.4.0 stability=stable
* @availability serverless stability=stable visibility=private
*
* @ext_doc_id security-privileges
*/
export interface Request extends RequestBase {
query_parameters: {
Expand Down
6 changes: 5 additions & 1 deletion specification/security/put_role/SecurityPutRoleRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ import { RequestBase } from '@_types/Base'
import { Metadata, Name, Refresh } from '@_types/common'

/**
* The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
* Create or update roles.
*
* The role management APIs are generally the preferred way to manage roles in the native realm, rather than using file-based role management.
* The create or update roles API cannot update roles that are defined in roles files.
* File-based role management is not available in Elastic Serverless.
* @rest_spec_name security.put_role
* @availability stack stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_security
* @ext_doc_id defining-roles
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,18 @@ import { RequestBase } from '@_types/Base'
import { Metadata, Name, Refresh } from '@_types/common'

/**
* Create or update role mappings.
*
* Role mappings define which roles are assigned to each user.
* Each mapping has rules that identify users and a list of roles that are granted to those users.
* 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.
*
* This API does not create roles. Rather, it maps users to existing roles.
* Roles can be created by using the create or update roles API or roles files.
* @rest_spec_name security.put_role_mapping
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=private
* @ext_doc_id mapping-roles
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
4 changes: 4 additions & 0 deletions specification/security/put_user/SecurityPutUserRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ import { RequestBase } from '@_types/Base'
import { Metadata, Password, Refresh, Username } from '@_types/common'

/**
* Create or update users.
*
* A password is required for adding a new user but is optional when updating an existing user.
* To change a user’s password without updating any other fields, use the change password API.
* @rest_spec_name security.put_user
* @availability stack stability=stable
*/
Expand Down
5 changes: 3 additions & 2 deletions specification/security/query_api_keys/QueryApiKeysRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ import { Sort, SortResults } from '@_types/sort'
import { ApiKeyAggregationContainer, ApiKeyQueryContainer } from './types'

/**
* Query API keys.
* Retrieves a paginated list of API keys and their information. You can optionally filter the results with a query.
* Find API keys with a query.
*
* Get a paginated list of API keys and their information. You can optionally filter the results with a query.
* @rest_spec_name security.query_api_keys
* @availability stack since=7.15.0 stability=stable
* @availability serverless stability=stable visibility=public
Expand Down
4 changes: 3 additions & 1 deletion specification/security/query_role/QueryRolesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ import { Sort, SortResults } from '@_types/sort'
import { RoleQueryContainer } from './types'

/**
* Retrieves roles in a paginated manner. You can optionally filter the results with a query.
* Find roles with a query.
*
* Get roles in a paginated manner. You can optionally filter the results with a query.
* @rest_spec_name security.query_role
* @availability stack since=8.15.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ import { Sort, SortResults } from '@_types/sort'
import { UserQueryContainer } from './types'

/**
* Retrieves information for Users in a paginated manner. You can optionally filter the results with a query.
* Find users with a query.
*
* Get information for users in a paginated manner.
* You can optionally filter the results with a query.
* @rest_spec_name security.query_user
* @availability stack since=8.14.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
4 changes: 3 additions & 1 deletion specification/security/saml_authenticate/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ import { RequestBase } from '@_types/Base'
import { Ids } from '@_types/common'

/**
* Submits a SAML Response message to Elasticsearch for consumption.
* Authenticate SAML.
*
* Submits a SAML response message to Elasticsearch for consumption.
* @rest_spec_name security.saml_authenticate
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
2 changes: 2 additions & 0 deletions specification/security/saml_complete_logout/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { RequestBase } from '@_types/Base'
import { Ids } from '@_types/common'

/**
* Logout of SAML completely.
*
* Verifies the logout response sent from the SAML IdP.
* @rest_spec_name security.saml_complete_logout
* @availability stack since=7.14.0 stability=stable
Expand Down
2 changes: 2 additions & 0 deletions specification/security/saml_invalidate/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import { RequestBase } from '@_types/Base'

/**
* Invalidate SAML.
*
* Submits a SAML LogoutRequest message to Elasticsearch for consumption.
* @rest_spec_name security.saml_invalidate
* @availability stack since=7.5.0 stability=stable
Expand Down
2 changes: 2 additions & 0 deletions specification/security/saml_logout/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import { RequestBase } from '@_types/Base'

/**
* Logout of SAML.
*
* Submits a request to invalidate an access token and refresh token.
* @rest_spec_name security.saml_logout
* @availability stack since=7.5.0 stability=stable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
import { RequestBase } from '@_types/Base'

/**
* Creates a SAML authentication request (<AuthnRequest>) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.
* Prepare SAML authentication.
*
* Creates a SAML authentication request (`<AuthnRequest>`) as a URL string, based on the configuration of the respective SAML realm in Elasticsearch.
* @rest_spec_name security.saml_prepare_authentication
* @availability stack since=7.5.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import { RequestBase } from '@_types/Base'
import { Name } from '@_types/common'

/**
* Create SAML service provider metadata.
*
* Generate SAML metadata for a SAML 2.0 Service Provider.
* @rest_spec_name security.saml_service_provider_metadata
* @availability stack since=7.11.0 stability=stable
Expand Down
2 changes: 2 additions & 0 deletions specification/security/suggest_user_profiles/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { long } from '@_types/Numeric'
import { Hint } from './types'

/**
* Suggest a user profile.
*
* Get suggestions for user profiles that match specified search criteria.
* @rest_spec_name security.suggest_user_profiles
* @availability stack since=8.2.0 stability=stable
Expand Down
1 change: 1 addition & 0 deletions specification/security/update_api_key/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { Duration } from '@_types/Time'

/**
* Update an API key.
*
* Updates attributes of an existing API key.
* Users can only update API keys that they created or that were granted to them.
* Use this API to update API keys created by the create API Key or grant API Key APIs.
Expand Down
4 changes: 3 additions & 1 deletion specification/security/update_user_profile_data/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ import { Refresh, SequenceNumber } from '@_types/common'
import { long } from '@_types/Numeric'

/**
* Updates specific data for the user profile that's associated with the specified unique ID.
* Update user profile data.
*
* Update specific data for the user profile that is associated with a unique ID.
* @rest_spec_name security.update_user_profile_data
* @availability stack since=8.2.0 stability=stable
* @availability serverless stability=stable visibility=private
Expand Down