Cesivi Configuration Tool¶
Overview¶
cesivi-config is an interactive CLI tool for configuring Cesivi Server and WebUI. It provides a menu-driven interface for managing configuration, validation, and sample generation.
Installation¶
The tool is included in the Cesivi solution:
# Build the tool
dotnet build Cesivi.ConfigTool/Cesivi.ConfigTool.csproj
# Run directly
dotnet run --project Cesivi.ConfigTool
# Or use the built executable
./Cesivi.ConfigTool/bin/Debug/net10.0/cesivi-config
Commands¶
Interactive Mode (Default)¶
Run without arguments for the main menu:
cesivi-config
╭───────────────────────────────────╮
│ SPM Config │
╰───────────────────────────────────╯
Cesivi Configuration Tool
What would you like to do?
> Configure SPM Server
Configure WebUI
Show Current Configuration
Validate Configuration
Generate Sample Configuration
Exit
Configure Command¶
Interactive configuration wizard:
# Full interactive mode
cesivi-config configure
# Configure SPM Server only
cesivi-config configure --spm
# Configure WebUI only
cesivi-config configure --webui
# Specify custom project paths
cesivi-config configure --spm-path /path/to/server --webui-path /path/to/webui
SPM Server Configuration Options: - Storage Provider (FileSystem, SQLite, LiteDB, InMemory) - Network Settings (HTTP/HTTPS ports, hostname) - Identity Providers (AcceptAll, NTLM, OAuth2, TrustedCaller) - Logging (path) - Trusted Callers (WebUI trust configuration)
WebUI Configuration Options: - SPM Connection (URL, timeout, retries) - Trust Settings (certificate, caller ID) - UI Settings (theme, page size, file preview)
Show Command¶
Display current configuration:
# Show both SPM and WebUI config
cesivi-config show
# Show SPM config only
cesivi-config show --spm
# Show WebUI config only
cesivi-config show --webui
Example Output:
SPM Server Configuration
════════════════════════════════════
Storage
───────
Provider: FileSystem
Data Path: R:/MockData
Network
───────
HTTP Port: 5000
HTTPS Port: 5001
Hostname: mocksharepoint.local
Use HTTPS: Yes
Identity Providers
──────────────────
AcceptAll: Enabled (Priority: 1000)
NTLM: Disabled
OAuth2: Disabled
TrustedCaller: Disabled
Source: Cesivi.Server/appsettings.json
Validate Command¶
Validate configuration files for errors and warnings:
# Validate both
cesivi-config validate
# Validate SPM only
cesivi-config validate --spm
# Validate WebUI only
cesivi-config validate --webui
Validation Checks: - Configuration file exists and is valid JSON - Storage paths exist and are accessible - Port numbers are valid - Certificate files exist (if configured) - URL formats are correct - Required settings are present
Example Output:
Validating SPM Server Configuration
───────────────────────────────────
OK: Configuration file exists: Cesivi.Server/appsettings.json
OK: Configuration file is valid JSON
OK: DataRootPath exists: R:/MockData
OK: HTTP port: 5000
WARNING: Trusted caller 'webui-001' is enabled but has no certificate thumbprint
Validation passed
Generate Command¶
Generate sample configuration files:
# Generate development configs (default)
cesivi-config generate
# Generate SPM config only
cesivi-config generate --spm
# Generate WebUI config only
cesivi-config generate --webui
# Generate minimal config
cesivi-config generate --minimal
# Generate production-ready config
cesivi-config generate --production
# Specify output path
cesivi-config generate --spm -o my-cesivi-config.json
Profiles: - Development (default): Full configuration with AcceptAll enabled - Minimal: Only essential settings - Production: Secure defaults, HTTPS enabled, AcceptAll disabled
Project Path Detection¶
The tool automatically detects project paths:
- Checks current directory for
Cesivi.ServerandCesivi.WebUI - Checks parent directory
- Verifies by looking for
.csprojandappsettings.jsonfiles
Override with:
cesivi-config --spm-path /custom/path/to/server --webui-path /custom/path/to/webui
Environment Variables¶
Both SPM Server and WebUI support environment variable overrides:
SPM Server¶
| Variable | Config Key |
|---|---|
CESIVI_DATA_PATH |
Cesivi:DataRootPath |
CESIVI_LOG_PATH |
Cesivi:LogPath |
CESIVI_HTTP_PORT |
Cesivi:HttpPort |
CESIVI_HTTPS_PORT |
Cesivi:HttpsPort |
WebUI¶
| Variable | Config Key |
|---|---|
WEBUI_SPM_URL |
SpmClient:BaseUrl |
WEBUI_SPM_TIMEOUT |
SpmClient:TimeoutSeconds |
WEBUI_CERT_PATH |
SpmClient:TrustCertificatePath |
WEBUI_CERT_PASSWORD |
SpmClient:TrustCertificatePassword |
WEBUI_CALLER_ID |
SpmClient:TrustedCallerId |
Common Workflows¶
Initial Setup¶
- Run
cesivi-config configure --spmto set up SPM Server - Run
cesivi-config configure --webuito set up WebUI - Run
cesivi-config validateto verify configuration
Setting Up Trust¶
- Generate certificates:
.\Scripts\New-TrustCertificate.ps1 - Configure SPM:
cesivi-config configure --spm→ Trusted Callers - Configure WebUI:
cesivi-config configure --webui→ Trust Settings - Validate:
cesivi-config validate
Production Deployment¶
- Generate production config:
cesivi-config generate --production - Review and customize the generated files
- Copy relevant sections to your
appsettings.json - Validate:
cesivi-config validate
See Also¶
- WebUI Setup Guide - WebUI deployment and trust configuration
- Identity Providers - Authentication configuration
- Deployment Guide - Server deployment options