[SEC]: All inter-service communication must use mTLS with certificate rotation, API gateways must validate JWT with audience claims, and database connections must use SSL with certificate verification

%% CryptoFixyUp Lab - Complete Architecture Wiring Diagram %% Security: mTLS between all services, JWT validation at gateways, SSL for DB connections

flowchart TB subgraph Clients A[Web Portal\nNext.js] -->|HTTPS/TLS1.3| B[API Gateway\nKong] C[Mobile App\nKotlin] -->|mTLS| B end

text
subgraph BackendServices
    B -->|mTLS| D[Auth Service\nGo]
    B -->|mTLS| E[Campaign Service\nGo]
    B -->|mTLS| F[Vulnerability Service\nGo]
    B -->|mTLS| G[Analysis Service\nGo]
    B -->|mTLS| H[Reporting Service\nGo]

    D -->|JWT Validation| E
    D -->|JWT Validation| F
    D -->|JWT Validation| G
    D -->|JWT Validation| H

    E -->|gRPC/mTLS| I[Kafka\nEvent Bus]
    F -->|gRPC/mTLS| I
    G -->|gRPC/mTLS| I
    H -->|gRPC/mTLS| I

    E -->|SSL/TLS| J[(PostgreSQL\nPrimary)]
    F -->|SSL/TLS| J
    G -->|SSL/TLS| J
    H -->|SSL/TLS| J
    J -->|Replication\nSSL| K[(PostgreSQL\nReplica)]
end

subgraph External
    L[Blockchain Nodes\nETH/SOL/etc] -->|RPC/HTTPS| G
    M[MythX API] -->|HTTPS| G
    N[Slither] -->|Local| G
    O[Chainalysis] -->|HTTPS| F
    P[Stripe API] -->|HTTPS| E
end

subgraph Infrastructure
    Q[Kubernetes\nEKS] --> R[Istio\nService Mesh]
    R --> S[Calico\nNetwork Policies]
    S --> T[Cert Manager\nLet's Encrypt]
    T --> U[Vault\nSecrets]
    U --> V[Cloudflare\nWAF/DDoS]
end

subgraph Monitoring
    W[Prometheus] --> X[Grafana]
    Y[Loki] --> X
    Z[Sentry] --> C
    Z --> A
end

style A fill:#f9f,stroke:#333
style C fill:#f9f,stroke:#333
style B fill:#bbf,stroke:#333
style D fill:#9f9,stroke:#333
style E fill:#9f9,stroke:#333
style F fill:#9f9,stroke:#333
style G fill:#9f9,stroke:#333
style H fill:#9f9,stroke:#333
style J fill:#ff9,stroke:#333
style K fill:#ff9,stroke:#333
style I fill:#99f,stroke:#333
style Q fill:#f96,stroke:#333
style R fill:#f96,stroke:#333
style S fill:#f96,stroke:#333
style T fill:#f96,stroke:#333
style U fill:#f96,stroke:#333
style V fill:#f96,stroke:#333
text
```yaml
# k8s/wire-connections.yaml - Service-to-service connection definitions
---
# Auth Service to Database
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: auth-db
  namespace: cryptofixyup-prod
spec:
  host: postgres.cryptofixyup-prod.svc.cluster.local
  trafficPolicy:
    tls:
      mode: ISTIO_MUTUAL
    connectionPool:
      tcp:
        maxConnections: 100
      http:
        http2MaxRequests: 1000
        maxRequestsPerConnection: 10
    outlierDetection:
      consecutiveErrors: 5
      interval: 10s
      baseEjectionTime: 30s
      maxEjectionPercent: 50
---
# Campaign Service to Kafka
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: campaign-kafka
  namespace: cryptofixyup-prod
spec:
  host: kafka.cryptofixyup-prod.svc.cluster.local
  trafficPolicy:
    tls:
      mode: ISTIO_MUTUAL
    connectionPool:
      tcp:
        maxConnections: 50
---
# External API Connections (with egress gateway)
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: mythx-external
  namespace: cryptofixyup-prod
spec:
  hosts:
    - api.mythx.io
  ports:
    - number: 443
      name: https
      protocol: HTTPS
  resolution: DNS
  location: MESH_EXTERNAL
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: mythx-external
  namespace: cryptofixyup-prod
spec:
  host: api.mythx.io
  trafficPolicy:
    tls:
      mode: SIMPLE
      sni: api.mythx.io
Aug 28, 9:58am
Aug 28, 9:59am

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. It cannot be edited because it contains private files.

Vibe can make mistakes. Check answers. Learn more