Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration overhaul: version 2 for the configuration toml file (breaking changes) #897

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Jun 17, 2024

Configuration overhaul: version 2 for the configuration TOML file (breaking changes).

See the issue for a full description of changes.

Subtasks

  • make log_level mandatory with default info value.
  • extract logging and core sections.
  • extract database subsection in core section.
  • extract net subsection in core section.
  • extract announce_policy subsection in core section.
  • extract tracker_policy subsection in core section.
  • extract tsl_config subsection for http_trackers and http_api.
  • remove enabled field from services. If the configuration is present, the service is enabled.

@josecelano josecelano added this to the v3.0.0 milestone Jun 17, 2024
@josecelano josecelano self-assigned this Jun 17, 2024
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from 60369da to 8ffcec1 Compare June 17, 2024 10:34
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from 8ffcec1 to 9b9b178 Compare June 17, 2024 14:47
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from 9b9b178 to ef9461a Compare June 17, 2024 14:53
@josecelano josecelano requested a review from da2ce7 June 17, 2024 15:06
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from fe7e039 to 7b2f757 Compare June 17, 2024 17:20
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from 8b088e3 to 2341c13 Compare June 17, 2024 18:40
TSL configuration for HTTP trackers and the Tracker API is still
optional. However, when it's provided is enabled. The `ssl_enabled`
field was removed. You can remove the whole `tsl_config` to disable TSL.

If you want to kee a copy in the TOML file you can just comment the
lines.

```toml
[[http_trackers]]
...

[http_trackers.tsl_config]
ssl_cert_path = "./storage/tracker/lib/tls/localhost.crt"
ssl_key_path = "./storage/tracker/lib/tls/localhost.key"

[http_api]
...

[http_api.tsl_config]
ssl_cert_path = "./storage/tracker/lib/tls/localhost.crt"
ssl_key_path = "./storage/tracker/lib/tls/localhost.key"
```
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from 2341c13 to c5cc9fd Compare June 17, 2024 18:45
It remvoes this line:

```
2024-06-17T18:52:49.196708Z  INFO torrust_tracker::bootstrap::jobs: TLS not enabled
```

becuase it doesn't specifu which service the TSl is not enabled for.

On the other hand, the output already indicates whether the service is
runnig on HTTP or HTTPs:

```
2024-06-18T07:37:58.595692Z  INFO HTTP TRACKER: Started on: http://0.0.0.0:7070
```
By default all services are disabled. If the service section is missing
in the TOML config file it means the service is disabled.

From:

```toml
[[udp_trackers]]
enabled = false
bind_address = "0.0.0.0:6969"
```

To:

```toml
```

The `http_api` section has been disabled by default becuase there is no
way to override it to disable it, if it's enabled by default. You nned
to explicitly enabled the API now.
@josecelano josecelano force-pushed the 878-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes branch from 9f075b7 to 06ad5da Compare June 18, 2024 09:22
@josecelano josecelano marked this pull request as ready for review June 18, 2024 09:38
@josecelano
Copy link
Member Author

ACK 06ad5da

@josecelano josecelano requested a review from mario-nt June 18, 2024 11:33
@josecelano josecelano merged commit 729739c into torrust:develop Jun 19, 2024
14 of 15 checks passed
josecelano added a commit to josecelano/torrust-index-gui that referenced this pull request Jun 19, 2024
josecelano added a commit to torrust/torrust-index-gui that referenced this pull request Jun 19, 2024
305602e fix: [#577] update tracker configuration (Jose Celano)

Pull request description:

  After merging this [PR](torrust/torrust-tracker#897), the tracker's TOML configuration will change. For a list of changes, see this [issue](torrust/torrust-tracker#878).

ACKs for top commit:
  josecelano:
    ACK 305602e

Tree-SHA512: 94d666f32aa7cd671fdbd548e8ce226f3d7c83b9246192860417a368ea34a00ec0d3fda13ff7cb807477c4d15e2751238102c969b3a7813cf3377d9cad4d8bbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config overhaul: version 2 for the configuration toml file (breaking changes)
1 participant