GoWindGoWind
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
Home
Framework
GoWind Toolkit
  • Open Source

    • GoWind Admin (Admin Platform)
    • GoWind CMS (Content Management)
    • GoWind UBA (Behavior Analytics)
    • GoWind Shop (E-commerce)
    • GoWind Kanban (Kanban Boards)
    • GoWind Ledger (Personal Finance)
    • GoWind ShortPlay (Short Drama)
    • GoWind Ops (Operations Platform)
    • RushWind (Rust Ecosystem)
  • Open Core (Community + Enterprise)

    • GoWind OA (Office Collaboration)
    • GoWind ERP (Procure-to-Pay)
    • GoWind WMS (Warehousing)
  • Commercial

    • GoWind IM (Instant Messaging)
    • GoWind IoT (IoT Platform)
    • GoWind Edu (AI Education)
    • GoWind MES (Manufacturing Execution)
    • GoWind CDC (Data Pipeline)
    • GoWind SDP (Zero-Trust Gateway)
    • GoWind Quant (Quant Research)
    • GoWind Trade Radar (Export Sourcing)
    • GoWind Game Radar (Game Greenlight)
  • 简体中文
  • English
GitHub
  • Introduction

    • GoWind UBA Product Introduction
  • Architecture Reference

    • UBA System Architecture
    • UBA Backend Module Overview
    • UBA Backend API Contract
    • UBA Frontend Architecture
  • Developer Guide

    • UBA Installation Guide
    • UBA Code Generation Pipeline Tutorial
    • Adding an External Service Tutorial
    • Adding a Business Entity Tutorial
    • Adding a Frontend Page Tutorial
  • Operations Guide

    • UBA Docker Deployment Guide
    • UBA Configuration Reference & Security Checklist
    • UBA PM2 Deployment Guide
    • UBA Superset BI Deployment Guide
  • Analyst Guide

    • Data Analyst Getting Started Guide
    • Basic Aggregation

      • Event Trend Analysis
      • Active Users Analysis
      • Group By Aggregation
    • Conversion & Paths

      • Funnel Analysis
      • Retention Analysis
      • Top Conversion Paths
      • Behavior Sequence Analysis
    • User Depth

      • Attribution Analysis
      • Distribution Analysis
      • User Segmentation
      • Click Heatmap
      • Interval Analysis
    • Lifecycle

      • User Lifecycle
      • Churn & Reactivation Analysis
      • New vs Returning Users
      • Matrix Quadrant Analysis
    • Revenue & Value

      • Revenue Analysis
      • Whale Tier (Payer Segmentation)
      • Historical LTV Analysis
    • Sessions & Anomalies

      • Session Analysis
      • Period-over-Period Comparison and Anomaly Detection
    • Gaming

      • Level Analysis (Game)
      • Server Retention (Game)
      • Online Stats Analysis (Game)
      • Economy Analysis (Game)
    • OLAP Cookbook
  • SDK Integration

    • Web SDK Integration Guide
    • C# SDK Integration Guide (Unity / Godot / .NET)
  • Appendix

    • UBA Appendix: Ports, Glossary, Known Limitations & FAQ

UBA Configuration Reference & Security Checklist

This document is aimed at operations engineers, detailing the three services' configuration files, OLAP engine switching, JWT authentication, and port reference, and providing the security checklist that must be handled before production deployment.

Read System Architecture first. Configuration files live in each service's configs/ directory, split into multiple YAMLs by function.


1. Configuration File Overview

Under each service directory app/<svc>/service/configs/:

FilePurposecoreadmincollector
server.yamlListening ports, middleware, SSE, Swagger✓ (grpc/asynq)✓ (rest/sse)✓ (rest)
data.yamlData sources (DB/Redis/Kafka/OLAP)✓✓ (redis only)✓ (redis/kafka)
registry.yamlService discovery (etcd / consul)✓✓✓
remote.yamlRemote gRPC discovery config—✓✓
client.yamlgRPC clients✓✓✓
authenticator.yamlJWT dual profiles✓——
oss.yamlObject storage (MinIO)✓✓—
logger.yaml / trace.yamlLogging / distributed tracing✓✓✓

2. Service Listening Ports (server.yaml)

Core Service (app/core/service/configs/server.yaml)

server:
  grpc:
    addr: "0.0.0.0:0"          # dynamic port, registered to etcd at startup
    timeout: 10s
    middleware: { enable_logging: true, enable_recovery: true, enable_tracing: true,
                  enable_validate: true, enable_circuit_breaker: true, enable_metadata: true }
  asynq:
    uri: "redis://:*Abcd123456@redis:6379/1"   # asynchronous task queue

Admin Service (app/admin/service/configs/server.yaml)

server:
  rest:
    addr: "0.0.0.0:5600"        # HTTP REST
    timeout: 10s
    enable_swagger: true
    cors: { origins: ["*"], methods: [...], headers: [...] }
    middleware:
      auth: { method: "HS256", key: "some_api_key" }
  sse:
    addr: ":5601"               # real-time SSE push
    codec: "json"
    path: "/events"
    auto_stream: true

Collector Service (app/collector/service/configs/server.yaml)

server:
  rest:
    addr: "0.0.0.0:5700"        # HTTP reporting entry point
    timeout: 10s
    enable_swagger: true
    cors: { ... }
    middleware:
      auth: { method: "HS256", key: "some_api_key" }

⚠️ Port Reference

ServiceService listening port (YAML)docker-compose host mappingNotes
Admin REST56005600Same
Admin SSE56015601Same
Collector HTTP57005700Same
Core gRPCDynamic (etcd discovery)(not mapped)Discovered via etcd inside containers
Doris FE9030(MySQL)/8030(HTTP)9030, 8030, 9010Same
Postgres54325432Same
Redis63796379Same
Kafka90929092Accessed as kafka:9092 inside containers
MinIO9000/90019001/9002Same
Jaeger UI1668616686Same
Superset80888088Same

The docker-compose port mappings have been unified with the services' server.yaml listening ports; access them from the host directly via the corresponding ports.


3. Data Source Configuration (data.yaml)

Core Service (data hub)

database:                      # PostgreSQL (business/config entities)
  driver: postgres
  dsn: "host=postgres port=5432 user=postgres password=*Abcd123456 dbname=gw_uba sslmode=disable"
  migrate: true                # automatically create tables from the ent schema at startup
  maxIdleConns: 25
  maxOpenConns: 25
  connMaxLifetime: 300s

redis: { addr: "redis:6379", password: "*Abcd123456" }

clickhouse:                    # ClickHouse (takes effect when UseClickHouse=true)
  addrs: ["localhost:9000"]
  database: gw_uba
  compression: lz4

doris:                         # Doris (default engine)
  dsn: "root:@tcp(localhost:9030)/gw_uba"
  stream_load:                 # batch import
    url: "http://localhost:8040/api/gw_uba/_stream_load"
    user: root
    timeout: 30s

Collector Service

redis: { addr: "redis:6379", password: "*Abcd123456" }
kafka:
  codec: json
  endpoints: ["127.0.0.1:9092"]   # ⚠️ change to kafka:9092 when deployed in containers

Admin Service

redis: { addr: "redis:6379", password: "*Abcd123456" }

Admin is a stateless forwarding layer; apart from the Redis cache, it does not connect directly to DB/OLAP.


4. OLAP Engine Switching (UseClickHouse)

The engine is decided by a compile-time constant, not a YAML configuration:

// backend/app/core/service/internal/data/data.go
// UseClickHouse determines whether ClickHouse is used as the data store, otherwise Doris.
const UseClickHouse bool = false   // currently defaults to false → Apache Doris is used
  • false (default): the Doris client is instantiated, the ClickHouse client is left empty.
  • true: switches to ClickHouse; Core must be recompiled.

The repo layer branches on this constant: if data.UseClickHouse { ckRepo } else { dorisRepo }. Both engines share the same business model (mirrored schemas), with SQL differing slightly by dialect (see the OLAP Query Cookbook).


5. Service Discovery (registry.yaml)

The three services' registry.yaml are identical:

registry:
  type: "etcd"                 # etcd is currently used (a consul config exists but is not enabled)
  etcd: { endpoints: ["localhost:2379"] }
  consul: { address: "localhost:8500", scheme: "http" }   # not enabled

For containerized deployment, the etcd endpoints should be changed to etcd:2379.


6. Authentication (authenticator.yaml)

Only Core has authenticator.yaml, defining two JWT profiles (HS256):

auth:
  admin:                       # admin console
    key: "some_api_key"        # ⚠️ must be rotated
    accessTokenTTL: 5400s      # 1.5 hours
    refreshTokenTTL: 43200s    # 12 hours
    aesKey: "f51d66a73d8a0927" # ⚠️ must be rotated
  collector:                   # ingestion/mobile
    key: "some_api_key"
    accessTokenTTL: 900s       # 15 minutes
    refreshTokenTTL: 0s        # refresh disabled
    aesKey: "f51d66a73d8a0927"

7. 🔒 Production Security Checklist (must execute)

All of the following are development defaults and must all be rotated before production deployment:

ItemDefault (dangerous)Action
JWT signing keysome_api_keyReplace with a strong random string
JWT AES keyf51d66a73d8a0927Replace with a strong random string
PostgreSQL password*Abcd123456Replace
Redis password*Abcd123456Replace
MinIO root password*Abcd123456Replace
Doris root(empty password)Set a strong password
Superset adminadmin/adminChange the password + change SUPERSET_SECRET_KEY
CORS origins["*"]Restrict to actual domains
TLSnoneAdd TLS at the reverse proxy (Nginx)

Recommendation: inject secrets via environment variables or a configuration center (etcd, see cfgexp of make export), and never write production secrets into YAML or images.


8. Related Documentation

  • System Architecture
  • Docker Deployment
  • PM2 Deployment
  • Appendix · Port Reference
Edit this page
Last Updated:: 11/3/26, 2:14 PM
Contributors: Bobo
Prev
UBA Docker Deployment Guide
Next
UBA PM2 Deployment Guide