Skip to content

[BUG] DDBClient does not validate request fields #154

@dbwiddis

Description

@dbwiddis

What is the bug?

Fields such as the id and index are not validated in the DynamoDB client.

This impacts parsing of the JSON text generated to serialize a DDB response into an OpenSearch response object.

How can one reproduce the bug?

Attempt to use a document ID or index containing characters which break JSON parsing, such as a single quote. Get a 500 error when the parsing fails.

What is the expected behavior?

User receives a 400-series error describing what is invalid.

Do you have any additional context?

Searching the OpenSearch codebase for an ActionRequestValidationException shows some validations.

Here the DocWriteRequest has a 512-character validation.

IndexRequest has other validations.

So does UpdateRequest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions