feat(access): add country and ASN rules #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/geoip-rules"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
feat/domains).Changes
mmdb2_decoder ~> 3.0(Apache-2.0, pure Elixir, no processes; last release 2022 because the format is frozen, repository active, and it is whatgeolixbuilds on).TraefikControl.GeoIp: loadsTRAEFIK_CONTROL_GEOIP_COUNTRY_DBandTRAEFIK_CONTROL_GEOIP_ASN_DBat startup and again when a file changes (checked everyTRAEFIK_CONTROL_GEOIP_RELOAD_SECONDS, default 60,0never). A file that cannot be read or parsed leaves the loaded database in place and is logged once. Handles Country and City databases, plaincountrystrings andasnstrings.country,country_not,asn(values normalized toDE,AS13335). Creating or changing one needs its database; switching an existing rule on or off does not.country/asnrule matches it, a denycountry_notrule matches it, an allowcountry_notrule never does.match: country|country_not|asn, text values), README.resource_rules.matchis a plain string column.Verification
mix format --check-formatted,mix compile --warnings-as-errors,mix credo --strict,mix dialyzer: clean.mix test: 1492 passed on SQLite and on PostgreSQL.test/support, so no data files are committed; the reader was also run against MaxMind's published test files (Country, City, ASN; IPv4 and IPv6).deny country_not SEin the UI; the node's real forwardAuth address answered 200 for a Swedish address and 403 for GB, IT, an unlisted public address and a private one.Risks
mmdb2_decoder3.0.1 compiles with warnings on Elixir 1.20 (unpinnedsize/1variables); it works, but a future Elixir that makes this an error would need a patch or a different reader.TRAEFIK_CONTROL_TRUST_PROXY); VPNs and proxies hide it.mix hex.auditreports an advisory forbandit 1.12.5(HTTP/2 deadline reset), which is already the latest version and predates this change.