[methods.api_key]
enabled = true
allow_multiple_keys = true
default_expiry = "30d"
max_keys_per_user = 5
[methods.api_key.generation]
key_length = 64
include_prefix = true
prefix = "ak"
entropy_source = "crypto_random"
[methods.api_key.validation]
hash_algorithm = "argon2"
case_sensitive = true
min_length = 32
max_length = 128
[methods.api_key.rate_limit]
enabled = true
requests_per_minute = 1000
requests_per_hour = 50000
burst_limit = 100
[methods.api_key.permissions]
default_scopes = ["read"]
available_scopes = [
"read",
"write",
"admin",
"user:profile",
"user:sessions",
]
scope_inheritance = true
admin_scope_required_for_creation = true
[methods.api_key.headers]
header_names = [
"X-API-Key",
"Authorization",
"X-Auth-Token"
]
allow_query_param = false
query_param_name = "api_key"
[methods.api_key.security]
store_hash_only = true
require_https = true
log_usage = true
auto_rotation_enabled = false
rotation_interval = "90d"
rotation_warning_days = 7
[methods.api_key.monitoring]
track_usage = true
alert_on_suspicious_usage = true
suspicious_threshold_multiplier = 5.0
track_ip_geolocation = false
alert_on_new_countries = false
track_failed_attempts = true
max_failed_attempts = 10
lockout_duration = "1h"
[methods.api_key.cleanup]
auto_cleanup_enabled = true
cleanup_interval = "1d"
remove_unused_after = "180d"
remove_expired_after = "30d"