-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yml
More file actions
60 lines (54 loc) · 1.75 KB
/
config.example.yml
File metadata and controls
60 lines (54 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# AuthGuard Configuration Example
# Copy this to config.yml and adjust for your environment
# Server Configuration
server:
port: "8080"
host: "0.0.0.0"
read_timeout: "10s"
write_timeout: "10s"
idle_timeout: "120s"
shutdown_timeout: "30s"
max_header_bytes: 1048576 # 1MB
# Cache Configuration (Redis with memory fallback)
cache:
type: "redis" # Options: "redis", "memory"
redis_url: "redis://:authguard_redis_password@localhost:6379"
redis_password: "authguard_redis_password"
redis_db: 0
max_keys: 1000 # For memory cache
cleanup_interval: "10m" # For memory cache
default_ttl: "1h" # Default TTL for cached items
# Authentication Providers (composable)
providers:
- firebase
- ip_whitelist
- api_key
# Logging Configuration
logging:
level: "info" # Options: debug, info, warn, error
format: "json" # Options: json, text
# Metrics Configuration
metrics:
enabled: true
port: "9090"
path: "/metrics"
# Provider Configuration (via environment variables)
#
# Firebase Provider:
# AUTHGUARD_FIREBASE_CREDENTIALS_BASE64="<base64-encoded-service-account-json>"
# AUTHGUARD_FIREBASE_CREDENTIALS_PATH="/path/to/service-account.json"
#
# IP Whitelist Provider:
# AUTHGUARD_IP_WHITELIST_ALLOWED_IPS="127.0.0.1,::1,192.168.1.0/24"
# AUTHGUARD_IP_WHITELIST_PROXY_HEADER="X-Real-IP"
# AUTHGUARD_IP_WHITELIST_TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12"
#
# API Key Provider:
# AUTHGUARD_API_KEY_KEYS="key1:user1:email1@example.com:User One,key2:user2:email2@example.com:User Two"
# AUTHGUARD_API_KEY_HEADER_NAME="X-API-Key"
#
# Cache Configuration (override YAML):
# AUTHGUARD_CACHE_TYPE="redis"
# AUTHGUARD_REDIS_URL="redis://:password@localhost:6379"
# AUTHGUARD_REDIS_PASSWORD="password"
# AUTHGUARD_REDIS_DB="0"