Core Concepts
Before diving into KnoxCall, it’s essential to understand the three foundational concepts that power the platform:- Clients - Who can access your routes
- Routes - Where requests go
- Secrets - How credentials are managed securely
1. Clients = Authorization (Who Can Access)
Clients are authorized IP addresses or API keys that can call your routes.What is a Client?
A client represents a trusted source that’s allowed to make requests through KnoxCall. This can be:- Your production server’s IP address
- Your office network IP range
- Your development machine
- A partner’s API server
- A mobile app backend
Why Use Clients?
Clients provide network-level security: ✅ Only whitelisted IPs can access your routes ✅ Block unauthorized access automatically ✅ Track which systems are making requests ✅ Different clients for dev, staging, and productionSimple Example
Key Concept
IP Whitelisting: KnoxCall checks every incoming request’s IP address. If it’s not on your authorized client list, the request is rejected before it even reaches your route.2. Routes = Forwarding Rules (Where Requests Go)
Routes define how incoming requests are forwarded to your backend APIs.What is a Route?
A route is a smart proxy that sits between your clients and your backend services. It:- Receives requests from authorized clients
- Applies security rules and transformations
- Forwards to your backend API
- Returns the response
The Flow
Why Use Routes?
Routes solve common API problems: ✅ Hide backend URLs - Clients never know your real endpoints ✅ Centralize credentials - API keys injected server-side ✅ Monitor everything - All requests logged automatically ✅ Add security layers - Rate limiting, IP checks, signatures ✅ Manage environments - Dev, staging, prod with one routeSimple Example
Route name:user-api
Target: https://api.example.com
Methods: GET, POST
When client calls:
3. Secrets = Encrypted Credentials (How Secrets Are Managed)
Secrets are encrypted credentials (API keys, passwords, tokens) that KnoxCall injects into your requests server-side.What is a Secret?
A secret is a secure vault entry containing sensitive data that:- Is encrypted with AES-256-GCM
- Never exposed to clients
- Injected into requests automatically
- Can be rotated without code changes
Why Use Secrets?
Secrets prevent credential exposure: ✅ Never in client code - API keys stay on KnoxCall’s servers ✅ Encrypted storage - Military-grade encryption ✅ Easy rotation - Update once, affects all routes ✅ Audit trail - Track when secrets are usedThe Problem Without Secrets
The Solution With Secrets
How It Works
- Store secret in KnoxCall:
stripe_prod_key = sk_live_abc123... - Reference in route config:
{{secret:stripe_prod_key}} - KnoxCall decrypts and injects automatically
- Backend receives real API key
- Client never sees plaintext value
How They Work Together
These three concepts work in harmony to secure and route your API traffic:Real-World Example
Let’s see how all three work together in a real scenario:Scenario: Mobile App Calling Stripe API
Goal: Your mobile app needs to charge customers via Stripe, but you can’t embed the Stripe API key in the app (users could extract it). Solution with KnoxCall:Step 1: Create a Client
Step 2: Create a Secret
Step 3: Create a Route
Step 4: Assign Client to Route
Connect “production_app_server” to “stripe-payments” route.Step 5: Make Request
Your app backend calls:What Happens
- Client Check: KnoxCall sees request from 52.123.45.67 → Authorized ✅
- Route Lookup: Loads “stripe-payments” route config
- Secret Injection: Decrypts
stripe_prod_keyand adds to headers - Forward: Sends to Stripe with real API key
- Response: Returns Stripe’s response to your app
- Logging: Records everything in audit logs
Quick Comparison
| Concept | Purpose | Example |
|---|---|---|
| Client | Who can access | 52.123.45.67 (your server’s IP) |
| Route | Where to forward | stripe-payments → https://api.stripe.com |
| Secret | Credentials to inject | stripe_prod_key = sk_live_abc123... |
Next Steps
Now that you understand the core concepts, you’re ready to start building:Quick Start Guide
Follow the step-by-step tutorial
Create Your First Route
Set up your first API route
Create Your First Client
Authorize an IP address
Create Your First Secret
Store credentials securely
Route Examples
See real-world route patterns
AI Route Setup
Let AI configure routes for you
Common Questions
Do I need all three?
For basic usage: You need at least a Route. Clients and Secrets are optional but highly recommended for security. For production: You should use all three for maximum security and flexibility.Can I have multiple clients per route?
Yes! You can assign multiple clients to a single route. For example, both your production server and staging server can access the same route.Can I use multiple secrets in one route?
Yes! You can inject multiple secrets into headers and body. For example:What if my IP changes frequently?
Use Dynamic IP client type, which allows you to use API key authentication instead of IP whitelisting. Perfect for development machines with dynamic IPs.Remember: Clients = Who, Routes = Where, Secrets = How. Master these three, and you’ve mastered KnoxCall!