Module: Otto::EnvKeys::Privacy
- Defined in:
- lib/otto/env_keys.rb
Overview
Privacy-safe masked IP address Type: String (e.g., ‘192.168.1.0’) Set by: IPPrivacyMiddleware Used by: Rate limiting, analytics, logging
Constant Summary collapse
- MASKED_IP =
'otto.privacy.masked_ip'- GEO_COUNTRY =
Geo-location country code Type: String (ISO 3166-1 alpha-2) Set by: IPPrivacyMiddleware Used by: Analytics, localization
'otto.privacy.geo_country'- ASN =
Autonomous System Number of the network the client belongs to Type: String (‘AS15169’), ‘**’ when unresolved, or nil when disabled Set by: IPPrivacyMiddleware (opt-in; off unless asn_enabled) Used by: Network-operator allow/deny rules, dynamic access zones Read via: Otto::Request#asn Note: resolved from a local database against the MASKED IP, so it is subject to the same /24 equivalence country relies on.
'otto.privacy.asn'- ANONYMIZER =
Anonymizing-egress classification for the client address Type: String label, or nil when disabled. One of: ‘tor’, ‘proxy’, ‘vpn’, ‘residential_proxy’, ‘hosting’, ‘anonymous’, ‘none’, ‘’ Set by: IPPrivacyMiddleware (opt-in; off unless anonymizer_enabled) Used by: “Block anonymizers” access zones, abuse triage Read via: Otto::Request#anonymizer Note: ‘none’ means the database was consulted and did not list the address — a real answer, since these databases record only flagged addresses. ‘’ means no database answered at all. The two are not interchangeable: ‘none’ is evidence, ‘**’ is the absence of it. Contrast: this is the one lookup performed on the UNMASKED address, because anonymizer data is per-node (~/32) and a masked lookup would answer for the node’s neighbours. Only the label is retained.
'otto.privacy.anonymizer'- HASHED_IP =
Daily-rotating IP hash for session correlation Type: String (hexadecimal) Set by: IPPrivacyMiddleware Used by: Session correlation without storing IPs
'otto.privacy.hashed_ip'- CORRELATION_HASH =
Stable IP correlation hash: identifies the same visitor across days/months Type: String (hexadecimal), or nil when no correlation secret configured Set by: IPPrivacyMiddleware (computed over the FULL client IP, pre-masking, keyed with the caller-configured stable correlation_secret — NOT the daily rotation_key behind HASHED_IP) Used by: Correlating the same visitor across days/months (e.g. audit trails) without ever storing or exposing the real IP Read via: Otto::Request#ip_correlation_hash Contrast: HASHED_IP rotates daily (session-scoped); this is stable.
'otto.privacy.correlation_hash'- FINGERPRINT =
Privacy fingerprint object Type: Otto::Privacy::RedactedFingerprint Set by: IPPrivacyMiddleware Used by: Full privacy context access
'otto.privacy.fingerprint'