Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add S3Repository.LEGACY_MD5_CHECKSUM_CALCULATION to list of repository-s3 settings ([#19788](https://github.com/opensearch-project/OpenSearch/pull/19788))
- Fix NullPointerException when restoring remote snapshot with missing shard size information ([#19684](https://github.com/opensearch-project/OpenSearch/pull/19684))
- Fix NPE of ScriptScoreQuery ([#19650](https://github.com/opensearch-project/OpenSearch/pull/19650))
- Fix GRPC Bulk ([#19937](https://github.com/opensearch-project/OpenSearch/pull/19937))

### Dependencies
- Update to Gradle 9.2 ([#19575](https://github.com/opensearch-project/OpenSearch/pull/19575)) ([#19856](https://github.com/opensearch-project/OpenSearch/pull/19856))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ public Map<String, Supplier<AuxTransport>> getSecureAuxTransports(
if (client == null || queryRegistry == null) {
throw new RuntimeException("createComponents must be called first to initialize server provided resources.");
}

return Collections.singletonMap(GRPC_SECURE_TRANSPORT_SETTING_KEY, () -> {
List<BindableService> grpcServices = new ArrayList<>(
List.of(new DocumentServiceImpl(client), new SearchServiceImpl(client, queryUtils))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private FetchSourceContextProtoUtils() {
* @return A FetchSourceContext object based on the request parameters, or null if no source parameters are provided
*/
public static FetchSourceContext parseFromProtoRequest(org.opensearch.protobufs.BulkRequest request) {
Boolean fetchSource = true;
Boolean fetchSource = null;
String[] sourceExcludes = null;
String[] sourceIncludes = null;

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ private BulkRequestProtoUtils() {
* Similar to {@link RestBulkAction#prepareRequest(RestRequest, NodeClient)}
* Please ensure to keep both implementations consistent.
*
* Note: Unlike REST API, gRPC does not enforce the allowExplicitIndex security setting.
* In REST, this setting provides network-level security by allowing proxies to filter
* requests based on URL paths. In gRPC, both default_index and x_index are in the
* request body, making this check ineffective for network-level security.
* For gRPC security, use mTLS, gRPC interceptors, or service mesh policies instead.
*
* @param request the request to execute
* @return a future of the bulk action that was executed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,9 @@ public void testParseFromProtoRequestWithNoSourceParams() {
FetchSourceContext context = FetchSourceContextProtoUtils.parseFromProtoRequest(request);

// Verify the result
// The implementation returns a default FetchSourceContext with fetchSource=true
// and empty includes/excludes arrays when no source parameters are provided
assertNotNull("Context should not be null", context);
assertTrue("fetchSource should be true", context.fetchSource());
assertArrayEquals("includes should be empty", Strings.EMPTY_ARRAY, context.includes());
assertArrayEquals("excludes should be empty", Strings.EMPTY_ARRAY, context.excludes());
// When no source parameters are provided, should return null to match REST API behavior
// This prevents the "get" field from being returned in update/upsert responses
assertNull("Context should be null when no source parameters provided", context);
}

public void testFromProtoWithFetch() {
Expand Down
Loading
Loading