Skip to content

Config overhaul: remove secrets when final config is printed to console#951

Merged
josecelano merged 2 commits intotorrust:developfrom
josecelano:948-config-overhaul-remove-secrets-when-final-config-is-printed-to-console
Jul 4, 2024
Merged

Config overhaul: remove secrets when final config is printed to console#951
josecelano merged 2 commits intotorrust:developfrom
josecelano:948-config-overhaul-remove-secrets-when-final-config-is-printed-to-console

Conversation

@josecelano
Copy link
Copy Markdown
Member

When the tracker is started, the final configuration is printed out. This feature was added in #935. This PR masks the secrets with asterics.

It will be use to parse the MySQL path in the configuration. FOr
example:

```toml
[core.database]
driver = "MySQL"
path = "mysql://db_user:db_user_secret_password@mysql:3306/torrust_tracker"
```
@josecelano josecelano self-assigned this Jul 4, 2024
@josecelano josecelano requested a review from da2ce7 July 4, 2024 10:29
@josecelano
Copy link
Copy Markdown
Member Author

ACK 4673514

@josecelano josecelano added this to the v3.0.0 milestone Jul 4, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 4, 2024

Codecov Report

Attention: Patch coverage is 60.71429% with 11 lines in your changes missing coverage. Please review.

Project coverage is 77.31%. Comparing base (1e891f1) to head (4673514).

Files Patch % Lines
packages/configuration/src/v2/mod.rs 14.28% 6 Missing ⚠️
packages/configuration/src/v2/tracker_api.rs 0.00% 4 Missing ⚠️
src/bootstrap/app.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #951      +/-   ##
===========================================
- Coverage    77.36%   77.31%   -0.05%     
===========================================
  Files          183      183              
  Lines         9707     9731      +24     
===========================================
+ Hits          7510     7524      +14     
- Misses        2197     2207      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@josecelano josecelano merged commit c747321 into torrust:develop Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config overhaul: remove secrets when final config is printed to console

1 participant