Overview
SpiceDB is a database for managing authorization policies. It is used to store and manage the authorization policies for the Authorization Service in FlowX 5.0’s multi-tenant architecture.For more information about SpiceDB, see the SpiceDB documentation.
Prerequisites
Infrastructure
- Kubernetes cluster with admin access
- PostgreSQL database server
- Network connectivity between SpiceDB and FlowX services
FlowX Integration
- FlowX 5.0+ platform components that will integrate with SpiceDB
- CAS client library configuration in all FlowX services
- Proper secret management for authentication
FlowX customizations
The FlowX platform includes several customizations to the standard SpiceDB deployment:- Namespace-restricted operator: Uses Role and RoleBinding instead of ClusterRole and ClusterRoleBinding for enhanced security
- Platform Health Monitoring: Automatic health check configuration for FlowX platform monitoring (
/healthzendpoint on port 8443) - Migration Job Optimization: Configured retry limits (3 attempts) and timeouts (30 minutes) for schema migrations
- Resource Optimization: Production-ready resource requests and limits based on real-world usage
- Service Annotations: FlowX-specific service annotations for platform integration
Installation steps
Step 1: Install SpiceDB operator
The FlowX platform uses a customized SpiceDB operator that operates within a specific namespace, using Role and RoleBinding instead of ClusterRole and ClusterRoleBinding for enhanced security and isolation.
The operator must be installed in the same namespace as FlowX because it operates with namespace-scoped permissions and cannot access other namespaces.
The operator pod will have a name in the format:
spicedb-operator-<hash>-<hash> (e.g., spicedb-operator-dd8f97d95-s78fc)Step 2: Create SpiceDB database
Create a dedicated PostgreSQL database and user for SpiceDB:Step 3: Create Kubernetes Secret
Create thespicedb secret with the required credentials:
Step 4: Deploy SpiceDB cluster
The FlowX platform uses a customized SpiceDB cluster chart that includes additional patches for platform status monitoring, health checks, and optimized resource configurations. The deployment uses a dedicated
spicedb service account for proper RBAC permissions.FlowX Platform Integration: The FlowX SpiceDB chart automatically configures health monitoring annotations on the Service resource. These annotations are hardcoded in the chart and include:
flowx.ai/health: "true"flowx.ai/health-path: "/healthz"flowx.ai/health-port: "8443"
Step 5: Update FlowX services
The following services need a cas-lib configuration:
- authorization-service
- application-manager
- authorization-system
- cms-core
- data-sync
- document-plugin
- integration-designer
- notification-plugin
- process-engine
- runtime-manager
- task-management-plugin
Helm values configuration
Add the token reference to your Helm values usingextraEnvVarsMultipleSecretsCustomKeys:
This configuration tells Helm to:
- Look for the existing Kubernetes Secret named
spicedb(created in Step 3) - Take the value from the
preshared_keykey in that secret - Mount it as environment variable
FLOWX_SPICEDB_TOKENin FlowX service pods
Verification
Verify your SpiceDB deployment:1
Check SpiceDB Pods
Ensure SpiceDB pods are running:
2
Test Connectivity
Verify SpiceDB is accessible on port 50051:
3
Check FlowX Integration
Review FlowX service logs for successful SpiceDB connection:
Configuration reference
Required environment variables
| Variable | Required | Description | Default Value | Notes |
|---|---|---|---|---|
SPICEDB_DATASTORE_ENGINE | ✅ | Database engine type | postgres | Only PostgreSQL is supported in FlowX |
SPICEDB_DATASTORE_CONN_URI | ✅ | PostgreSQL connection string | postgres://postgres:password@postgresql:5432/spicedb?sslmode=disable | Use Kubernetes Secret - include sslmode=disable for internal cluster communication |
SPICEDB_GRPC_PRESHARED_KEY | ✅ | Pre-shared key for gRPC authentication | your-secure-key-here | This becomes FLOWX_SPICEDB_TOKEN in FlowX services |
Optional configuration
| Variable | Required | Description | Default Value | Notes |
|---|---|---|---|---|
SPICEDB_DISPATCH_CLUSTER_ENABLED | ⚠️ | Enable cluster mode for multiple replicas | true | Required for production deployments with multiple replicas |
SPICEDB_LOG_LEVEL | ⚠️ | Logging verbosity level | debug | Use debug for troubleshooting, info for production |
Customer-specific configuration
- Database Connection: Update
datastore_uriwith your PostgreSQL credentials and hostname - Security Token: Generate a unique
preshared_keyfor your deployment

