Skip to content

[FEATURE] Support Decision Scope #271

Description

@david-garcia-garcia

Is your feature request related to a problem? Please describe. 🐛

CrowdSec sends decisions with a scope field that can be:

"Ip" - for individual IP addresses
"Range" - for CIDR blocks like 192.168.1.0/24
"Country" - for country-based blocks
"AS" - for ASN-based blocks

This is totally ignored in current implementation, everything is treated as if it were an Ip Scope.

Describe the solution you'd like

Support Country, Range and AS, proposal:

  • Range should be straightforward to implement and would require a radix tree that is updated realtime to perform optimally.
  • AS and Country: this middleware's purpose is NOT to geolocate incoming requests, but it could rely on an existing header (set by another middleware) to know the request country.

I already have most of the pieces to complete this, including the radix tree implementation (without CIDR removal though...) in the geoblock plugin: https://github.com/david-garcia-garcia/traefik-geoblock I believe implementing all this should be quite straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions