Skip to content

Overhaul: Configuration (schema v3.0.0) #1978

Description

@josecelano

Goal

Overhaul the Torrust Tracker configuration to schema version 3.0.0, incorporating pending enhancements, security improvements, and structural changes, many of which are breaking changes that justify the schema version bump.

Deliver a cleaner, more extensible, and more secure configuration model that supports modern deployment scenarios including reverse proxies, TLS, multi-instance metrics, logging flexibility, secrets management, and explicit trust policies.

Specification: docs/issues/open/1978-configuration-overhaul-epic.md

Why This Is Needed

  1. No public URL awareness: the application cannot know its public-facing URLs (Include public service URL in configuration #1417), which affects metrics aggregation, API discoverability, and logging in reverse-proxy setups.
  2. Global on_reverse_proxy: the setting applies to all HTTP trackers, preventing mixed deployments where only some trackers are behind a proxy (Support per-HTTP-tracker on_reverse_proxy setting #1640).
  3. Secrets exposure risk: API tokens and database passwords can leak through tracing instrumentation and debug output; there is no systematic protection (Overhaul Secrets: consider using secrecy to handle secrets #1490).
  4. Hardcoded IP-ban reset interval: cleanup timing is hardcoded, and the cleanup task is spawned once per UDP server instead of once globally (Allow setting the IP bans reset interval via configuration and remove duplicate execution of cronjob to clean bans #1453).
  5. Missing protocol context in service identity: bare SocketAddr is used where ServiceBinding would provide protocol-aware identity for logs, health checks, and metrics (Make server listen URL available where server socket address is also available #1415).
  6. No logging style configuration: TraceStyle is hardcoded, and the threshold field should become trace_filter to match tracing terminology (New config option for logging style #889).
  7. No UDP connection ID validation policy: every UDP listener validates connection IDs strictly, preventing isolated compatibility listeners for non-compliant clients (Add configurable UDP connection ID validation policy #1136).
  8. No opt-in support for the HTTP announce ip parameter: the parameter is parsed but ignored, so controlled deployments cannot choose to trust a client-provided peer address (Add per-HTTP-tracker config option to use peer IP from ip GET parameter (sub-issue of #1978) #1987).

Several changes are breaking, including schema reorganization, field renames, and removal of global [core.net], making this the right time to bump the configuration schema from 2.0.0 to 3.0.0.

Note on versioning: The tracker application and configuration schema use independent version systems. The tracker app goes from 3.0.0 to 4.0.0, while the config schema goes from 2.0.0 to 3.0.0.

Subissues

Order Issue Notes
1 #1979 - Copy v2_0_0 to v3_0_0 as baseline Foundation for every schema-v3 change
2 #1981 - Fix tsl_config to tls_config typo Mechanical rename before #1640
3 #1640 - Per-instance Network block Establishes placement used by #1417, #1490, and #1987
4 #1417 - Public service URL Depends on #1640
5 #1415 - Use ServiceBinding for service identity Independent
6 #1453 - Configurable IP-ban reset interval and single cleanup task Global UDP policy; ordered before related #1136
7 #1136 - Configurable UDP connection ID validation policy Per-listener policy; strict by default
8 #1490 - Database decomposition and secrets overhaul Depends on #1640
9 #889 - Logging style configuration Independent
10 #1987 - Opt-in use of the HTTP announce ip parameter Depends on #1640 and external prerequisite #1985
11 #1980 - Final cleanup and consumer migration Must be last; depends on all other EPIC work

GitHub's native subissue hierarchy is the source of truth for completion status.

Dependency Summary

Scope

In Scope

  • Bump the configuration schema from 2.0.0 to 3.0.0.
  • Copy v2_0_0 to v3_0_0 as the starting point for breaking changes.
  • Implement all eight configuration enhancements listed above.
  • Remove global re-exports and migrate consumers to explicit v3 imports during final cleanup.
  • Document migration and compatibility considerations.

Out of Scope

  • Extracting packages/configuration into sub-packages, tracked in Overhaul: Packages #1669.
  • Unrelated tracker core or protocol changes.
  • Changes to the deployer's environment configuration format.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions