Skip to content

Commit 0c77296

Browse files
authored
Merge branch 'main' into updatecli_main_ironbank_template
2 parents a00d77a + 103d29f commit 0c77296

File tree

247 files changed

+5136
-1275
lines changed

Some content is hidden

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

247 files changed

+5136
-1275
lines changed

.ci/init.gradle

Lines changed: 2 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,3 @@
1-
import com.bettercloud.vault.VaultConfig
2-
import com.bettercloud.vault.Vault
3-
4-
initscript {
5-
repositories {
6-
mavenCentral()
7-
}
8-
dependencies {
9-
classpath 'com.bettercloud:vault-java-driver:4.1.0'
10-
}
11-
}
12-
13-
boolean USE_ARTIFACTORY = false
14-
15-
if (System.getenv('VAULT_ADDR') == null) {
16-
// When trying to reproduce errors outside of CI, it can be useful to allow this to just return rather than blowing up
17-
if (System.getenv('CI') == null) {
18-
return
19-
}
20-
21-
throw new GradleException("You must set the VAULT_ADDR environment variable to use this init script.")
22-
}
23-
24-
if (System.getenv('VAULT_ROLE_ID') == null && System.getenv('VAULT_SECRET_ID') == null && System.getenv('VAULT_TOKEN') == null) {
25-
// When trying to reproduce errors outside of CI, it can be useful to allow this to just return rather than blowing up
26-
if (System.getenv('CI') == null) {
27-
return
28-
}
29-
30-
throw new GradleException("You must set either the VAULT_ROLE_ID and VAULT_SECRET_ID environment variables, " +
31-
"or the VAULT_TOKEN environment variable to use this init script.")
32-
}
33-
34-
final String vaultPathPrefix = System.getenv('VAULT_ADDR') ==~ /.+vault-ci.+\.dev.*/ ? "secret/ci/elastic-elasticsearch/migrated" : "secret/elasticsearch-ci"
35-
36-
final String vaultToken = System.getenv('VAULT_TOKEN') ?: new Vault(
37-
new VaultConfig()
38-
.address(System.env.VAULT_ADDR)
39-
.engineVersion(1)
40-
.build()
41-
)
42-
.withRetries(5, 1000)
43-
.auth()
44-
.loginByAppRole("approle", System.env.VAULT_ROLE_ID, System.env.VAULT_SECRET_ID)
45-
.getAuthClientToken()
46-
47-
final Vault vault = new Vault(
48-
new VaultConfig()
49-
.address(System.env.VAULT_ADDR)
50-
.engineVersion(1)
51-
.token(vaultToken)
52-
.build()
53-
)
54-
.withRetries(5, 1000)
55-
56-
57-
if (USE_ARTIFACTORY) {
58-
final Map<String, String> artifactoryCredentials = vault.logical()
59-
.read("${vaultPathPrefix}/artifactory.elstc.co")
60-
.getData()
61-
logger.info("Using elastic artifactory repos")
62-
Closure configCache = {
63-
return {
64-
name "artifactory-gradle-release"
65-
url "https://artifactory.elstc.co/artifactory/gradle-release"
66-
credentials {
67-
username artifactoryCredentials.get("username")
68-
password artifactoryCredentials.get("token")
69-
}
70-
}
71-
}
72-
settingsEvaluated { settings ->
73-
settings.pluginManagement {
74-
repositories {
75-
maven configCache()
76-
}
77-
}
78-
}
79-
projectsLoaded {
80-
allprojects {
81-
buildscript {
82-
repositories {
83-
maven configCache()
84-
}
85-
}
86-
repositories {
87-
maven configCache()
88-
}
89-
}
90-
}
91-
}
92-
931
gradle.settingsEvaluated { settings ->
942
settings.pluginManager.withPlugin("com.gradle.develocity") {
953
settings.develocity {
@@ -98,14 +6,10 @@ gradle.settingsEvaluated { settings ->
986
}
997
}
1008

101-
1029
final String buildCacheUrl = System.getProperty('org.elasticsearch.build.cache.url')
10310
final boolean buildCachePush = Boolean.valueOf(System.getProperty('org.elasticsearch.build.cache.push', 'false'))
10411

10512
if (buildCacheUrl) {
106-
final Map<String, String> buildCacheCredentials = System.getenv("GRADLE_BUILD_CACHE_USERNAME") ? [:] : vault.logical()
107-
.read("${vaultPathPrefix}/gradle-build-cache")
108-
.getData()
10913
gradle.settingsEvaluated { settings ->
11014
settings.buildCache {
11115
local {
@@ -116,11 +20,10 @@ if (buildCacheUrl) {
11620
url = buildCacheUrl
11721
push = buildCachePush
11822
credentials {
119-
username = System.getenv("GRADLE_BUILD_CACHE_USERNAME") ?: buildCacheCredentials.get("username")
120-
password = System.getenv("GRADLE_BUILD_CACHE_PASSWORD") ?: buildCacheCredentials.get("password")
23+
username = System.getenv("GRADLE_BUILD_CACHE_USERNAME")
24+
password = System.getenv("GRADLE_BUILD_CACHE_PASSWORD")
12125
}
12226
}
12327
}
12428
}
12529
}
126-

docs/changelog/116687.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 116687
2+
summary: Add LogsDB option to route on sort fields
3+
area: Logs
4+
type: enhancement
5+
issues: []

docs/changelog/118353.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118353
2+
summary: Epoch Millis Rounding Down and Not Up 2
3+
area: Infra/Core
4+
type: bug
5+
issues: []

docs/changelog/118562.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 118562
2+
summary: Update data stream deprecations warnings to new format and filter searchable
3+
snapshots from response
4+
area: Data streams
5+
type: enhancement
6+
issues: []

docs/changelog/118603.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 118603
2+
summary: Allow DATE_PARSE to read the timezones
3+
area: ES|QL
4+
type: bug
5+
issues:
6+
- 117680

docs/changelog/118823.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118823
2+
summary: Fix attribute set equals
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/118931.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 118931
2+
summary: Add a `LicenseAware` interface for licensed Nodes
3+
area: ES|QL
4+
type: enhancement
5+
issues:
6+
- 117405

docs/changelog/118941.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118941
2+
summary: Allow archive and searchable snapshots indices in N-2 version
3+
area: Recovery
4+
type: enhancement
5+
issues: []

docs/reference/connector/docs/connectors-sharepoint-online.asciidoc

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,58 @@ The application name will appear in the Title box.
133133
</AppPermissionRequests>
134134
----
135135
136+
[discrete#es-connectors-sharepoint-online-sites-selected-permissions]
137+
====== Granting `Sites.Selected` permissions
138+
139+
To configure `Sites.Selected` permissions, follow these steps in the Azure Active Directory portal. These permissions enable precise access control to specific SharePoint sites.
140+
141+
. Sign in to the https://portal.azure.com/[Azure Active Directory portal^].
142+
. Navigate to **App registrations** and locate the application created for the connector.
143+
. Under **API permissions**, click **Add permission**.
144+
. Select **Microsoft Graph** > **Application permissions**, then add `Sites.Selected`.
145+
. Click **Grant admin consent** to approve the permission.
146+
147+
[TIP]
148+
====
149+
Refer to the official https://learn.microsoft.com/en-us/graph/permissions-reference[Microsoft documentation] for managing permissions in Azure AD.
150+
====
151+
152+
To assign access to specific SharePoint sites using `Sites.Selected`:
153+
154+
. Use Microsoft Graph Explorer or PowerShell to grant access.
155+
. To fetch the site ID, run the following Graph API query:
156+
+
157+
[source, http]
158+
----
159+
GET https://graph.microsoft.com/v1.0/sites?select=webUrl,Title,Id&$search="<Name of the site>*"
160+
----
161+
+
162+
This will return the `id` of the site.
163+
164+
. Use the `id` to assign read or write access:
165+
+
166+
[source, http]
167+
----
168+
POST https://graph.microsoft.com/v1.0/sites/<siteId>/permissions
169+
{
170+
"roles": ["read"], // or "write"
171+
"grantedToIdentities": [
172+
{
173+
"application": {
174+
"id": "<App_Client_ID>",
175+
"displayName": "<App_Display_Name>"
176+
}
177+
}
178+
]
179+
}
180+
----
181+
182+
[NOTE]
183+
====
184+
When using the `Comma-separated list of sites` configuration field, ensure the sites specified match those granted `Sites.Selected` permission in SharePoint.
185+
If the `Comma-separated list of sites` field is set to `*` or the `Enumerate all sites` toggle is enabled, the connector will attempt to access all sites. This requires broader permissions, which are not supported with `Sites.Selected`.
186+
====
187+
136188
.Graph API permissions
137189
****
138190
Microsoft recommends using Graph API for all operations with Sharepoint Online. Graph API is well-documented and more efficient at fetching data, which helps avoid throttling.
@@ -594,6 +646,59 @@ The application name will appear in the Title box.
594646
</AppPermissionRequests>
595647
----
596648
649+
[discrete#es-connectors-sharepoint-online-sites-selected-permissions-self-managed]
650+
====== Granting `Sites.Selected` permissions
651+
652+
To configure `Sites.Selected` permissions, follow these steps in the Azure Active Directory portal. These permissions enable precise access control to specific SharePoint sites.
653+
654+
. Sign in to the https://portal.azure.com/[Azure Active Directory portal^].
655+
. Navigate to **App registrations** and locate the application created for the connector.
656+
. Under **API permissions**, click **Add permission**.
657+
. Select **Microsoft Graph** > **Application permissions**, then add `Sites.Selected`.
658+
. Click **Grant admin consent** to approve the permission.
659+
660+
[TIP]
661+
====
662+
Refer to the official https://learn.microsoft.com/en-us/graph/permissions-reference[Microsoft documentation] for managing permissions in Azure AD.
663+
====
664+
665+
666+
To assign access to specific SharePoint sites using `Sites.Selected`:
667+
668+
. Use Microsoft Graph Explorer or PowerShell to grant access.
669+
. To fetch the site ID, run the following Graph API query:
670+
+
671+
[source, http]
672+
----
673+
GET https://graph.microsoft.com/v1.0/sites?select=webUrl,Title,Id&$search="<Name of the site>*"
674+
----
675+
+
676+
This will return the `id` of the site.
677+
678+
. Use the `id` to assign read or write access:
679+
+
680+
[source, http]
681+
----
682+
POST https://graph.microsoft.com/v1.0/sites/<siteId>/permissions
683+
{
684+
"roles": ["read"], // or "write"
685+
"grantedToIdentities": [
686+
{
687+
"application": {
688+
"id": "<App_Client_ID>",
689+
"displayName": "<App_Display_Name>"
690+
}
691+
}
692+
]
693+
}
694+
----
695+
696+
[NOTE]
697+
====
698+
When using the `Comma-separated list of sites` configuration field, ensure the sites specified match those granted `Sites.Selected` permission in SharePoint.
699+
If the `Comma-separated list of sites` field is set to `*` or the `Enumerate all sites` toggle is enabled, the connector will attempt to access all sites. This requires broader permissions, which are not supported with `Sites.Selected`.
700+
====
701+
597702
.Graph API permissions
598703
****
599704
Microsoft recommends using Graph API for all operations with Sharepoint Online. Graph API is well-documented and more efficient at fetching data, which helps avoid throttling.

docs/reference/esql/esql-limitations.asciidoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ it is necessary to use the search function, like <<esql-match>>, in a <<esql-whe
112112
directly after the <<esql-from>> source command, or close enough to it.
113113
Otherwise, the query will fail with a validation error.
114114
Another limitation is that any <<esql-where>> command containing a full-text search function
115-
cannot also use disjunctions (`OR`).
115+
cannot also use disjunctions (`OR`) unless all functions used in the OR clauses are full-text functions themselves.
116116

117117
For example, this query is valid:
118118

@@ -139,6 +139,15 @@ FROM books
139139
| WHERE MATCH(author, "Faulkner") OR author LIKE "Hemingway"
140140
----
141141

142+
However this query will succeed because it uses full text functions on both `OR` clauses:
143+
144+
[source,esql]
145+
----
146+
FROM books
147+
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
148+
----
149+
150+
142151
Note that, because of <<esql-limitations-text-fields,the way {esql} treats `text` values>>,
143152
any queries on `text` fields that do not explicitly use the full-text functions,
144153
<<esql-match>> or <<esql-qstr>>, will behave as if the fields are actually `keyword` fields:

0 commit comments

Comments
 (0)