IP Binding
When an API token is created, Enver records the IP address of the request. Every subsequent request using that token is validated against the stored IP. A stolen token cannot be used from a different machine.How it works
IP source headers
The middleware reads the IP from these headers in order:x-forwarded-for(set by reverse proxies / load balancers)x-real-ip(set by Nginx)- Falls back to
"unknown"
Known edge cases
Best practices
- Create dedicated tokens per machine / CI runner
- Use short TTL (
ttlDays: 7) for short-lived jobs - Revoke tokens immediately if a machine is decommissioned or compromised