Skip to content

Validate user data depth to prevent Elasticsearch issues #2676

Open
@bhalsey

Description

@bhalsey

Validate user data depth to prevent Elasticsearch issues

Description

If the json data in a User.data field has a depth > 20, Elasticsearch will not index it. This causes issues in a reindex and results in high CPU usage. We should not allow data with a depth > 20 to prevent this. There may be additional improvements to be made in the reindex operation (I suspect it's continuously retrying this operation).

The max depth limit is similar to the max number of fields limit in Elasticsearch. See also

Observed versions

Observed in 1.46.0

Affects versions

Steps to reproduce

Expected behavior

Screenshots

If applicable, add screenshots to help explain your problem. Delete this section if it is not applicable.

Platform

Linux and Elasticsearch 7.6.1

Related

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions