Available starting with FlowX.AI 5.5.0The Organization Manager is a new microservice responsible for organization and tenant management, including user registration, organization lifecycle, and platform component health monitoring.
Dependencies
Before setting up the Organization Manager, ensure you have the following dependencies in place:- PostgreSQL database for storing organization and tenant data
- Kafka for event-driven communication with other FlowX.AI services
- Redis for caching
- Keycloak (or compatible OAuth2 provider) for authentication and authorization
- SpiceDB for fine-grained authorization
Infrastructure prerequisites
| Component | Description |
|---|---|
| PostgreSQL | Dedicated database for organization data |
| Kafka | Message broker for inter-service communication |
| Redis | Caching layer for improved performance |
| Keycloak | Identity provider for service authentication |
| SpiceDB | Authorization service for fine-grained access control |
Configuration
Authorization configuration
| Environment Variable | Description | Default Value |
|---|---|---|
SECURITY_TYPE | Security type (JWT public key validation) | jwt-public-key |
SECURITY_OAUTH2_BASE_SERVER_URL | Base URL of the Keycloak server | |
SECURITY_OAUTH2_SAREALM | Service accounts realm ID | 00000002-0002-4002-8002-000000000002 |
SECURITY_OAUTH2_SERVICE_ACCOUNT_ADMIN_CLIENT_ID | Service account client ID | flowx-organization-manager-sa |
SECURITY_OAUTH2_SERVICE_ACCOUNT_ADMIN_CLIENT_SECRET | Service account client secret | |
SECURITY_OAUTH2_REALM_ISSUERURIPATTERN | Per-organization realm URI pattern | ${SECURITY_OAUTH2_BASE_SERVER_URL}/realms/{orgId} |
FLOWX_LIB_SECURITY_SERVICES_ORGANIZATIONMANAGER_BASEURL | Organization manager URL (self-reference for security lib) | http://organization-manager:80 |
PostgreSQL configuration
The Organization Manager uses its own dedicated PostgreSQL database.| Environment Variable | Description | Default Value |
|---|---|---|
SPRING_DATASOURCE_URL | JDBC connection URL for PostgreSQL | jdbc:postgresql://postgresql:5432/organization_manager |
SPRING_DATASOURCE_USERNAME | Database username | postgres |
SPRING_DATASOURCE_PASSWORD | Database password | - |
Redis configuration
Organization Manager uses Redis for caching. Configure Redis connection using the standard Redis environment variables. Quick reference:| Environment Variable | Description | Example Value | Status |
|---|---|---|---|
SPRING_DATA_REDIS_HOST | Redis server hostname | localhost | Recommended |
SPRING_DATA_REDIS_PORT | Redis server port | 6379 | Recommended |
SPRING_DATA_REDIS_PASSWORD | Redis authentication password | - | Recommended |
REDIS_TTL | Cache TTL in milliseconds | 5000000 | Optional |
Both
SPRING_DATA_REDIS_* and SPRING_REDIS_* variable prefixes are supported. The SPRING_DATA_REDIS_* prefix is the modern Spring Boot standard and is recommended for new deployments.For advanced Redis deployment modes (Sentinel, Cluster) and SSL/TLS setup, see the Redis Configuration guide. Note that Sentinel and Cluster modes are only supported by the Events Gateway service.
Kafka configuration
Core Kafka settings
| Environment Variable | Description | Default Value |
|---|---|---|
SPRING_KAFKA_BOOTSTRAP_SERVERS | Address of the Kafka server(s) | localhost:9092 |
KAFKA_MESSAGE_MAX_BYTES | Maximum message size (bytes) | 52428800 (50 MB) |
Topic naming configuration
| Environment Variable | Description | Default Value |
|---|---|---|
KAFKA_TOPIC_NAMING_PACKAGE | Package prefix for topic names | ai.flowx. |
KAFKA_TOPIC_NAMING_ENVIRONMENT | Environment segment for topic names | |
KAFKA_TOPIC_NAMING_VERSION | Version suffix for topic names | .v1 |
KAFKA_TOPIC_NAMING_SEPARATOR | Primary separator for topic names | . |
KAFKA_TOPIC_NAMING_SEPARATOR2 | Secondary separator for topic names | - |
Kafka topics
The Organization Manager publishes organization lifecycle events:| Environment Variable | Description | Default Value |
|---|---|---|
KAFKA_TOPIC_ORGANIZATION_EVENTS_OUT | Topic for organization lifecycle events | ai.flowx.organization.events.v1 |
KAFKA_TOPIC_LLM_CONFIG_CHANGED | Notifies services when LLM provider or model configuration changes (5.7+) | ai.flowx.llm.config.changed.v1 |
Available starting with FlowX.AI 5.7.0The Organization Manager stores LLM provider API keys encrypted at rest. Set a unique encryption key for production deployments.
| Environment Variable | Description | Default Value |
|---|---|---|
LLM_ENCRYPTION_MASTER_KEY | Encryption key for LLM provider API keys stored in the database. Must be changed from the default in production. | default-dev-key-change-in-prod |
CAS lib configuration (SpiceDB)
| Environment Variable | Description | Default Value |
|---|---|---|
FLOWX_LIB_CASCLIENT_SPICEDB_HOST | SpiceDB hostname | spicedb |
FLOWX_LIB_CASCLIENT_SPICEDB_PORT | SpiceDB gRPC port | 50051 |
FLOWX_LIB_CASCLIENT_SPICEDB_TOKEN | SpiceDB authentication token | - |
Organization ID configuration
Available starting with FlowX.AI 5.7.0For self-hosted (on-premises) deployments, the Organization ID is a mandatory configuration used by Liquibase migration scripts to associate existing data with the correct organization.
ORGANIZATION_ID environment variable on all 19 FlowX services before deploying:
License service required. Self-hosted deployments must also configure the License service, which connects to FlowX SaaS for license validation and usage reporting. The Organization Manager publishes organization lifecycle events via Kafka that the License service consumes.
On-premises initialization
When a self-hosted deployment starts for the first time, the Organization Manager provides endpoints for environment setup and organization registration.Environment status endpoint
GET /org/api/env (unauthenticated)
Returns the current installation type and status:
| Status | Description |
|---|---|
ONPREM + MISSING_ORGANIZATION | Organization not yet registered. The setup screen is displayed in Designer. |
ONPREM + MISSING_LICENCE | Organization exists but the license has not been synced yet. |
ONPREM + OK | Fully configured. Returns organization info (org ID, issuer, token endpoint, client ID, redirect URI). |
Organization registration endpoint
POST /org/api/org/single (not available on SaaS)
Creates the on-premises organization using a token provided by FlowX. This endpoint is called from the Designer setup screen and:
- Validates the token against the FlowX SaaS license server
- Creates the organization with the org ID and org code from the token claims
- Creates two Keycloak realms (one for users, one for service accounts)
- Creates the initial org admin user with the credentials provided in the setup screen
For upgrades from 5.1, the org admin user already exists and the setup screen is not displayed. The Organization Manager will update the existing Keycloak realm with the new organization ID.
Logging configuration
| Environment Variable | Description | Default Value |
|---|---|---|
LOGGING_LEVEL_ROOT | Root logging level | INFO |
LOGGING_LEVEL_APP | Application-specific log level | INFO |
Multipart upload configuration
| Environment Variable | Description | Default Value |
|---|---|---|
MULTIPART_MAX_FILE_SIZE | Maximum file size per upload | 50MB |
MULTIPART_MAX_REQUEST_SIZE | Maximum total request size | 50MB |
Secrets management
The Organization Manager requires several secrets to be configured. These should be stored securely and referenced via Kubernetes secrets or a secrets management solution.| Secret Name | Description |
|---|---|
SPRING_DATASOURCE_PASSWORD | PostgreSQL database password |
SPRING_REDIS_PASSWORD | Redis authentication password |
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_MAINIDENTITY_CLIENTSECRET | Keycloak service account secret |
FLOWX_LIB_CASCLIENT_SPICEDB_TOKEN | SpiceDB authentication token |
Deployment
Helm values example
Below is an example Helm values configuration for deploying the Organization Manager:Network policies
The Organization Manager requires network access to the following services:| Service | Purpose | Pod Label |
|---|---|---|
| Kafka | Message broker communication | flowx.ai/egress-s-kafka |
| PostgreSQL | Primary data storage | flowx.ai/egress-s-postgresql |
| Redis | Caching | flowx.ai/egress-s-redis |
| Keycloak | Authentication | flowx.ai/egress-s-keycloak |
| SpiceDB | Authorization | flowx.ai/egress-s-spicedb |
Monitoring
The Organization Manager exposes Prometheus metrics for monitoring. Turn on scraping by setting the pod label:Health endpoints
| Endpoint | Description |
|---|---|
/actuator/health | Health check endpoint |
/actuator/metrics | Prometheus metrics endpoint |
/actuator/info | App info endpoint |
Verify your setup
The Organization Manager pod is running and healthy:
kubectl get pods -l app=organization-managerThe health endpoint returns HTTP 200:
curl http://organization-manager:8080/actuator/healthDatabase migrations completed successfully — check pod logs for
Liquibase: Update has been successfulSpiceDB connection is established — check pod logs for successful CAS client initialization
Kafka topic
ai.flowx.organization.events.v1 exists and the service can publish to itTroubleshooting
Database connection failures
Database connection failures
Symptoms: Service fails to start with database connection errors.Solutions:
- Verify the
organization_managerdatabase exists in PostgreSQL - Check that the database user has appropriate permissions
- Ensure network connectivity between the pod and PostgreSQL service
- Verify the JDBC URL format is correct
SpiceDB connection failures
SpiceDB connection failures
Symptoms: Authorization errors or service fails to initialize CAS client.Solutions:
- Verify SpiceDB is running and reachable at the configured host and port
- Check that the SpiceDB token is correct
- Ensure network policies allow gRPC traffic to SpiceDB on port
50051 - Review pod logs for specific CAS client error messages
Kafka publishing failures
Kafka publishing failures
Symptoms: Organization events not reaching downstream services.Solutions:
- Verify Kafka bootstrap servers are reachable
- Check that the
ai.flowx.organization.events.v1topic exists - Ensure the service has producer permissions on the topic
- Review
KAFKA_MESSAGE_MAX_BYTESif large messages fail
Service account authentication errors
Service account authentication errors
Symptoms: 401/403 errors when communicating with other FlowX services.Solutions:
- Verify the Keycloak service account is properly configured
- Check that client secrets match between configuration and Keycloak
- Ensure the service account has required roles assigned
- Verify
SECURITY_TYPEis set tojwt-public-key
Related resources
Redis Configuration
Complete Redis setup including Sentinel and Cluster modes
Access Management
Configure roles and access rights
SpiceDB Configuration
Fine-grained authorization setup
IAM Configuration
Identity and access management setup

