Commit graph

364 commits

Author SHA1 Message Date
David Turner
ccbb5badce
Fix support for infinite ?master_timeout (#107050)
Specifying `?master_timeout=-1` on an API which performs a cluster state
update means that the cluster state update task will never time out
while waiting in the pending tasks queue. However this parameter is also
re-used in a few places where a timeout of `-1` means something else,
typically to timeout immediately. This commit fixes those places so that
`?master_timeout=-1` consistently means to wait forever.
2024-04-10 18:32:38 +01:00
Albert Zaharovits
36bcb6b398
Query API Keys support for both aggs and aggregations keywords (#107054)
The Query API Key Information endpoint supports aggs since #104895.
But some lang clients actually use the `aggregations` keyword in requests,
as the preferred synonym to `aggs`.
This PR adds support for the `aggregations` request keyword as a synonym
for the existing `aggs` term.

Closes #106839
2024-04-03 18:33:14 +03:00
Parker Timmins
e59dd0b60e
Add total size in bytes to doc stats (#106840) 2024-03-29 09:40:37 -05:00
Albert Zaharovits
b4938e1645
Query API Key Information API support for the typed_keys request parameter (#106873)
The typed_keys request parameter is the canonical parameter,
that's also used in the regular index _search enpoint, in order to
return the types of aggregations in the response.
This is required by typed language clients of the _security/_query/api_key
endpoint that are using aggregations.

Closes #106817
2024-03-29 09:24:52 +02:00
Mary Gouseti
2122da31cd
[DSL] Introduce data stream global retention - Part 3 (#105682)
In this PR we introduce the API that will expose the global retention configuration and will allow users to take advantage of it.

These APIs are protected by the dedicated introduced privileges:

`manage_data_stream_global_retention` or higher, which allows all operations on the global retention configuration
`monitor_data_stream_retention` or higher, which allows the retrieval of the global retention configuration.

This PR is the final PR that makes the global retention available for our users.
2024-03-28 10:40:33 +02:00
Albert Zaharovits
3e0a0f6291
Get and Query API Key with profile uid (#106531)
Add new optional request option, `with_profile_uid`,
to the Get and Query API Key Information endpoints,
to return the API keys owner users' profile uid.

Closes #98939
2024-03-28 10:26:22 +02:00
David Kyle
2087b65523
[ML] Create inference_user and inference_admin roles (#106371)
Defines new inference_user and inference_admin roles with the 
related cluster privileges manage_inference and monitor_inference.
inference_user can list the models and preform inference, 
inference_admin can do the same plus create and delete models
2024-03-20 11:15:21 +00:00
Bogdan Pintea
1fbb085bd0
ESQL: Rename SHOW FUNCTIONS to META FUNCTIONS (#106362)
This renames the `show functions` command to `meta functions`.
It also removes its documentation and usage tracking.
2024-03-19 13:02:34 +01:00
Stef Nestor
157ce539aa
(DOC+) Version API page for ES API Base URL (#105845)
* (DOC+) Version API page for ES API Base URL

Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2024-03-18 13:02:54 -06:00
Tommaso Teofili
7bff3b3bec
Add modelId and modelText to KnnVectorQueryBuilder (#106068)
* Add modelId and modelText to KnnVectorQueryBuilder

Use QueryVectorBuilder within KnnVectorQueryBuilder to make it
possible to perform knn queries also when a query vector is not
immediately available. Supplying a text_embedding query_vector_builder
with model_text and model_id instead of the query_vector will result
in the generation of a query_vector by calling inference on the
specified model_id with the supplied model_text (during query
rewrite). This is consistent with the way query vectors are built
from model_id / model_text in KnnSearchBuilder (DFS phase).
2024-03-18 16:13:38 +01:00
Panagiotis Bailis
d471ccb5bb
Adding support for hex-encoded byte vectors on knn-search (#105393) 2024-03-13 09:24:51 +02:00
Jack Conradson
68b0acac8f
Add retrievers using the parser-only approach (#105470)
This enhancement adds a new abstraction to the _search API called "retriever." A 
retriever is something that returns top hits. This adds three initial retrievers called
"standard", "knn", and "rrf". The retrievers use a parser-only approach where they
are parsed and then translated into a SearchSourceBuilder to execute the actual
search.
---------

Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2024-03-12 10:11:55 -07:00
István Zoltán Szabó
2d4a49af53
[DOCS] Fixes get settings and update settings security API docs (#105686)
* [DOCS] Fixes get settings and update settings security API docs.

* [DOCS] Further edits.
2024-02-21 15:06:32 +01:00
Albert Zaharovits
065158e222
Expose owner realm_type in the returned API key information (#105629)
When querying or getting API key information, ES returns the key owner's
username and realm (i.e. the realm name that authenticated the username
that last updated the API key).
This PR adds the realm_type to the information on the key's owner.
2024-02-20 20:55:27 +02:00
Albert Zaharovits
6fec837e32
[Doc] API Key deletion settings (#105392)
This documents API Key delete settings.
2024-02-18 17:38:56 +02:00
Albert Zaharovits
b2e626e7df
Support Profile Activate with JWTs with client authn (#105439)
Adds support for JWTs with client authentication
to the activate user profile API.

Closes #105342
2024-02-18 17:37:28 +02:00
Albert Zaharovits
9ee76c6b26
Aggs support for Query API Key Information API (#104895)
Adds support for the aggs request body parameter to the Query API Key Information API.
This parameter works identically to the well known eponymous parameter of the _search endpoint,
but the set of allowed aggregation types as well as the field names allowed is restricted.
2024-02-12 14:22:34 +02:00
Johannes Fredén
334aa1bc8d
Add support for fetching user profileId in Query Users (#104923)
Add support for fetching user profileId in Query Users
2024-02-07 08:49:39 +01:00
Panagiotis Bailis
7ce8d76559
Making k and num_candidates optional for knn search (#101209) 2024-02-01 15:43:09 +02:00
Albert Zaharovits
111a69d15f
Support match for the Query API Key API (#104594)
This adds support for the `match` query type to the Query API key Information API.
Note that since string values associated to API Keys are mapped as `keywords`,
a `match` query with no analyzer parameter is effectively equivalent to a `term` query
for such fields (e.g. `name`, `username`, `realm_name`).

Relates: #101691
2024-01-30 19:09:08 +02:00
István Zoltán Szabó
79d6c3e70d
[DOCS] Adds get setting and update settings asciidoc files to security API index (#104916)
* [DOCS] Adds get setting and update settings asciidoc files to security API index.

* [DOCS] Fixes references in docs.
2024-01-30 15:39:34 +01:00
Johannes Fredén
666774a865
Add documentation for Query User API (#104255)
* Add documentation for Query User API

Co-authored-by: Nikolaj Volgushev <n1v0lg@users.noreply.github.com>
2024-01-30 11:27:24 +01:00
Navarone Feekery
bed59ba84f
[Enterprise Search] Add .connector-secrets system index (#104766)
- Introduce new internal system index called .connector-secrets
- Add GET and POST requests for connector secrets
- Add permission sets for read and write connector secrets
2024-01-26 11:20:32 +01:00
Navarone Feekery
05ea8c7a0f
Revert "[Enterprise Search] Add .connector-secrets system index and GET/POST requests (#103683)" (#104760)
This reverts commit b4345d9d91.
2024-01-25 14:33:33 +01:00
Navarone Feekery
b4345d9d91
[Enterprise Search] Add .connector-secrets system index and GET/POST requests (#103683)
- Introduce new internal system index called .connector-secrets
- Add GET and POST requests for connector secrets
- Create read_connector_secrets and write_connector_secrets role permissions
2024-01-25 13:56:07 +01:00
Jan Kuipers
5dec83f69e
Endpoint to test Grok pattern (#104394)
* Add extract match ranges functionality to Grok.

* TestGrokPatternAction and Request

* TestGrokPattern response

* Update docs/changelog/104394.yaml

* Polish validation error message

* Improve test_grok_pattern API

* Add explicit CharSet

* Add endpoint to operator constants

* Add TransportTestGrokPatternActionTests

* REST API spec

* One more TransportTestGrokPatternActionTest

* Fix API spec

* Refactor REST API spec

* Polish code

* Replace TransportTestGrokPatternActionTests by a YAML REST test

* Add ecs_compatibility

* Always return arrays in the API

* Documentation

* YAML test for ecs_compatibility

* Rename doc fileø

* serverless scope

* Fix docs (hopefully)

* Update docs/reference/rest-api/index.asciidoc

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

* Add "text structure APIs" header in docs TOC

* Move file

* Remove test grok from main index

* typo

* Nested APIs underneath text structure

---------

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2024-01-24 09:35:59 +01:00
Albert Zaharovits
aeb2b77c3c
Add support for the simple_query_string to the Query API Key API (#104132)
This adds support for the simple_query_string query type to the Query API key Information API.
In addition, this also adds support for querying all the API Key metadata fields simultaneously,
rather than requiring each to be specified, such as metadata.x, metadata.y, etc.

Relates: #101691
2024-01-19 14:51:12 +02:00
Albert Zaharovits
f4aaa20f28
Add support for the type parameter to the Query API Key API (#103695)
This adds support for the type parameter to the Query API key API.
The type for an API Key can currently be either rest or cross_cluster.

Relates: #101691
2024-01-11 10:53:50 +02:00
Chris Hegarty
f14d87be58
Add ES|QL async query api docs (#104054)
This commit adds detailed API docs for the ES|QL async apis, as well as moving the narrative to the ES|QL specific REST docs. Additionally, a few top-level lists are reflowed to reflect that there are now multiple APIs.
2024-01-09 09:17:02 +00:00
Johannes Fredén
f6a305afd7
Add expiration time to update api key api (#103453)
* Add expiration time to update api key api
2024-01-04 10:31:42 +01:00
Benjamin Trent
7fde357f3a
Improve docs around knn similarity search (#103158)
Adding equations to the docs around how to best calculate similarity & score. The similarity parameter for search was added in 8.8.

The max-inner-product mentions will be removed for all versions before 8.11 when backporting.

closes: https://github.com/elastic/elasticsearch/issues/102924
2023-12-11 14:56:16 -05:00
Jedr Blaszyk
73644bd650
[Connector API] Add docs for create connector API (#103177) 2023-12-11 13:03:06 +01:00
Andrei Stefan
6bba0efa78
ESQL: New telemetry for commands (#102937)
* Add enrich,mv_expand,show,row,from,drop,keep,rename commands to telemetry
2023-12-06 02:24:00 +02:00
Jan Kuipers
a67d5b8986
Inference telemetry (#102877)
* Empty infenrece usage wiring.

* Add fake data

* Fix NPE for secretSettings == null

* Real inference model stats

* New transport version

* Code polish

* Lint fixes

* Update docs/changelog/102877.yaml

* Update 102877.yaml

* Add inference to yamlRestTest

* Declare inference usage action as non-operator

* TransportInferenceUsageActionTests

* Lint fixes

* Replace map by ToXContentObject/Writeable

* Polish code

* AbstractWireSerializingTestCase<InferenceFeatureSetUsage.ModelStats>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-12-04 14:27:54 +01:00
Johannes Fredén
6aad7f4e9f
Add support for invalidation timestamp in QueryApiKey (#102590)
This is a follow up PR from
https://github.com/elastic/elasticsearch/pull/102472. This adds the
ability to use `invalidation` timestamp as a valid [query
value](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html#security-api-query-api-key-request-body)
in the QueryApiKey API.
2023-11-27 04:10:51 -05:00
Fabio Busatto
9f1875ee2c
[DOCS] Fix docs for user profiles (#102452)
* [DOCS] Fix docs for user profiles
2023-11-23 10:38:17 +01:00
Albert Zaharovits
bd10775b02
Grant API Key API with JWTs (#101904)
Introduces support for JWTs to the grant API Key API.
Callers can now pass-in a JWT in the request, like:
POST /_security/api_key/grant
{
  "grant_type": "access_token",
  "access_token" : "some.signed.JWT",
  "client_authentication": { // optional
    "scheme": "SharedSecret",
    "value": "ES-Client-Authentication header value after scheme"
  }
}
The JWT will be authenticated by a backing JWT realm and
a new API Key will be returned for the authenticated user.
2023-11-21 14:11:08 +02:00
Jan Kuipers
2e95b992b2
Add stats by model to the machine learning usage stats. (#101915)
* Add inference counts by NLP model to the machine learning usage stats.

* Update docs/changelog/101915.yaml

* Add inference_counts_by_model to yamlRestTest.

* Strip leading dot from internal model IDs.

* Add last access and task type to the stats by model.

* Change stats_by_model for map to list

* Simplify code.

* Fix style
2023-11-13 08:50:15 +01:00
Abdon Pijpelink
70128f5b74
[DOCS] Mark 'ignore_throttled' deprecated in all docs (#101838) 2023-11-07 13:03:49 +01:00
Daniel Mitterdorfer
a579504e11
Remove auto_configure privilege for profiling (#101026)
With this commit we remove the `auto_configure` privilege for the Fleet
service account that targets profiling-related indices. This privilege
was needed to automatically create indices and data streams in the past
but as this managed by the Elasticsearch plugin, there is no need to
grant this privilege to Fleet-managed components.
2023-10-23 13:14:14 +02:00
Abdon Pijpelink
8ac4ba751e
Restructure ES|QL docs (#100806)
* Break out 'Limitations' into separate page

* Add REST API docs

* Restructure commands, functions, and operators refs

* Add placeholder for getting started guide

* Group 'Syntax', 'Metafields', and 'MV fields' under 'Language'

* Add placeholder for Kibana page

* Add link from landing page

* Apply uniform formatting to ACOS, CASE, and DATE_PARSE function refs

* Reword default LIMIT

* Add support for COUNT(*)

* Move 'Commands' and 'Functions and operators' to individual pages

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-10-17 17:36:14 +02:00
Keith Massey
92ec9d6605
Add executed pipelines to bulk api response (#100031)
This change allows users to pass a new list_executed_pipelines parameter
to the bulk API, which results in an executed_pipelines list being returned.
2023-10-17 09:39:09 -05:00
Daniel Mitterdorfer
dfaec0dbf0
Enable Universal Profiling as Enterprise feature (#100333)
With this commit we ensure that Universal Profiling can only be used
with an Enterprise license.
2023-10-09 07:58:04 +02:00
István Zoltán Szabó
c2072fc4d3
[DOCS] Adds reference documentation for inference API (#99658)
* [DOCS] Creates documentation structure.

* [DOCS] Adds PUT inference API docs and part of GET inference API docs.

* [DOCS] Fixes complaining CI.

* [DOCS] Adds GET and DELETE API docs for inference API.

* [DOCS] Adds POST inference API docs.

* Apply suggestions from code review
2023-09-29 10:12:07 +02:00
Nhat Nguyen
ae17505557
Introduce authorization for enrich in ESQL (#99646)
This change introduces a new privilege monitor_enrich. Users are 
required to have this privilege in order to use the enrich functionality
in ESQL. Additionally, it eliminates the need to use the enrich_origin
when executing enrich lookups. The enrich_origin will only be used when
resolving enrich policies to prevent warnings when accessing system
indices directly.

Closes #98482
2023-09-27 12:45:39 -07:00
James Rodewig
daddca75d1
[DOCS] Fix Usage API snippet test (#99497) 2023-09-12 15:53:55 -04:00
James Rodewig
255c9a7f95
[DOCS] Move x-pack docs to docs/reference dir (#99209)
**Problem:**
For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. 

**Solution:**
- Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory
- Update doc snippet tests to use security

Rel: https://github.com/elastic/platform-docs-team/issues/208
2023-09-12 14:53:41 -04:00
ChrisHegarty
2e4440ff1c Remove space in dissect feature list 2023-08-14 14:54:37 +01:00
ChrisHegarty
7cb310b9d0 Merge upstream 2023-08-14 09:55:02 +01:00
Yang Wang
d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00