fonzdm / servarr

Servarr - Stack Deployment with Helm
GNU Affero General Public License v3.0
6 stars 1 forks source link

Better handling qBitTorrrent credentials #15

Closed fonzdm closed 7 months ago

fonzdm commented 7 months ago

Description

At the moment, the qBitTorrent credentials are scattered in different places:

  1. In the actual qbittorrent config file, we have an hardcoded (implicit) admin user, an the password is encrypted here: https://github.com/fonzdm/servarr/blob/8a0aa86a082fb902d8c6c5bda303527ed9cafde8/config/qbittorrent/qBittorrent.conf#L41
  2. In the values.yaml file, we just have references to be used for Sonarr/Radarr integration: https://github.com/fonzdm/servarr/blob/8a0aa86a082fb902d8c6c5bda303527ed9cafde8/values.yaml#L21-L23

So a user who's willing to change the credentials:

For info, the algo used for encryption is PBKDF2

Solution you'd like

The user should set the qBitTorrent service credentials via values.yaml file only. Those parameter will be used both for Sonarr/Radarr registration and the actual qBitTorrent user creation.

I am open to suggestion, cause I cannot really find a way to define those info in input during the deploy. I would not bother changing them now (via helm upgrade), this is a step we can think about later on.

Code of Conduct

imgios commented 7 months ago

Hi @fonzdm, I saw there's a Python script on the qBitTorrent forum that can be used to hash a given password in what qBitTorrent requires.

fonzdm commented 7 months ago

Hi @fonzdm, I saw there's a Python script on the qBitTorrent forum that can be used to hash a given password in what qBitTorrent requires.

Thanks for the insight! I took a look at the script, I think we can embed it in our pre deployment job. Moreover, just found out that we can use

WebUI\Username=f

To set the username... it really slipped out 😄