Creating Your First Client
Add IP-based access control to your routes by creating and assigning clients.What is a Client?
A client in KnoxCall represents an authorized IP address or IP range that can access your routes. This provides network-level security in addition to API key authentication.Important: Clients are NOT the same as API keys!
- API keys = Authentication (who you are)
- Clients = Authorization (where you’re calling from)
Why Use Clients?
Without clients (client IP authorization disabled):- Anyone with your API key can call your routes from anywhere
- Higher risk if API key is leaked
- Only whitelisted IPs can call routes, even with a valid API key
- Defense-in-depth security model
- Useful for server-to-server integrations
Client Types
Server Clients
Use case: Backend servers with static IPs Examples:- Your production app server (
52.123.45.67) - Office network (
192.168.1.0/24) - Cloud function with fixed egress IP
User Clients
Use case: Development machines, mobile devices Examples:- Your laptop for testing
- Team member workstations
- VPN exit nodes
Create a Client
Step 1: Find Your IP Address
First, determine what IP address to whitelist: Your current IP:Step 2: Navigate to Clients
- Click Resources in sidebar
- Select Clients
- Click Add Client
Step 3: Fill in Client Details
Client Name:- Server: Backend servers, static IPs
- User: Development machines, laptops
192.168.1.0/24
Multiple IPs (comma-separated):
Step 4: Save
Click Create Client Your client is created but NOT yet assigned to any routes.Assign Client to a Route
Clients must be assigned to specific routes and environments to grant access.Step 1: Open Your Route
- Navigate to Routes
- Click your route (e.g., “my-first-route”)
Step 2: Go to Environment Clients Tab
Click the Environment Clients tab This shows which clients are allowed for each environment.Step 3: Assign Client
- Find the environment (e.g., “production”)
- Click Assign Clients
- Select your client from the list
- Click Save
Test Client Access
From Authorized IP
From Unauthorized IP
Client Connectivity Check
KnoxCall can ping your server clients to verify they’re online.Run Connectivity Test
- Go to Clients page
- Find your server client
- Click Ping button
Ping requires ICMP to be allowed. If your server blocks ICMP, the ping will fail even if the server is online.
Advanced: CIDR Ranges
CIDR notation allows you to whitelist entire subnets. Common ranges:- Office network:
192.168.1.0/24 - AWS VPC:
10.0.0.0/16 - Cloud provider IP range: Specific to provider
Disable Client IP Authorization
To allow requests from any IP (with valid API key only):- Edit your route
- Find Requires Clients toggle
- Turn it OFF
- Save
Multiple Clients per Route
You can assign multiple clients to a route: Example scenario:office-network→192.168.1.0/24aws-prod-server-1→52.123.45.67aws-prod-server-2→52.123.45.68
Environment-Specific Clients
Clients are assigned per environment. This lets you use different IPs for dev/staging/production: Development environment:dev-laptop→203.45.67.89
staging-server→34.56.78.90
prod-server-1→52.123.45.67prod-server-2→52.123.45.68
Common Issues
”IP not authorized” Error
Causes:- Your IP isn’t whitelisted
- Client not assigned to route environment
- Client is disabled
- Your IP changed (mobile/home networks)
- Request is going through proxy/CDN with different IP
- Check actual IP:
curl https://api.ipify.org - Compare with whitelisted IP in client settings
- Verify client is assigned to route + environment
- Check client is enabled
- Look at request logs to see incoming IP
Client Shows Offline
Causes:- ICMP (ping) blocked by firewall
- Server is actually down
- Network routing issues
Multiple IPs Needed
Solution: Use CIDR ranges or comma-separated IPsIP Changes Frequently
For development:- Use test API keys (skip IP check)
- Or temporarily disable
requires_clients
- Use static IPs (elastic IPs on AWS, etc.)
- Or use VPN with fixed egress IP
- Or use cloud provider IP ranges
Security Best Practices
✅ Do:- Use static IPs for production clients
- Combine with API key authentication
- Use CIDR ranges for office networks
- Enable connectivity monitoring
- Document client purpose in description
- Use
0.0.0.0/0(allows all IPs - defeats the purpose) - Add untrusted IPs to production routes
- Forget to remove old/unused clients
- Share clients across unrelated routes
Next Steps
Now that you understand clients:Environments
Assign different clients per environment
Request Signing
Add HMAC signatures for extra security
Secrets
Add encrypted credentials to requests
Rate Limiting
Limit requests per client
Related Concepts
- API Keys: Authentication layer (who you are)
- Clients: Authorization layer (where you’re calling from)
- Environments: Different client sets for dev/staging/prod
- Request Signing: Additional verification via HMAC signatures
📊 Statistics
- Level: beginner
- Time: 5 minutes
🏷️ Tags
clients, ip-whitelist, security, authorization