Skip to content

feat: add secure quick-start installer - #298

Open
lykakis wants to merge 1 commit into
mainfrom
docs/quickstart
Open

feat: add secure quick-start installer#298
lykakis wants to merge 1 commit into
mainfrom
docs/quickstart

Conversation

@lykakis

@lykakis lykakis commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Secure Quick Start Installer

Summary

Adds a secure, guided Quick Start installer for running Sendium with Docker Compose on Linux, macOS, and WSL.

The installer generates the required runtime configuration, credentials, directories, and Compose file. It can then start Sendium and wait for it to become ready.

Why

Previously, evaluating Sendium required manually creating several configuration files and understanding its authentication, routing, and SMPP worker settings.

This change provides a safer and more approachable setup while preserving explicit configuration and provider-neutral behavior.

What Changed

  • Added quick-start.sh.
  • Added local-only, ProSMS, and custom SMPP provider modes.
  • Generates secure random HTTP and SMPP credentials.
  • Generates compose.yml, .sendium.env, credentials, SMPP configuration, and routing configuration.
  • Binds HTTP and SMPP ports to 127.0.0.1 by default.
  • Uses one transceiver for all generated upstream connections.
  • Supports pending ProSMS approval without creating a broken placeholder worker.
  • Validates SMPP host, port, credentials, TLS settings, and protocol length limits.
  • Protects existing directories unless --force is explicitly supplied.
  • Preserves unrelated files during forced regeneration.
  • Rejects symlinked or unsafe generated destinations.
  • Enforces restrictive secret-file permissions.
  • Detects WSL-mounted Windows directories that cannot enforce Unix permissions.
  • Starts Sendium with Docker Compose and performs an HTTP readiness check.
  • Updates the README, Docker deployment guide, and HTTP API documentation.
  • Adds Linux and macOS CI coverage.

Safe Upstream Regeneration

When an upstream provider is added through forced regeneration, the installer first writes the complete worker configuration with:

outSms.instance.upstream.enable = false
After the running instance has had time to load the worker type, credentials, and connection properties, the installer atomically replaces it with:
outSms.instance.upstream.enable = true

This prevents the worker from starting before its .type property is available.

Testing

Added a dependency-free POSIX shell test suite covering:

  • POSIX shell syntax
  • Secure local-only generation
  • Generated credential consistency
  • Secret-file permissions
  • Non-empty directory protection
  • Safe forced regeneration
  • Staged upstream activation
  • Pending ProSMS configuration
  • Approved ProSMS configuration
  • Custom SMPP configuration
  • Invalid SMPP credentials
  • Unsafe generated destinations
  • Docker Compose parsing
    The optional image-backed CI test also verifies:
  • Real container startup
  • HTTP readiness
  • Authenticated /sendsms submission
  • HTTP 202 Accepted
  • UUID response generation
  • Forced upstream activation in an already-running container
  • Absence of the Missing '.type' property startup failure
    All 11 non-image test groups pass under WSL.

Scope Note

This PR prevents the configuration reload ordering issue in the Quick Start workflow by staging worker activation.
The underlying application-wide hot-reload race remains outside this PR and should be addressed separately.

@lykakis
lykakis requested a review from a team July 31, 2026 13:13
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant