End-to-End Tenant Demo: Webhook Data Lake
This guide walks through a production-grade, end-to-end tenant application deployed declaratively using the Okustera Terraform Provider.
A live, publicly accessible instance of this workload is published at:
🌐 Live Demo Portal: https://demo.okustera.com
1. Architectural Overview
The demo provisions an isolated tenant project, exposes a webhook event ingestion service behind the Okustera API Gateway, and streams date-partitioned JSON events into an S3-compatible data lake:
2. Multi-Tenancy & Isolation Boundaries
All components of this workload run inside dedicated tenant-scoped resources:
- Tenant Project:
demo_tenant(isolated project workspace) - Tenant User:
demo_userwithmemberRBAC role - Managed Kubernetes Cluster:
my-k8s-cluster - Tenant Workload Namespace:
tenant-demo - Object Storage Bucket:
webhook-lake(private ACL) - Managed API Gateway Route:
okustera-demo-routebound specifically totenant-demo
3. Terraform Implementation Walkthrough
The demo infrastructure is defined declaratively across two Terraform configurations:
3.1 Tenant Project & User Provisioning (main.tf)
terraform {
required_providers {
okustera = {
source = "okustera/okustera"
}
}
}
provider "okustera" {
endpoint = "https://portal.okustera.com/api/v1"
password = var.admin_password
}
# 1. Provision a dedicated tenant project
resource "okustera_tenant" "demo_tenant" {
name = "tenant_enterprise_prod"
description = "Enterprise Production Tenant"
enabled = true
}
# 2. Provision a tenant member user
resource "okustera_user" "demo_user" {
name = "demo_user"
password = var.demo_user_password
default_project_id = okustera_tenant.demo_tenant.id
enabled = true
}
# 3. Assign the member RBAC role
resource "okustera_role_assignment" "demo_user_member" {
project_id = okustera_tenant.demo_tenant.id
user_id = okustera_user.demo_user.id
role_name = "member"
}
3.2 S3 Data Lake, API Gateway Route & Workload Deployment (webhook_pipeline.tf)
# 1. Provision an S3-compatible bucket for the webhook data lake
resource "okustera_s3_bucket" "webhook_lake" {
name = "webhook-lake"
acl = "private"
versioning = true
}
# 2. Expose the webhook ingestion service via Okustera API Gateway
resource "okustera_apisix_route" "demo_route" {
name = "okustera-demo-route"
domain = "demo.okustera.com"
path = "/*"
upstream = {
service_name = "webhook-demo"
port = 8080
timeout = 30
}
tls_enabled = true
cluster_issuer = "letsencrypt-prod"
waf_enabled = true
waf_mode = "Blocking"
cors_enabled = true
}
Deploy the Kubernetes Secret and Deployment into your tenant cluster (my-k8s-cluster) using standard kubectl manifests:
apiVersion: v1
kind: Namespace
metadata:
name: tenant-demo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: webhook-demo
namespace: tenant-demo
spec:
replicas: 2
selector:
matchLabels:
app: webhook-demo
template:
metadata:
labels:
app: webhook-demo
spec:
containers:
- name: webhook-engine
image: artifacts.okustera.com/demo-project/webhook-demo:v1.0.0
ports:
- containerPort: 8080
envFrom:
- secretRef:
name: webhook-demo-secrets
---
apiVersion: v1
kind: Service
metadata:
name: webhook-demo
namespace: tenant-demo
spec:
selector:
app: webhook-demo
ports:
- port: 8080
targetPort: 8080
Create the runtime secret out-of-band before applying the deployment:
kubectl create secret generic webhook-demo-secrets -n tenant-demo \
--from-literal=S3_ENDPOINT_URL="https://s3.okustera.com" \
--from-literal=S3_ACCESS_KEY_ID="<YOUR_S3_ACCESS_KEY>" \
--from-literal=S3_SECRET_ACCESS_KEY="<YOUR_S3_SECRET_KEY>" \
--from-literal=S3_BUCKET_NAME="webhook-lake" \
--from-literal=WEBHOOK_API_KEY="<YOUR_WEBHOOK_API_KEY>"
4. Security Model: API Key Authentication & Event Partitioning
4.1 Ingestion Security & Validation
Incoming webhook POST requests to /api/v1/webhooks must supply the configured API key via the X-API-Key header (or Authorization: Bearer <token>).
- Unauthenticated Requests (
401 Unauthorized): If the header is missing or invalid, the ingestion service immediately rejects the request. - Authenticated Requests (
202 Accepted): Upon validation, the service:- Generates an immutable event ID:
evt_<hex12>. - Calculates the raw SHA-256 payload checksum.
- Partitions the event path by UTC date:
events/YYYY-MM-DD/{event_id}.json. - Uploads the JSON payload with S3 metadata headers directly to the
webhook-lakebucket.
- Generates an immutable event ID:
4.2 Sample Ingestion Request & Response
curl -X POST https://demo.okustera.com/api/v1/webhooks \
-H "Content-Type: application/json" \
-H "X-API-Key: <YOUR_WEBHOOK_API_KEY>" \
-d '{
"event": "invoice.paid",
"customer": "cust_enterprise_88",
"amount": 2450.00,
"currency": "EUR"
}'
Response (HTTP 202 Accepted):
{
"status": "accepted",
"event_id": "evt_94b1ef8a3c10",
"event_type": "invoice.paid",
"s3_bucket": "webhook-lake",
"partition_key": "events/2026-09-15/evt_94b1ef8a3c10.json",
"s3_stored": true,
"received_at": "2026-09-15T14:50:00.000000+00:00",
"signature_valid": true
}
5. Live Interactive UI & Webhook Simulator
Navigating to https://demo.okustera.com provides an interactive web interface:
- Real-Time Webhook Simulator: Fire synthetic Stripe, GitHub, or Shopify events directly from your browser to test API gateway routing and key verification.
- Data Lake Inspector: Inspect recently ingested events, verify SHA-256 signatures, and explore date-partitioned S3 storage objects in real time.
- Architecture Visualizer: View live status indicators for the tenant project, Kubernetes namespace, API Gateway route, and S3 bucket.