Skip to content

Commit 2ad3b2a

Browse files
Merge branch 'main' into StatementParserTests
2 parents 452cae1 + 54317f4 commit 2ad3b2a

File tree

72 files changed

+2363
-541
lines changed

Some content is hidden

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

72 files changed

+2363
-541
lines changed

docs/changelog/120168.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120168
2+
summary: Reduce Data Loss in System Indices Migration
3+
area: Infra/Core
4+
type: bug
5+
issues: []

docs/changelog/120542.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 120542
2+
summary: "Feat: add a user-configurable timeout parameter to the `_resolve/cluster`\
3+
\ API"
4+
area: Search
5+
type: enhancement
6+
issues: []

docs/changelog/120551.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120551
2+
summary: Set default reranker for text similarity reranker to Elastic reranker
3+
area: Ranking
4+
type: enhancement
5+
issues: []

docs/changelog/120842.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120842
2+
summary: Remove Elastic Inference Service feature flag and deprecated setting
3+
area: Inference
4+
type: enhancement
5+
issues: []

docs/changelog/120913.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120913
2+
summary: Automatically rollover legacy .ml-anomalies indices
3+
area: Machine Learning
4+
type: upgrade
5+
issues: []

docs/changelog/120974.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 120974
2+
summary: Tweak `copy_to` handling in synthetic `_source` to account for nested objects
3+
area: Mapping
4+
type: bug
5+
issues:
6+
- 120831

docs/changelog/121048.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 121048
2+
summary: Updating Inference Update API documentation to have the correct PUT method
3+
area: Machine Learning
4+
type: bug
5+
issues: []

libs/entitlement/bridge/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ tasks.named('jar').configure {
1919
}
2020
}
2121

22+
// The bridge only uses things within the jdk, but the checker
23+
// needs to have many forbidden apis in its signatures. Suppressing
24+
// each use of forbidden apis would be tedious and not useful.
2225
tasks.withType(CheckForbiddenApisTask).configureEach {
23-
replaceSignatureFiles 'jdk-signatures'
26+
enabled = false
2427
}

libs/entitlement/bridge/src/main/java/org/elasticsearch/entitlement/bridge/EntitlementChecker.java

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
package org.elasticsearch.entitlement.bridge;
1111

12+
import java.io.File;
1213
import java.io.InputStream;
1314
import java.io.PrintStream;
1415
import java.io.PrintWriter;
@@ -47,7 +48,9 @@
4748
import java.nio.channels.DatagramChannel;
4849
import java.nio.channels.ServerSocketChannel;
4950
import java.nio.channels.SocketChannel;
51+
import java.nio.charset.Charset;
5052
import java.nio.file.Path;
53+
import java.nio.file.attribute.UserPrincipal;
5154
import java.security.cert.CertStoreParameters;
5255
import java.util.List;
5356
import java.util.Locale;
@@ -63,7 +66,7 @@
6366
@SuppressWarnings("unused") // Called from instrumentation code inserted by the Entitlements agent
6467
public interface EntitlementChecker {
6568

66-
////////////////////
69+
/// /////////////////
6770
//
6871
// Exit the JVM process
6972
//
@@ -74,7 +77,7 @@ public interface EntitlementChecker {
7477

7578
void check$java_lang_System$$exit(Class<?> callerClass, int status);
7679

77-
////////////////////
80+
/// /////////////////
7881
//
7982
// ClassLoader ctor
8083
//
@@ -85,7 +88,7 @@ public interface EntitlementChecker {
8588

8689
void check$java_lang_ClassLoader$(Class<?> callerClass, String name, ClassLoader parent);
8790

88-
////////////////////
91+
/// /////////////////
8992
//
9093
// SecureClassLoader ctor
9194
//
@@ -96,7 +99,7 @@ public interface EntitlementChecker {
9699

97100
void check$java_security_SecureClassLoader$(Class<?> callerClass, String name, ClassLoader parent);
98101

99-
////////////////////
102+
/// /////////////////
100103
//
101104
// URLClassLoader constructors
102105
//
@@ -111,7 +114,7 @@ public interface EntitlementChecker {
111114

112115
void check$java_net_URLClassLoader$(Class<?> callerClass, String name, URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory);
113116

114-
////////////////////
117+
/// /////////////////
115118
//
116119
// "setFactory" methods
117120
//
@@ -124,7 +127,7 @@ public interface EntitlementChecker {
124127

125128
void check$javax_net_ssl_SSLContext$$setDefault(Class<?> callerClass, SSLContext context);
126129

127-
////////////////////
130+
/// /////////////////
128131
//
129132
// Process creation
130133
//
@@ -133,7 +136,7 @@ public interface EntitlementChecker {
133136

134137
void check$java_lang_ProcessBuilder$$startPipeline(Class<?> callerClass, List<ProcessBuilder> builders);
135138

136-
////////////////////
139+
/// /////////////////
137140
//
138141
// System Properties and similar
139142
//
@@ -142,7 +145,7 @@ public interface EntitlementChecker {
142145

143146
void check$java_lang_System$$clearProperty(Class<?> callerClass, String key);
144147

145-
////////////////////
148+
/// /////////////////
146149
//
147150
// JVM-wide state changes
148151
//
@@ -219,7 +222,7 @@ public interface EntitlementChecker {
219222

220223
void check$java_net_URLConnection$$setContentHandlerFactory(Class<?> callerClass, ContentHandlerFactory fac);
221224

222-
////////////////////
225+
/// /////////////////
223226
//
224227
// Network access
225228
//
@@ -416,7 +419,7 @@ public interface EntitlementChecker {
416419

417420
void check$sun_nio_ch_DatagramChannelImpl$receive(Class<?> callerClass, DatagramChannel that, ByteBuffer dst);
418421

419-
////////////////////
422+
/// /////////////////
420423
//
421424
// Load native libraries
422425
//
@@ -484,4 +487,27 @@ public interface EntitlementChecker {
484487
void check$java_lang_foreign_SymbolLookup$$libraryLookup(Class<?> callerClass, Path path, Arena arena);
485488

486489
void check$java_lang_ModuleLayer$Controller$enableNativeAccess(Class<?> callerClass, ModuleLayer.Controller that, Module target);
490+
491+
/// /////////////////
492+
//
493+
// File access
494+
//
495+
496+
void check$java_util_Scanner$(Class<?> callerClass, File source);
497+
498+
void check$java_util_Scanner$(Class<?> callerClass, File source, String charsetName);
499+
500+
void check$java_util_Scanner$(Class<?> callerClass, File source, Charset charset);
501+
502+
void check$java_io_FileOutputStream$(Class<?> callerClass, String name);
503+
504+
void check$java_io_FileOutputStream$(Class<?> callerClass, String name, boolean append);
505+
506+
void check$java_io_FileOutputStream$(Class<?> callerClass, File file);
507+
508+
void check$java_io_FileOutputStream$(Class<?> callerClass, File file, boolean append);
509+
510+
void check$java_nio_file_Files$$probeContentType(Class<?> callerClass, Path path);
511+
512+
void check$java_nio_file_Files$$setOwner(Class<?> callerClass, Path path, UserPrincipal principal);
487513
}

libs/entitlement/qa/entitled-plugin/src/main/java/org/elasticsearch/entitlement/qa/entitled/EntitledActions.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
import org.elasticsearch.core.SuppressForbidden;
1313

14+
import java.io.IOException;
15+
import java.nio.file.Files;
16+
import java.nio.file.Path;
17+
import java.nio.file.attribute.UserPrincipal;
18+
1419
public final class EntitledActions {
1520
private EntitledActions() {}
1621

@@ -19,4 +24,7 @@ static void System_clearProperty(String key) {
1924
System.clearProperty(key);
2025
}
2126

27+
public static UserPrincipal getFileOwner(Path path) throws IOException {
28+
return Files.getOwner(path);
29+
}
2230
}

0 commit comments

Comments
 (0)