Prerequisites
Keelstacklabs runs inside EKS/GKE/ECS clusters with read-only OAuth or IAM credentials for Stripe, Modern Treasury, Adyen, NetSuite, and PostgreSQL/Snowflake ledgers.
CLI & SDK setup
Copy
pip install keelstacklabs-sdk
keelctl auth verify --tenant acme-treasury
keelctl rails test --stripe --netsuite
1. Install the In-VPC Ledger Tap & Tokenizer
Deploy the collector inside your VPC subnet. PANs, bank routing numbers, and tax IDs are tokenized with HMAC-SHA256 before AI parsing runs.
helm install
Copy
helm repo add keelstacklabs https://charts.keelstacklabs.dev
helm repo update
helm upgrade --install keelstacklabs-ledger keelstacklabs/ledger-agent \
--namespace keelstacklabs-system \
--create-namespace \
--set auth.connectorKey="ks_fin_replace_with_key" \
--set redaction.mode="hmac_sha256_preserve_shape" \
--set privatelink.enabled=true
2. Terraform KMS & S3 Object Lock Audit Vault
Provision customer-managed KMS encryption and WORM-compliant S3 Object Lock storage for signed Ed25519 SOX reconciliation receipts.
main.tf
Copy
module "keelstacklabs_audit_vault" {
source = "keelstacklabs/fintech-vault/aws"
version = "~> 1.4"
cluster_oidc_provider_arn = module.eks.oidc_provider_arn
namespace = "keelstacklabs-system"
object_lock_retention_yrs = 7
kms_key_arn = aws_kms_key.sox_receipts.arn
}
3. Declarative FinancialPolicyGate YAML
Enforce strict double-entry parity, AI confidence minimums, duplicate invoice blocking, and dual-approval exposure ceilings across your payment pipelines.
.keelstacklabs/fintech-gate.yaml
Copy
apiVersion: keelstacklabs.dev/v1
kind: FinancialPolicyGate
metadata:
name: b2b-treasury-settlement
namespace: production
spec:
rails: ["stripe_treasury", "modern_treasury_ach", "netsuite"]
invariants:
requireBalancedDoubleEntry: true
maxUnreconciledVarianceUsd: 0.00
minAiExtractionConfidencePct: 99.0
autoReleaseMaxBatchUsd: 100000
controls:
blockDuplicateInvoiceHashes: true
requireControllerDualApproval: true
exportObjectLockReceipt: true
4. Python SDK Pre-Payout Gate Verification
Verify every ACH or wire payment order synchronously against Keelstacklabs invariants before dispatching funds to your bank rail.
payout_guard.py
Copy
from keelstacklabs import GateClient
client = GateClient(gate="b2b-treasury-settlement")
verdict = client.verify_payout_batch(
batch_id="batch_4419",
currency="USD",
entries=normalized_entries,
)
if verdict.status != "AUTO_POST":
raise RuntimeError(f"Payout blocked: {verdict.violated_rules}")