mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Deprecate Behavioral Analytics CRUD apis (#122960)
* Deprecate Behavioral Analytics CRUD APIs * Add allowed warning for REST Compatibility tests * Update docs/changelog/122960.yaml * Update changelog * Update docs to add deprecation flags and fix failing tests * Update changelog * Update changelog again * Update docs formatting Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> * Skip asciidoc test --------- Co-authored-by: Efe Gürkan YALAMAN <efeyalaman@gmail.com> Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com> Co-authored-by: Efe Gürkan YALAMAN <efeguerkan.yalaman@elastic.co>
This commit is contained in:
parent
e8438490ea
commit
ae6474db63
59 changed files with 441 additions and 140 deletions
10
docs/changelog/122960.yaml
Normal file
10
docs/changelog/122960.yaml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
pr: 122960
|
||||||
|
summary: Deprecate Behavioral Analytics CRUD apis
|
||||||
|
area: Search
|
||||||
|
type: deprecation
|
||||||
|
issues: [ ]
|
||||||
|
deprecation:
|
||||||
|
title: Deprecate Behavioral Analytics CRUD apis
|
||||||
|
area: Search
|
||||||
|
details: Behavioral Analytics has been deprecated as of 9.0.0 and will be removed in a future release. The APIs will still work for now, but will emit warning headers that the API has been deprecated.
|
||||||
|
impact: Behavioral Analytics has been deprecated as of 9.0.0 and will be removed in a future release.
|
|
@ -2,6 +2,7 @@
|
||||||
[[delete-analytics-collection]]
|
[[delete-analytics-collection]]
|
||||||
=== Delete Analytics Collection
|
=== Delete Analytics Collection
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
beta::[]
|
beta::[]
|
||||||
|
|
||||||
++++
|
++++
|
||||||
|
@ -14,15 +15,6 @@ beta::[]
|
||||||
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
||||||
--
|
--
|
||||||
|
|
||||||
////
|
|
||||||
[source,console]
|
|
||||||
----
|
|
||||||
PUT _application/analytics/my_analytics_collection
|
|
||||||
----
|
|
||||||
// TESTSETUP
|
|
||||||
|
|
||||||
////
|
|
||||||
|
|
||||||
Removes a <<behavioral-analytics-overview,Behavioral Analytics>> Collection and its associated data stream.
|
Removes a <<behavioral-analytics-overview,Behavioral Analytics>> Collection and its associated data stream.
|
||||||
|
|
||||||
[[delete-analytics-collection-request]]
|
[[delete-analytics-collection-request]]
|
||||||
|
@ -59,3 +51,4 @@ The following example deletes the Analytics Collection named `my_analytics_colle
|
||||||
----
|
----
|
||||||
DELETE _application/analytics/my_analytics_collection/
|
DELETE _application/analytics/my_analytics_collection/
|
||||||
----
|
----
|
||||||
|
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[[behavioral-analytics-apis]]
|
[[behavioral-analytics-apis]]
|
||||||
== Behavioral Analytics APIs
|
== Behavioral Analytics APIs
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
beta::[]
|
beta::[]
|
||||||
|
|
||||||
++++
|
++++
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
[[list-analytics-collection]]
|
[[list-analytics-collection]]
|
||||||
=== List Analytics Collections
|
=== List Analytics Collections
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
beta::[]
|
beta::[]
|
||||||
|
|
||||||
++++
|
++++
|
||||||
|
@ -14,22 +15,6 @@ beta::[]
|
||||||
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
||||||
--
|
--
|
||||||
|
|
||||||
////
|
|
||||||
[source,console]
|
|
||||||
----
|
|
||||||
PUT _application/analytics/my_analytics_collection
|
|
||||||
PUT _application/analytics/my_analytics_collection2
|
|
||||||
----
|
|
||||||
// TESTSETUP
|
|
||||||
|
|
||||||
[source,console]
|
|
||||||
----
|
|
||||||
DELETE _application/analytics/my_analytics_collection
|
|
||||||
DELETE _application/analytics/my_analytics_collection2
|
|
||||||
----
|
|
||||||
// TEARDOWN
|
|
||||||
////
|
|
||||||
|
|
||||||
Returns information about <<behavioral-analytics-overview,Behavioral Analytics>> Collections.
|
Returns information about <<behavioral-analytics-overview,Behavioral Analytics>> Collections.
|
||||||
|
|
||||||
[[list-analytics-collection-request]]
|
[[list-analytics-collection-request]]
|
||||||
|
@ -46,8 +31,9 @@ Requires the `manage_behavioral_analytics` cluster privilege.
|
||||||
==== {api-path-parms-title}
|
==== {api-path-parms-title}
|
||||||
|
|
||||||
`<criteria>`::
|
`<criteria>`::
|
||||||
(optional, string)
|
(optional, string) Criteria is used to find a matching analytics collection.
|
||||||
Criteria is used to find a matching analytics collection. This could be the name of the collection or a pattern to match multiple. If not specified, will return all analytics collections.
|
This could be the name of the collection or a pattern to match multiple.
|
||||||
|
If not specified, will return all analytics collections.
|
||||||
|
|
||||||
[[list-analytics-collection-response-codes]]
|
[[list-analytics-collection-response-codes]]
|
||||||
==== {api-response-codes-title}
|
==== {api-response-codes-title}
|
||||||
|
@ -66,6 +52,7 @@ The following example lists all configured Analytics Collections:
|
||||||
----
|
----
|
||||||
GET _application/analytics/
|
GET _application/analytics/
|
||||||
----
|
----
|
||||||
|
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
|
||||||
|
|
||||||
A sample response:
|
A sample response:
|
||||||
|
|
||||||
|
@ -91,6 +78,7 @@ The following example returns the Analytics Collection that matches `my_analytic
|
||||||
----
|
----
|
||||||
GET _application/analytics/my_analytics_collection
|
GET _application/analytics/my_analytics_collection
|
||||||
----
|
----
|
||||||
|
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
|
||||||
|
|
||||||
A sample response:
|
A sample response:
|
||||||
|
|
||||||
|
@ -111,6 +99,7 @@ The following example returns all Analytics Collections prefixed with `my`:
|
||||||
----
|
----
|
||||||
GET _application/analytics/my*
|
GET _application/analytics/my*
|
||||||
----
|
----
|
||||||
|
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
|
||||||
|
|
||||||
A sample response:
|
A sample response:
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
[[post-analytics-collection-event]]
|
[[post-analytics-collection-event]]
|
||||||
=== Post Event to an Analytics Collection
|
=== Post Event to an Analytics Collection
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
beta::[]
|
beta::[]
|
||||||
|
|
||||||
++++
|
++++
|
||||||
|
@ -14,20 +15,6 @@ beta::[]
|
||||||
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
||||||
--
|
--
|
||||||
|
|
||||||
////
|
|
||||||
[source,console]
|
|
||||||
----
|
|
||||||
PUT _application/analytics/my_analytics_collection
|
|
||||||
----
|
|
||||||
// TESTSETUP
|
|
||||||
|
|
||||||
[source,console]
|
|
||||||
----
|
|
||||||
DELETE _application/analytics/my_analytics_collection
|
|
||||||
----
|
|
||||||
// TEARDOWN
|
|
||||||
////
|
|
||||||
|
|
||||||
Post an event to a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.
|
Post an event to a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.
|
||||||
|
|
||||||
[[post-analytics-collection-event-request]]
|
[[post-analytics-collection-event-request]]
|
||||||
|
@ -105,3 +92,4 @@ POST _application/analytics/my_analytics_collection/event/search_click
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
[[put-analytics-collection]]
|
[[put-analytics-collection]]
|
||||||
=== Put Analytics Collection
|
=== Put Analytics Collection
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
beta::[]
|
beta::[]
|
||||||
|
|
||||||
++++
|
++++
|
||||||
|
@ -14,14 +15,6 @@ beta::[]
|
||||||
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
For the most up-to-date API details, refer to {api-es}/group/endpoint-analytics[Behavioral analytics APIs].
|
||||||
--
|
--
|
||||||
|
|
||||||
////
|
|
||||||
[source,console]
|
|
||||||
----
|
|
||||||
DELETE _application/analytics/my_analytics_collection
|
|
||||||
----
|
|
||||||
// TEARDOWN
|
|
||||||
////
|
|
||||||
|
|
||||||
Creates a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.
|
Creates a <<behavioral-analytics-overview,Behavioral Analytics>> Collection.
|
||||||
|
|
||||||
[[put-analytics-collection-request]]
|
[[put-analytics-collection-request]]
|
||||||
|
@ -55,3 +48,4 @@ The following example creates a new Analytics Collection called `my_analytics_co
|
||||||
----
|
----
|
||||||
PUT _application/analytics/my_analytics_collection
|
PUT _application/analytics/my_analytics_collection
|
||||||
----
|
----
|
||||||
|
// TEST[skip:Behavioral Analytics APIs emit deprecation warnings and will not be updated]
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
[[behavioral-analytics-api]]
|
[[behavioral-analytics-api]]
|
||||||
=== Behavioral Analytics API overview
|
=== Behavioral Analytics API overview
|
||||||
|
|
||||||
++++
|
++++
|
||||||
<titleabbrev>API overview</titleabbrev>
|
<titleabbrev>API overview</titleabbrev>
|
||||||
++++
|
++++
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
|
|
||||||
This page outlines all the APIs available for behavioral analytics and links to their documentation.
|
This page outlines all the APIs available for behavioral analytics and links to their documentation.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
<titleabbrev>Set up CORs</titleabbrev>
|
<titleabbrev>Set up CORs</titleabbrev>
|
||||||
++++
|
++++
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
|
|
||||||
Behavioral Analytics sends events directly to the {es} API.
|
Behavioral Analytics sends events directly to the {es} API.
|
||||||
This means that the browser makes requests to the {es} API directly.
|
This means that the browser makes requests to the {es} API directly.
|
||||||
{es} supports https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS[Cross-Origin Resource Sharing (CORS)^], but this feature is disabled by default.
|
{es} supports https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS[Cross-Origin Resource Sharing (CORS)^], but this feature is disabled by default.
|
||||||
|
@ -43,4 +45,4 @@ On Elastic Cloud, you can do this by {cloud}/ec-add-user-settings.html#ec-add-us
|
||||||
==== Proxy the request through a server that supports CORS
|
==== Proxy the request through a server that supports CORS
|
||||||
|
|
||||||
If you are unable to enable CORS on {es}, you can proxy the request through a server that supports CORS.
|
If you are unable to enable CORS on {es}, you can proxy the request through a server that supports CORS.
|
||||||
This is more complicated, but is a viable option.
|
This is more complicated, but is a viable option.
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
<titleabbrev>Events reference</titleabbrev>
|
<titleabbrev>Events reference</titleabbrev>
|
||||||
++++
|
++++
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
|
|
||||||
Behavioral Analytics logs events using the {ecs-ref}/ecs-reference.html[Elastic Common Schema^], including a custom field set for analytics events.
|
Behavioral Analytics logs events using the {ecs-ref}/ecs-reference.html[Elastic Common Schema^], including a custom field set for analytics events.
|
||||||
Refer to <<behavioral-analytics-event-reference-examples,examples>> of the full data objects that are logged.
|
Refer to <<behavioral-analytics-event-reference-examples,examples>> of the full data objects that are logged.
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
<titleabbrev>View events</titleabbrev>
|
<titleabbrev>View events</titleabbrev>
|
||||||
++++
|
++++
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
====
|
====
|
||||||
Refer to <<behavioral-analytics-event-reference>> for a complete list of the fields logged by events.
|
Refer to <<behavioral-analytics-event-reference>> for a complete list of the fields logged by events.
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
[[behavioral-analytics-overview]]
|
[[behavioral-analytics-overview]]
|
||||||
== Search analytics
|
== Search analytics
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
|
|
||||||
|
|
||||||
Behavioral Analytics is an analytics event collection platform.
|
Behavioral Analytics is an analytics event collection platform.
|
||||||
Use these tools to analyze your users' searching and clicking behavior.
|
Use these tools to analyze your users' searching and clicking behavior.
|
||||||
Leverage this information to improve the relevance of your search results and identify gaps in your content.
|
Leverage this information to improve the relevance of your search results and identify gaps in your content.
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
<titleabbrev>Get started</titleabbrev>
|
<titleabbrev>Get started</titleabbrev>
|
||||||
++++
|
++++
|
||||||
|
|
||||||
|
deprecated:[9.0.0]
|
||||||
|
|
||||||
You can manage your analytics in the {kib} UI.
|
You can manage your analytics in the {kib} UI.
|
||||||
Go to *Search > Behavioral Analytics* to get started.
|
Go to *Search > Behavioral Analytics* to get started.
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
},
|
},
|
||||||
"stability": "experimental",
|
"stability": "experimental",
|
||||||
"visibility": "public",
|
"visibility": "public",
|
||||||
|
"deprecated": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
|
||||||
|
},
|
||||||
"headers": {
|
"headers": {
|
||||||
"accept": [
|
"accept": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
},
|
},
|
||||||
"stability": "experimental",
|
"stability": "experimental",
|
||||||
"visibility": "public",
|
"visibility": "public",
|
||||||
|
"deprecated": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
|
||||||
|
},
|
||||||
"headers": {
|
"headers": {
|
||||||
"accept": [
|
"accept": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
@ -24,10 +28,10 @@
|
||||||
"methods": [
|
"methods": [
|
||||||
"GET"
|
"GET"
|
||||||
],
|
],
|
||||||
"parts":{
|
"parts": {
|
||||||
"name":{
|
"name": {
|
||||||
"type":"list",
|
"type": "list",
|
||||||
"description":"A comma-separated list of analytics collections to limit the returned information"
|
"description": "A comma-separated list of analytics collections to limit the returned information"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
},
|
},
|
||||||
"stability": "experimental",
|
"stability": "experimental",
|
||||||
"visibility": "public",
|
"visibility": "public",
|
||||||
|
"deprecated": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
|
||||||
|
},
|
||||||
"headers": {
|
"headers": {
|
||||||
"accept": [
|
"accept": [
|
||||||
"application/json"
|
"application/json"
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
"description": "Creates a behavioral analytics collection."
|
"description": "Creates a behavioral analytics collection."
|
||||||
},
|
},
|
||||||
"stability": "experimental",
|
"stability": "experimental",
|
||||||
|
"deprecated": {
|
||||||
|
"version": "9.0.0",
|
||||||
|
"description": "Behavioral Analytics has been deprecated and will be removed in a future release."
|
||||||
|
},
|
||||||
"visibility": "public",
|
"visibility": "public",
|
||||||
"headers": {
|
"headers": {
|
||||||
"accept": [
|
"accept": [
|
||||||
|
|
|
@ -37,3 +37,11 @@ testClusters.configureEach {
|
||||||
artifacts {
|
artifacts {
|
||||||
restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
|
restXpackTests(new File(projectDir, "src/yamlRestTest/resources/rest-api-spec/test"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tasks.named("yamlRestCompatTestTransform").configure(
|
||||||
|
{ task ->
|
||||||
|
// Behavioral Analytics is deprecated with 9.0.0.
|
||||||
|
task.addAllowedWarning("Behavioral Analytics is deprecated and will be removed in a future release.")
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
|
@ -27,6 +27,8 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"xpack usage includes Enterprise Search":
|
"xpack usage includes Enterprise Search":
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
xpack.usage: { }
|
xpack.usage: { }
|
||||||
|
@ -79,6 +81,8 @@ teardown:
|
||||||
query: "{{query_string}}"
|
query: "{{query_string}}"
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: test-analytics-collection
|
name: test-analytics-collection
|
||||||
|
|
||||||
|
@ -113,6 +117,8 @@ teardown:
|
||||||
}
|
}
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: test-analytics-collection
|
name: test-analytics-collection
|
||||||
|
|
||||||
|
|
|
@ -1,39 +1,55 @@
|
||||||
setup:
|
setup:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: my-test-analytics-collection2
|
name: my-test-analytics-collection2
|
||||||
|
|
||||||
---
|
---
|
||||||
teardown:
|
teardown:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: my-test-analytics-collection2
|
name: my-test-analytics-collection2
|
||||||
|
|
||||||
---
|
---
|
||||||
"Get Analytics Collection for a particular collection":
|
"Get Analytics Collection for a particular collection":
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.get_behavioral_analytics:
|
search_application.get_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
- match: {
|
- match: {
|
||||||
"my-test-analytics-collection": {
|
"my-test-analytics-collection": {
|
||||||
event_data_stream: {
|
event_data_stream: {
|
||||||
name: "behavioral_analytics-events-my-test-analytics-collection"
|
name: "behavioral_analytics-events-my-test-analytics-collection"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
---
|
---
|
||||||
"Get Analytics Collection list":
|
"Get Analytics Collection list":
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.get_behavioral_analytics:
|
search_application.get_behavioral_analytics:
|
||||||
name:
|
name:
|
||||||
|
|
||||||
|
@ -56,6 +72,8 @@ teardown:
|
||||||
"Get Analytics Collection - Resource does not exist":
|
"Get Analytics Collection - Resource does not exist":
|
||||||
- do:
|
- do:
|
||||||
catch: "missing"
|
catch: "missing"
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.get_behavioral_analytics:
|
search_application.get_behavioral_analytics:
|
||||||
name: test-nonexistent-analytics-collection
|
name: test-nonexistent-analytics-collection
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
teardown:
|
teardown:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: test-analytics-collection
|
name: test-analytics-collection
|
||||||
|
|
||||||
---
|
---
|
||||||
"Create Analytics Collection":
|
"Create Analytics Collection":
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: test-analytics-collection
|
name: test-analytics-collection
|
||||||
|
|
||||||
|
@ -14,7 +22,11 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Create Analytics Collection - analytics collection already exists":
|
"Create Analytics Collection - analytics collection already exists":
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: test-analytics-collection
|
name: test-analytics-collection
|
||||||
|
|
||||||
|
@ -22,6 +34,8 @@ teardown:
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: bad_request
|
catch: bad_request
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: test-analytics-collection
|
name: test-analytics-collection
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,30 @@
|
||||||
setup:
|
setup:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
---
|
---
|
||||||
teardown:
|
teardown:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
ignore: 404
|
ignore: 404
|
||||||
|
|
||||||
---
|
---
|
||||||
"Delete Analytics Collection":
|
"Delete Analytics Collection":
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
|
@ -20,13 +32,19 @@ teardown:
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "missing"
|
catch: "missing"
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.get_behavioral_analytics:
|
search_application.get_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
---
|
---
|
||||||
"Delete Analytics Collection - Analytics Collection does not exist":
|
"Delete Analytics Collection - Analytics Collection does not exist":
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
catch: "missing"
|
catch: "missing"
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: test-nonexistent-analytics-collection
|
name: test-nonexistent-analytics-collection
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,19 @@
|
||||||
setup:
|
setup:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
---
|
---
|
||||||
teardown:
|
teardown:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
|
@ -13,30 +21,34 @@ teardown:
|
||||||
# Page view event tests #########################################
|
# Page view event tests #########################################
|
||||||
---
|
---
|
||||||
"Post page_view analytics event":
|
"Post page_view analytics event":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
body:
|
body:
|
||||||
session:
|
session:
|
||||||
id: "123"
|
id: "123"
|
||||||
user:
|
user:
|
||||||
id: "456"
|
id: "456"
|
||||||
page:
|
page:
|
||||||
url: "https://www.elastic.co"
|
url: "https://www.elastic.co"
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - Missing page.url":
|
"Post page_view analytics event - Missing page.url":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -49,11 +61,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - With document":
|
"Post page_view analytics event - With document":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -70,11 +84,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - With page title":
|
"Post page_view analytics event - With page title":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -89,11 +105,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - With referrer":
|
"Post page_view analytics event - With referrer":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -108,14 +126,16 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - debug and session information":
|
"Post page_view analytics event - debug and session information":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
X-Forwarded-For: 192.23.12.12
|
X-Forwarded-For: 192.23.12.12
|
||||||
User-Agent: Mozilla/5.0
|
User-Agent: Mozilla/5.0
|
||||||
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
|
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -152,11 +172,13 @@ teardown:
|
||||||
# Search event tests ############################################
|
# Search event tests ############################################
|
||||||
---
|
---
|
||||||
"Post search analytics event":
|
"Post search analytics event":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -170,12 +192,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event – Missing search query":
|
"Post search analytics event – Missing search query":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -188,11 +212,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - With sort order":
|
"Post search analytics event - With sort order":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -208,11 +234,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - With sort name and direction":
|
"Post search analytics event - With sort name and direction":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -229,11 +257,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - With pagination":
|
"Post search analytics event - With pagination":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -250,11 +280,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - With search application":
|
"Post search analytics event - With search application":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -269,10 +301,12 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - With search results":
|
"Post search analytics event - With search results":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
|
@ -287,7 +321,7 @@ teardown:
|
||||||
results:
|
results:
|
||||||
total_results: 150
|
total_results: 150
|
||||||
items:
|
items:
|
||||||
- document :
|
- document:
|
||||||
id: doc-1
|
id: doc-1
|
||||||
- document:
|
- document:
|
||||||
id: doc-2
|
id: doc-2
|
||||||
|
@ -302,11 +336,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - With filters":
|
"Post search analytics event - With filters":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -324,14 +360,16 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search analytics event - debug and session information":
|
"Post search analytics event - debug and session information":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
X-Forwarded-For: 192.23.12.12
|
X-Forwarded-For: 192.23.12.12
|
||||||
User-Agent: Mozilla/5.0
|
User-Agent: Mozilla/5.0
|
||||||
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
|
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search"
|
event_type: "search"
|
||||||
|
@ -393,11 +431,13 @@ teardown:
|
||||||
# Search click event tests #######################################
|
# Search click event tests #######################################
|
||||||
---
|
---
|
||||||
"Post search_click analytics event":
|
"Post search_click analytics event":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search_click"
|
event_type: "search_click"
|
||||||
|
@ -415,14 +455,16 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search_click analytics event - debug and session information":
|
"Post search_click analytics event - debug and session information":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
X-Forwarded-For: 192.23.12.12
|
X-Forwarded-For: 192.23.12.12
|
||||||
User-Agent: Mozilla/5.0
|
User-Agent: Mozilla/5.0
|
||||||
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
|
Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search_click"
|
event_type: "search_click"
|
||||||
|
@ -455,11 +497,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search_click analytics event - Page Only":
|
"Post search_click analytics event - Page Only":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search_click"
|
event_type: "search_click"
|
||||||
|
@ -475,11 +519,13 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search_click analytics event - Document Only":
|
"Post search_click analytics event - Document Only":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search_click"
|
event_type: "search_click"
|
||||||
|
@ -496,12 +542,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search_click analytics event – Missing search query":
|
"Post search_click analytics event – Missing search query":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search_click"
|
event_type: "search_click"
|
||||||
|
@ -516,12 +564,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post search_click analytics event – Missing page url and document":
|
"Post search_click analytics event – Missing page url and document":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "search_click"
|
event_type: "search_click"
|
||||||
|
@ -537,12 +587,14 @@ teardown:
|
||||||
# Generic errors tests ###############################################
|
# Generic errors tests ###############################################
|
||||||
---
|
---
|
||||||
"Post analytics event - Analytics collection does not exist":
|
"Post analytics event - Analytics collection does not exist":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "missing"
|
catch: "missing"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: test-nonexistent-analytics-collection
|
collection_name: test-nonexistent-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -556,12 +608,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post analytics event - Event type does not exist":
|
"Post analytics event - Event type does not exist":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "nonexistent-event-type"
|
event_type: "nonexistent-event-type"
|
||||||
|
@ -577,12 +631,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - Missing session.id":
|
"Post page_view analytics event - Missing session.id":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -595,12 +651,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post page_view analytics event - Missing user.id":
|
"Post page_view analytics event - Missing user.id":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "page_view"
|
event_type: "page_view"
|
||||||
|
@ -613,12 +671,14 @@ teardown:
|
||||||
|
|
||||||
---
|
---
|
||||||
"Post analytics event - Unknown event field":
|
"Post analytics event - Unknown event field":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ allowed_warnings, headers ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.post_behavioral_analytics_event:
|
search_application.post_behavioral_analytics_event:
|
||||||
collection_name: my-test-analytics-collection
|
collection_name: my-test-analytics-collection
|
||||||
event_type: "nonexistent-event-type"
|
event_type: "nonexistent-event-type"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
setup:
|
setup:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
indices.create:
|
indices.create:
|
||||||
index: test-search-index1
|
index: test-search-index1
|
||||||
|
@ -27,6 +29,8 @@ setup:
|
||||||
number_of_replicas: 0
|
number_of_replicas: 0
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put:
|
search_application.put:
|
||||||
name: test-search-application
|
name: test-search-application
|
||||||
body:
|
body:
|
||||||
|
@ -51,6 +55,8 @@ setup:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put:
|
search_application.put:
|
||||||
name: test-search-application-1
|
name: test-search-application-1
|
||||||
body:
|
body:
|
||||||
|
@ -110,10 +116,14 @@ setup:
|
||||||
refresh: true
|
refresh: true
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.put_behavioral_analytics:
|
search_application.put_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
---
|
---
|
||||||
teardown:
|
teardown:
|
||||||
|
- requires:
|
||||||
|
test_runner_features: [ allowed_warnings ]
|
||||||
- do:
|
- do:
|
||||||
search_application.delete:
|
search_application.delete:
|
||||||
name: test-search-application
|
name: test-search-application
|
||||||
|
@ -145,18 +155,20 @@ teardown:
|
||||||
ignore: 404
|
ignore: 404
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.delete_behavioral_analytics:
|
search_application.delete_behavioral_analytics:
|
||||||
name: my-test-analytics-collection
|
name: my-test-analytics-collection
|
||||||
|
|
||||||
---
|
---
|
||||||
"Query Search Application with API key":
|
"Query Search Application with API key":
|
||||||
- skip:
|
- requires:
|
||||||
features: headers
|
test_runner_features: [ headers, allowed_warnings ]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
security.create_api_key:
|
security.create_api_key:
|
||||||
body: >
|
body: >
|
||||||
{
|
{
|
||||||
"name": "search-application-api-key",
|
"name": "search-application-api-key",
|
||||||
"role_descriptors": {
|
"role_descriptors": {
|
||||||
|
@ -176,10 +188,10 @@ teardown:
|
||||||
}
|
}
|
||||||
|
|
||||||
- match: { name: "search-application-api-key" }
|
- match: { name: "search-application-api-key" }
|
||||||
- set: { encoded: api_key_encoded }
|
- set: { encoded: api_key_encoded }
|
||||||
- set: { id: api_key_id }
|
- set: { id: api_key_id }
|
||||||
|
|
||||||
# Query Search Application with default parameters:
|
# Query Search Application with default parameters:
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded}
|
Authorization: ApiKey ${api_key_encoded}
|
||||||
|
@ -191,7 +203,7 @@ teardown:
|
||||||
- match: { hits.hits.1._id: "doc2" }
|
- match: { hits.hits.1._id: "doc2" }
|
||||||
|
|
||||||
|
|
||||||
# Query Search Application overriding part of the parameters:
|
# Query Search Application overriding part of the parameters:
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded}
|
Authorization: ApiKey ${api_key_encoded}
|
||||||
|
@ -205,7 +217,7 @@ teardown:
|
||||||
- match: { hits.total.value: 1 }
|
- match: { hits.total.value: 1 }
|
||||||
- match: { hits.hits.0._id: "doc1" }
|
- match: { hits.hits.0._id: "doc1" }
|
||||||
|
|
||||||
# Query Search Application overriding all parameters:
|
# Query Search Application overriding all parameters:
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded}
|
Authorization: ApiKey ${api_key_encoded}
|
||||||
|
@ -220,7 +232,7 @@ teardown:
|
||||||
- match: { hits.total.value: 1 }
|
- match: { hits.total.value: 1 }
|
||||||
- match: { hits.hits.0._id: "doc2" }
|
- match: { hits.hits.0._id: "doc2" }
|
||||||
|
|
||||||
# Query Search Application with list of parameters:
|
# Query Search Application with list of parameters:
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded}
|
Authorization: ApiKey ${api_key_encoded}
|
||||||
|
@ -241,7 +253,7 @@ teardown:
|
||||||
- match: { hits.total.value: 1 }
|
- match: { hits.total.value: 1 }
|
||||||
- match: { hits.hits.0._id: "doc2" }
|
- match: { hits.hits.0._id: "doc2" }
|
||||||
|
|
||||||
# Query Search Application with invalid parameter validation:
|
# Query Search Application with invalid parameter validation:
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers:
|
headers:
|
||||||
|
@ -253,7 +265,7 @@ teardown:
|
||||||
field_name: field3
|
field_name: field3
|
||||||
field_value: 35
|
field_value: 35
|
||||||
|
|
||||||
# Query Search Application without required parameter:
|
# Query Search Application without required parameter:
|
||||||
- do:
|
- do:
|
||||||
catch: "bad_request"
|
catch: "bad_request"
|
||||||
headers:
|
headers:
|
||||||
|
@ -264,7 +276,7 @@ teardown:
|
||||||
params:
|
params:
|
||||||
field_value: test
|
field_value: test
|
||||||
|
|
||||||
# Query Search Application - not found:
|
# Query Search Application - not found:
|
||||||
- do:
|
- do:
|
||||||
catch: forbidden
|
catch: forbidden
|
||||||
headers:
|
headers:
|
||||||
|
@ -276,11 +288,13 @@ teardown:
|
||||||
field_name: field3
|
field_name: field3
|
||||||
field_value: value3
|
field_value: value3
|
||||||
|
|
||||||
# Get Analytics Collection should be rejected due to a workflow restriction
|
# Get Analytics Collection should be rejected due to a workflow restriction
|
||||||
- do:
|
- do:
|
||||||
catch: forbidden
|
catch: forbidden
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded}
|
Authorization: ApiKey ${api_key_encoded}
|
||||||
|
allowed_warnings:
|
||||||
|
- "Behavioral Analytics is deprecated and will be removed in a future release."
|
||||||
search_application.get_behavioral_analytics:
|
search_application.get_behavioral_analytics:
|
||||||
name:
|
name:
|
||||||
- match: { status: 403 }
|
- match: { status: 403 }
|
||||||
|
@ -288,7 +302,7 @@ teardown:
|
||||||
- match: { error.root_cause.0.type: role_restriction_exception }
|
- match: { error.root_cause.0.type: role_restriction_exception }
|
||||||
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
||||||
|
|
||||||
# Get API key should not be allowed
|
# Get API key should not be allowed
|
||||||
- do:
|
- do:
|
||||||
catch: forbidden
|
catch: forbidden
|
||||||
headers:
|
headers:
|
||||||
|
@ -300,18 +314,18 @@ teardown:
|
||||||
- match: { error.root_cause.0.type: role_restriction_exception }
|
- match: { error.root_cause.0.type: role_restriction_exception }
|
||||||
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
||||||
|
|
||||||
# Authenticate with API key should not be allowed
|
# Authenticate with API key should not be allowed
|
||||||
- do:
|
- do:
|
||||||
catch: forbidden
|
catch: forbidden
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded}
|
Authorization: ApiKey ${api_key_encoded}
|
||||||
security.authenticate: {}
|
security.authenticate: { }
|
||||||
- match: { status: 403 }
|
- match: { status: 403 }
|
||||||
- match: { error.type: security_exception }
|
- match: { error.type: security_exception }
|
||||||
- match: { error.root_cause.0.type: role_restriction_exception }
|
- match: { error.root_cause.0.type: role_restriction_exception }
|
||||||
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
||||||
|
|
||||||
# Direct index search should be rejected due to a workflow restriction
|
# Direct index search should be rejected due to a workflow restriction
|
||||||
- do:
|
- do:
|
||||||
catch: forbidden
|
catch: forbidden
|
||||||
headers:
|
headers:
|
||||||
|
@ -327,11 +341,11 @@ teardown:
|
||||||
- match: { error.root_cause.0.type: role_restriction_exception }
|
- match: { error.root_cause.0.type: role_restriction_exception }
|
||||||
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
- match: { error.root_cause.0.reason: "access restricted by workflow" }
|
||||||
|
|
||||||
# Creating an API key which can only search 'test-search-application-1'
|
# Creating an API key which can only search 'test-search-application-1'
|
||||||
- do:
|
- do:
|
||||||
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
headers: { Authorization: "Basic ZW50c2VhcmNoLXVzZXI6ZW50c2VhcmNoLXVzZXItcGFzc3dvcmQ=" } # user
|
||||||
security.create_api_key:
|
security.create_api_key:
|
||||||
body: >
|
body: >
|
||||||
{
|
{
|
||||||
"name": "search-application-1-api-key",
|
"name": "search-application-1-api-key",
|
||||||
"role_descriptors": {
|
"role_descriptors": {
|
||||||
|
@ -350,10 +364,10 @@ teardown:
|
||||||
}
|
}
|
||||||
|
|
||||||
- match: { name: "search-application-1-api-key" }
|
- match: { name: "search-application-1-api-key" }
|
||||||
- set: { encoded: api_key_encoded_1 }
|
- set: { encoded: api_key_encoded_1 }
|
||||||
- set: { id: api_key_id_1 }
|
- set: { id: api_key_id_1 }
|
||||||
|
|
||||||
# Query Search Application 'test-search-application' should be denied since API key (api_key_encoded_1) does not have required index privilege
|
# Query Search Application 'test-search-application' should be denied since API key (api_key_encoded_1) does not have required index privilege
|
||||||
- do:
|
- do:
|
||||||
catch: forbidden
|
catch: forbidden
|
||||||
headers:
|
headers:
|
||||||
|
@ -364,7 +378,7 @@ teardown:
|
||||||
- match: { error.type: security_exception }
|
- match: { error.type: security_exception }
|
||||||
- match: { error.reason: "action [indices:data/read/xpack/application/search_application/search] is unauthorized for API key id [${api_key_id_1}] of user [entsearch-user] on indices [test-search-application], this action is granted by the index privileges [read,all]" }
|
- match: { error.reason: "action [indices:data/read/xpack/application/search_application/search] is unauthorized for API key id [${api_key_id_1}] of user [entsearch-user] on indices [test-search-application], this action is granted by the index privileges [read,all]" }
|
||||||
|
|
||||||
# Query Search Application 'test-search-application-1' with new API key (api_key_encoded_1) should be allowed:
|
# Query Search Application 'test-search-application-1' with new API key (api_key_encoded_1) should be allowed:
|
||||||
- do:
|
- do:
|
||||||
headers:
|
headers:
|
||||||
Authorization: ApiKey ${api_key_encoded_1}
|
Authorization: ApiKey ${api_key_encoded_1}
|
||||||
|
|
|
@ -233,6 +233,10 @@ public class EnterpriseSearch extends Plugin implements ActionPlugin, SystemInde
|
||||||
|
|
||||||
private final boolean enabled;
|
private final boolean enabled;
|
||||||
|
|
||||||
|
// NOTE: Behavioral Analytics is deprecated in 9.0 but not 8.x.
|
||||||
|
public static final String BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE =
|
||||||
|
"Behavioral Analytics is deprecated and will be removed in a future release.";
|
||||||
|
|
||||||
public EnterpriseSearch(Settings settings) {
|
public EnterpriseSearch(Settings settings) {
|
||||||
this.enabled = XPackSettings.ENTERPRISE_SEARCH_ENABLED.get(settings);
|
this.enabled = XPackSettings.ENTERPRISE_SEARCH_ENABLED.get(settings);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,9 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.E
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link AnalyticsCollection} model.
|
* The {@link AnalyticsCollection} model.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsCollection implements Writeable, ToXContentObject {
|
public class AnalyticsCollection implements Writeable, ToXContentObject {
|
||||||
|
|
||||||
private static final ObjectParser<AnalyticsCollection, String> PARSER = ObjectParser.fromBuilder(
|
private static final ObjectParser<AnalyticsCollection, String> PARSER = ObjectParser.fromBuilder(
|
||||||
|
|
|
@ -28,7 +28,9 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.E
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A service that allows the resolution of {@link AnalyticsCollection} by name.
|
* A service that allows the resolution of {@link AnalyticsCollection} by name.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsCollectionResolver {
|
public class AnalyticsCollectionResolver {
|
||||||
private final IndexNameExpressionResolver indexNameExpressionResolver;
|
private final IndexNameExpressionResolver indexNameExpressionResolver;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,9 @@ import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
|
||||||
* Until we have more specific need the {@link AnalyticsCollection} is just another representation
|
* Until we have more specific need the {@link AnalyticsCollection} is just another representation
|
||||||
* of a {@link org.elasticsearch.cluster.metadata.DataStream}.
|
* of a {@link org.elasticsearch.cluster.metadata.DataStream}.
|
||||||
* As a consequence, this service is mostly a facade for the data stream API.
|
* As a consequence, this service is mostly a facade for the data stream API.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsCollectionService {
|
public class AnalyticsCollectionService {
|
||||||
|
|
||||||
private static final Logger logger = LogManager.getLogger(AnalyticsCollectionService.class);
|
private static final Logger logger = LogManager.getLogger(AnalyticsCollectionService.class);
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
package org.elasticsearch.xpack.application.analytics;
|
package org.elasticsearch.xpack.application.analytics;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsConstants {
|
public class AnalyticsConstants {
|
||||||
|
|
||||||
private AnalyticsConstants() {}
|
private AnalyticsConstants() {}
|
||||||
|
|
|
@ -17,7 +17,9 @@ import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event emitter will index Analytics events submitted through a @{PostAnalyticsEventAction.Request} request.
|
* Event emitter will index Analytics events submitted through a @{PostAnalyticsEventAction.Request} request.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsEventIngestService {
|
public class AnalyticsEventIngestService {
|
||||||
private final AnalyticsCollectionResolver collectionResolver;
|
private final AnalyticsCollectionResolver collectionResolver;
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,10 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.R
|
||||||
import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.TEMPLATE_VERSION_VARIABLE;
|
import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.TEMPLATE_VERSION_VARIABLE;
|
||||||
import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
|
import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsTemplateRegistry extends IndexTemplateRegistry {
|
public class AnalyticsTemplateRegistry extends IndexTemplateRegistry {
|
||||||
|
|
||||||
// This number must be incremented when we make changes to built-in templates.
|
// This number must be incremented when we make changes to built-in templates.
|
||||||
|
|
|
@ -24,6 +24,10 @@ import java.util.Objects;
|
||||||
|
|
||||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class DeleteAnalyticsCollectionAction {
|
public class DeleteAnalyticsCollectionAction {
|
||||||
|
|
||||||
public static final String NAME = "cluster:admin/xpack/application/analytics/delete";
|
public static final String NAME = "cluster:admin/xpack/application/analytics/delete";
|
||||||
|
|
|
@ -25,6 +25,10 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class GetAnalyticsCollectionAction {
|
public class GetAnalyticsCollectionAction {
|
||||||
|
|
||||||
public static final String NAME = "cluster:admin/xpack/application/analytics/get";
|
public static final String NAME = "cluster:admin/xpack/application/analytics/get";
|
||||||
|
|
|
@ -36,6 +36,10 @@ import java.util.Objects;
|
||||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||||
import static org.elasticsearch.xcontent.ConstructingObjectParser.constructorArg;
|
import static org.elasticsearch.xcontent.ConstructingObjectParser.constructorArg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class PostAnalyticsEventAction {
|
public class PostAnalyticsEventAction {
|
||||||
|
|
||||||
public static final String NAME = "cluster:admin/xpack/application/analytics/post_event";
|
public static final String NAME = "cluster:admin/xpack/application/analytics/post_event";
|
||||||
|
|
|
@ -23,6 +23,10 @@ import java.util.Objects;
|
||||||
|
|
||||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class PutAnalyticsCollectionAction {
|
public class PutAnalyticsCollectionAction {
|
||||||
|
|
||||||
public static final String NAME = "cluster:admin/xpack/application/analytics/put";
|
public static final String NAME = "cluster:admin/xpack/application/analytics/put";
|
||||||
|
|
|
@ -23,6 +23,10 @@ import java.util.List;
|
||||||
|
|
||||||
import static org.elasticsearch.rest.RestRequest.Method.DELETE;
|
import static org.elasticsearch.rest.RestRequest.Method.DELETE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
@ServerlessScope(Scope.PUBLIC)
|
@ServerlessScope(Scope.PUBLIC)
|
||||||
public class RestDeleteAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
|
public class RestDeleteAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
|
||||||
public RestDeleteAnalyticsCollectionAction(XPackLicenseState licenseState) {
|
public RestDeleteAnalyticsCollectionAction(XPackLicenseState licenseState) {
|
||||||
|
|
|
@ -23,6 +23,10 @@ import java.util.List;
|
||||||
|
|
||||||
import static org.elasticsearch.rest.RestRequest.Method.GET;
|
import static org.elasticsearch.rest.RestRequest.Method.GET;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
@ServerlessScope(Scope.PUBLIC)
|
@ServerlessScope(Scope.PUBLIC)
|
||||||
public class RestGetAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
|
public class RestGetAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
|
||||||
public RestGetAnalyticsCollectionAction(XPackLicenseState licenseState) {
|
public RestGetAnalyticsCollectionAction(XPackLicenseState licenseState) {
|
||||||
|
|
|
@ -29,6 +29,10 @@ import java.util.Map;
|
||||||
|
|
||||||
import static org.elasticsearch.rest.RestRequest.Method.POST;
|
import static org.elasticsearch.rest.RestRequest.Method.POST;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
@ServerlessScope(Scope.PUBLIC)
|
@ServerlessScope(Scope.PUBLIC)
|
||||||
public class RestPostAnalyticsEventAction extends EnterpriseSearchBaseRestHandler {
|
public class RestPostAnalyticsEventAction extends EnterpriseSearchBaseRestHandler {
|
||||||
public RestPostAnalyticsEventAction(XPackLicenseState licenseState) {
|
public RestPostAnalyticsEventAction(XPackLicenseState licenseState) {
|
||||||
|
|
|
@ -24,6 +24,10 @@ import java.util.List;
|
||||||
|
|
||||||
import static org.elasticsearch.rest.RestRequest.Method.PUT;
|
import static org.elasticsearch.rest.RestRequest.Method.PUT;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
@ServerlessScope(Scope.PUBLIC)
|
@ServerlessScope(Scope.PUBLIC)
|
||||||
public class RestPutAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
|
public class RestPutAnalyticsCollectionAction extends EnterpriseSearchBaseRestHandler {
|
||||||
public RestPutAnalyticsCollectionAction(XPackLicenseState licenseState) {
|
public RestPutAnalyticsCollectionAction(XPackLicenseState licenseState) {
|
||||||
|
|
|
@ -15,6 +15,8 @@ import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||||
import org.elasticsearch.cluster.service.ClusterService;
|
import org.elasticsearch.cluster.service.ClusterService;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationCategory;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||||
import org.elasticsearch.injection.guice.Inject;
|
import org.elasticsearch.injection.guice.Inject;
|
||||||
import org.elasticsearch.tasks.Task;
|
import org.elasticsearch.tasks.Task;
|
||||||
|
@ -22,6 +24,13 @@ import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
|
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
|
||||||
|
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TransportDeleteAnalyticsCollectionAction extends AcknowledgedTransportMasterNodeAction<
|
public class TransportDeleteAnalyticsCollectionAction extends AcknowledgedTransportMasterNodeAction<
|
||||||
DeleteAnalyticsCollectionAction.Request> {
|
DeleteAnalyticsCollectionAction.Request> {
|
||||||
|
|
||||||
|
@ -59,6 +68,8 @@ public class TransportDeleteAnalyticsCollectionAction extends AcknowledgedTransp
|
||||||
ClusterState state,
|
ClusterState state,
|
||||||
ActionListener<AcknowledgedResponse> listener
|
ActionListener<AcknowledgedResponse> listener
|
||||||
) {
|
) {
|
||||||
|
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
|
||||||
|
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
|
||||||
analyticsCollectionService.deleteAnalyticsCollection(state, request, listener.map(v -> AcknowledgedResponse.TRUE));
|
analyticsCollectionService.deleteAnalyticsCollection(state, request, listener.map(v -> AcknowledgedResponse.TRUE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||||
import org.elasticsearch.cluster.ClusterState;
|
import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||||
import org.elasticsearch.cluster.service.ClusterService;
|
import org.elasticsearch.cluster.service.ClusterService;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationCategory;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||||
import org.elasticsearch.injection.guice.Inject;
|
import org.elasticsearch.injection.guice.Inject;
|
||||||
import org.elasticsearch.tasks.Task;
|
import org.elasticsearch.tasks.Task;
|
||||||
|
@ -20,6 +22,13 @@ import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
|
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
|
||||||
|
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TransportGetAnalyticsCollectionAction extends TransportMasterNodeReadAction<
|
public class TransportGetAnalyticsCollectionAction extends TransportMasterNodeReadAction<
|
||||||
GetAnalyticsCollectionAction.Request,
|
GetAnalyticsCollectionAction.Request,
|
||||||
GetAnalyticsCollectionAction.Response> {
|
GetAnalyticsCollectionAction.Response> {
|
||||||
|
@ -54,6 +63,8 @@ public class TransportGetAnalyticsCollectionAction extends TransportMasterNodeRe
|
||||||
ClusterState state,
|
ClusterState state,
|
||||||
ActionListener<GetAnalyticsCollectionAction.Response> listener
|
ActionListener<GetAnalyticsCollectionAction.Response> listener
|
||||||
) {
|
) {
|
||||||
|
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
|
||||||
|
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
|
||||||
analyticsCollectionService.getAnalyticsCollection(state, request, listener);
|
analyticsCollectionService.getAnalyticsCollection(state, request, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,17 +10,25 @@ package org.elasticsearch.xpack.application.analytics.action;
|
||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.support.ActionFilters;
|
import org.elasticsearch.action.support.ActionFilters;
|
||||||
import org.elasticsearch.action.support.HandledTransportAction;
|
import org.elasticsearch.action.support.HandledTransportAction;
|
||||||
|
import org.elasticsearch.cluster.service.ClusterService;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationCategory;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||||
import org.elasticsearch.injection.guice.Inject;
|
import org.elasticsearch.injection.guice.Inject;
|
||||||
import org.elasticsearch.tasks.Task;
|
import org.elasticsearch.tasks.Task;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
import org.elasticsearch.xpack.application.analytics.AnalyticsEventIngestService;
|
import org.elasticsearch.xpack.application.analytics.AnalyticsEventIngestService;
|
||||||
|
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transport implementation for the {@link PostAnalyticsEventAction}.
|
* Transport implementation for the {@link PostAnalyticsEventAction}.
|
||||||
* It executes the {@link AnalyticsEventIngestService#addEvent} method if the XPack license is valid, else it calls
|
* It executes the {@link AnalyticsEventIngestService#addEvent} method if the XPack license is valid, else it calls
|
||||||
* the listener's onFailure method with the appropriate exception.
|
* the listener's onFailure method with the appropriate exception.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TransportPostAnalyticsEventAction extends HandledTransportAction<
|
public class TransportPostAnalyticsEventAction extends HandledTransportAction<
|
||||||
PostAnalyticsEventAction.Request,
|
PostAnalyticsEventAction.Request,
|
||||||
PostAnalyticsEventAction.Response> {
|
PostAnalyticsEventAction.Response> {
|
||||||
|
@ -31,7 +39,8 @@ public class TransportPostAnalyticsEventAction extends HandledTransportAction<
|
||||||
public TransportPostAnalyticsEventAction(
|
public TransportPostAnalyticsEventAction(
|
||||||
TransportService transportService,
|
TransportService transportService,
|
||||||
ActionFilters actionFilters,
|
ActionFilters actionFilters,
|
||||||
AnalyticsEventIngestService eventEmitterService
|
AnalyticsEventIngestService eventEmitterService,
|
||||||
|
ClusterService clusterService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
PostAnalyticsEventAction.NAME,
|
PostAnalyticsEventAction.NAME,
|
||||||
|
@ -49,6 +58,8 @@ public class TransportPostAnalyticsEventAction extends HandledTransportAction<
|
||||||
PostAnalyticsEventAction.Request request,
|
PostAnalyticsEventAction.Request request,
|
||||||
ActionListener<PostAnalyticsEventAction.Response> listener
|
ActionListener<PostAnalyticsEventAction.Response> listener
|
||||||
) {
|
) {
|
||||||
|
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
|
||||||
|
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
|
||||||
this.eventEmitterService.addEvent(request, listener);
|
this.eventEmitterService.addEvent(request, listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,13 +14,23 @@ import org.elasticsearch.cluster.ClusterState;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||||
import org.elasticsearch.cluster.service.ClusterService;
|
import org.elasticsearch.cluster.service.ClusterService;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationCategory;
|
||||||
|
import org.elasticsearch.common.logging.DeprecationLogger;
|
||||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||||
|
import org.elasticsearch.features.FeatureService;
|
||||||
import org.elasticsearch.injection.guice.Inject;
|
import org.elasticsearch.injection.guice.Inject;
|
||||||
import org.elasticsearch.tasks.Task;
|
import org.elasticsearch.tasks.Task;
|
||||||
import org.elasticsearch.threadpool.ThreadPool;
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
|
import org.elasticsearch.xpack.application.analytics.AnalyticsCollectionService;
|
||||||
|
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_API_ENDPOINT;
|
||||||
|
import static org.elasticsearch.xpack.application.EnterpriseSearch.BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAction<
|
public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAction<
|
||||||
PutAnalyticsCollectionAction.Request,
|
PutAnalyticsCollectionAction.Request,
|
||||||
PutAnalyticsCollectionAction.Response> {
|
PutAnalyticsCollectionAction.Response> {
|
||||||
|
@ -33,7 +43,8 @@ public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAc
|
||||||
ClusterService clusterService,
|
ClusterService clusterService,
|
||||||
ThreadPool threadPool,
|
ThreadPool threadPool,
|
||||||
ActionFilters actionFilters,
|
ActionFilters actionFilters,
|
||||||
AnalyticsCollectionService analyticsCollectionService
|
AnalyticsCollectionService analyticsCollectionService,
|
||||||
|
FeatureService featureService
|
||||||
) {
|
) {
|
||||||
super(
|
super(
|
||||||
PutAnalyticsCollectionAction.NAME,
|
PutAnalyticsCollectionAction.NAME,
|
||||||
|
@ -60,6 +71,8 @@ public class TransportPutAnalyticsCollectionAction extends TransportMasterNodeAc
|
||||||
ClusterState state,
|
ClusterState state,
|
||||||
ActionListener<PutAnalyticsCollectionAction.Response> listener
|
ActionListener<PutAnalyticsCollectionAction.Response> listener
|
||||||
) {
|
) {
|
||||||
|
DeprecationLogger.getLogger(TransportDeleteAnalyticsCollectionAction.class)
|
||||||
|
.warn(DeprecationCategory.API, BEHAVIORAL_ANALYTICS_API_ENDPOINT, BEHAVIORAL_ANALYTICS_DEPRECATION_MESSAGE);
|
||||||
analyticsCollectionService.putAnalyticsCollection(state, request, listener);
|
analyticsCollectionService.putAnalyticsCollection(state, request, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,9 @@ import static org.elasticsearch.xpack.application.analytics.AnalyticsConstants.E
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents Analytics events object meant to be emitted to the event queue.
|
* This class represents Analytics events object meant to be emitted to the event queue.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsEvent implements Writeable, ToXContentObject {
|
public class AnalyticsEvent implements Writeable, ToXContentObject {
|
||||||
|
|
||||||
public static final ParseField TIMESTAMP_FIELD = new ParseField("@timestamp");
|
public static final ParseField TIMESTAMP_FIELD = new ParseField("@timestamp");
|
||||||
|
|
|
@ -29,7 +29,9 @@ import static org.elasticsearch.xpack.application.analytics.event.AnalyticsEvent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A utility class for parsing {@link AnalyticsEvent} objects from payloads (such as HTTP POST request bodies) or input streams.
|
* A utility class for parsing {@link AnalyticsEvent} objects from payloads (such as HTTP POST request bodies) or input streams.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsEventFactory {
|
public class AnalyticsEventFactory {
|
||||||
|
|
||||||
public static final AnalyticsEventFactory INSTANCE = new AnalyticsEventFactory();
|
public static final AnalyticsEventFactory INSTANCE = new AnalyticsEventFactory();
|
||||||
|
|
|
@ -22,6 +22,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.P
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class PageViewAnalyticsEvent {
|
public class PageViewAnalyticsEvent {
|
||||||
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
|
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
|
||||||
"page_view_event",
|
"page_view_event",
|
||||||
|
|
|
@ -20,6 +20,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.S
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SearchAnalyticsEvent {
|
public class SearchAnalyticsEvent {
|
||||||
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
|
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
|
||||||
"search_event",
|
"search_event",
|
||||||
|
|
|
@ -24,6 +24,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.S
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SessionAnalyticsEventField.SESSION_FIELD;
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.UserAnalyticsEventField.USER_FIELD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SearchClickAnalyticsEvent {
|
public class SearchClickAnalyticsEvent {
|
||||||
|
|
||||||
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
|
private static final ObjectParser<AnalyticsEvent.Builder, AnalyticsEvent.Context> PARSER = ObjectParser.fromBuilder(
|
||||||
|
|
|
@ -18,6 +18,10 @@ import java.util.Map;
|
||||||
|
|
||||||
import static org.elasticsearch.common.Strings.requireNonBlank;
|
import static org.elasticsearch.common.Strings.requireNonBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class DocumentAnalyticsEventField {
|
public class DocumentAnalyticsEventField {
|
||||||
|
|
||||||
public static final ParseField DOCUMENT_FIELD = new ParseField("document");
|
public static final ParseField DOCUMENT_FIELD = new ParseField("document");
|
||||||
|
|
|
@ -16,6 +16,10 @@ import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class PageAnalyticsEventField {
|
public class PageAnalyticsEventField {
|
||||||
public static final ParseField PAGE_FIELD = new ParseField("page");
|
public static final ParseField PAGE_FIELD = new ParseField("page");
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,10 @@ import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class PaginationAnalyticsEventField {
|
public class PaginationAnalyticsEventField {
|
||||||
|
|
||||||
public static final ParseField PAGINATION_FIELD = new ParseField("page");
|
public static final ParseField PAGINATION_FIELD = new ParseField("page");
|
||||||
|
|
|
@ -20,6 +20,10 @@ import static org.elasticsearch.xpack.application.analytics.event.parser.field.P
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SearchFiltersAnalyticsEventField.SEARCH_FILTERS_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SearchFiltersAnalyticsEventField.SEARCH_FILTERS_FIELD;
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SortOrderAnalyticsEventField.SORT_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.SortOrderAnalyticsEventField.SORT_FIELD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SearchAnalyticsEventField {
|
public class SearchAnalyticsEventField {
|
||||||
public static final ParseField SEARCH_FIELD = new ParseField("search");
|
public static final ParseField SEARCH_FIELD = new ParseField("search");
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SearchFiltersAnalyticsEventField {
|
public class SearchFiltersAnalyticsEventField {
|
||||||
public static final ParseField SEARCH_FILTERS_FIELD = new ParseField("filters");
|
public static final ParseField SEARCH_FILTERS_FIELD = new ParseField("filters");
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,10 @@ import java.util.Map;
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.DocumentAnalyticsEventField.DOCUMENT_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.DocumentAnalyticsEventField.DOCUMENT_FIELD;
|
||||||
import static org.elasticsearch.xpack.application.analytics.event.parser.field.PageAnalyticsEventField.PAGE_FIELD;
|
import static org.elasticsearch.xpack.application.analytics.event.parser.field.PageAnalyticsEventField.PAGE_FIELD;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SearchResultAnalyticsEventField {
|
public class SearchResultAnalyticsEventField {
|
||||||
public static final ParseField SEARCH_RESULTS_TOTAL_FIELD = new ParseField("total_results");
|
public static final ParseField SEARCH_RESULTS_TOTAL_FIELD = new ParseField("total_results");
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,10 @@ import java.util.Map;
|
||||||
|
|
||||||
import static org.elasticsearch.common.Strings.requireNonBlank;
|
import static org.elasticsearch.common.Strings.requireNonBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SessionAnalyticsEventField {
|
public class SessionAnalyticsEventField {
|
||||||
public static final ParseField SESSION_FIELD = new ParseField("session");
|
public static final ParseField SESSION_FIELD = new ParseField("session");
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@ import java.util.Map;
|
||||||
|
|
||||||
import static org.elasticsearch.common.Strings.requireNonBlank;
|
import static org.elasticsearch.common.Strings.requireNonBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SortOrderAnalyticsEventField {
|
public class SortOrderAnalyticsEventField {
|
||||||
|
|
||||||
public static final ParseField SORT_FIELD = new ParseField("sort");
|
public static final ParseField SORT_FIELD = new ParseField("sort");
|
||||||
|
|
|
@ -19,6 +19,10 @@ import java.util.Map;
|
||||||
|
|
||||||
import static org.elasticsearch.common.Strings.requireNonBlank;
|
import static org.elasticsearch.common.Strings.requireNonBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class UserAnalyticsEventField {
|
public class UserAnalyticsEventField {
|
||||||
public static final ParseField USER_FIELD = new ParseField("user");
|
public static final ParseField USER_FIELD = new ParseField("user");
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,10 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
|
import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated in 9.0
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsEventEmitter extends AbstractLifecycleComponent {
|
public class AnalyticsEventEmitter extends AbstractLifecycleComponent {
|
||||||
|
|
||||||
private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class);
|
private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class);
|
||||||
|
|
|
@ -20,7 +20,9 @@ import org.elasticsearch.injection.guice.Inject;
|
||||||
* - flush_delay: the maximum delay between two flushes (default: 10s.)
|
* - flush_delay: the maximum delay between two flushes (default: 10s.)
|
||||||
* - max_events_per_bulk: the maximum number of events that can be added to the bulk before flushing the bulk (default: 1000)
|
* - max_events_per_bulk: the maximum number of events that can be added to the bulk before flushing the bulk (default: 1000)
|
||||||
* - max_number_of_retries: the maximum number of retries when bulk execution fails (default: 3)
|
* - max_number_of_retries: the maximum number of retries when bulk execution fails (default: 3)
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class AnalyticsEventIngestConfig {
|
public class AnalyticsEventIngestConfig {
|
||||||
private static final String SETTING_ROOT_PATH = "xpack.applications.behavioral_analytics.ingest";
|
private static final String SETTING_ROOT_PATH = "xpack.applications.behavioral_analytics.ingest";
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,9 @@ import static org.elasticsearch.xpack.core.ClientHelper.ENT_SEARCH_ORIGIN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Event ingest is done through a {@link BulkProcessor2}. This class is responsible for instantiating the bulk processor.
|
* Event ingest is done through a {@link BulkProcessor2}. This class is responsible for instantiating the bulk processor.
|
||||||
|
* @deprecated in 9.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class BulkProcessorFactory {
|
public class BulkProcessorFactory {
|
||||||
private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class);
|
private static final Logger logger = LogManager.getLogger(AnalyticsEventEmitter.class);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue