Use configuration variable
Fix handling of allowed clients
cast configuration variable
Trim IDs