Skip to content

TTL for brute force protection for public shares #11983

@jvillafanez

Description

@jvillafanez

Describe the bug

For brute force protection, we're basically storing timestamps, and those timestamps are cleanup on share access (if needed). However, if the share is accessed, the data will remain forever.
Although this isn't a problem, we might end with a lot of storage data used for nothing because such data could be obsolete.

Steps to reproduce

There are no real steps other than entering the password wrong in a password-protected share. Access to the nats storage is a bit difficult in order to check what's stored and for how long.
1.
2.
3.

Expected behavior

Obsolete data should be cleaned up one way or another.

The TTL could be the double of the configured time gap for the brute force protection (2 * STORAGE_PUBLICLINK_BRUTEFORCE_TIMEGAP, so 2 hours by default). It is expected that the TTL is refreshed on every change.

Actual behavior

Obsolete data is cleaned up only on access. If there is no access, the data will remain forever.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

Details

OCIS_XXX=somevalue
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Additional context

The data we're storing is a list of IDs + timestamp as JSON string. Per share. (Data might change in the future if additional info is required)
Up to 5 items per share by default, although it's configurable and it might grow up to 100 (there is no real limit, but more than 100 failures per share seems too permissive).

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