Skip to content

[Server] Do not return the JSON parser's error text for a malformed request body #2352

Backlog

Description

@timothyw553

On the UC, AUTH, SCIM and DELTA surfaces, a request body that cannot be read gets the Jackson converter's own error text back: the exception class, the mapped types and the source position (the comment in ArmeriaServerBuilder.register says so). Only the Iceberg surface rewrites it into a clean message.

Jackson messages can also include a piece of the body, such as the offending token. For a credential create, the body holds a secret: the secret_access_key of an s3_compatible credential or the private_key of a gcp_service_account_key credential. I have not checked what fragments a real malformed credential body produces, so a first step is to try that.

Expected: a malformed body on these surfaces gets a fixed message that does not include the parser's text or any part of the body.

Found in the review of #2260.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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