Skip to content

Commit

Permalink
Merge pull request #7368 from freedomofpress/7328-redis-regen
Browse files Browse the repository at this point in the history
Wipe and regenerate Redis password when restoring from backups
  • Loading branch information
zenmonkeykstop authored Dec 9, 2024
2 parents 543d9b4 + dd787c2 commit 8522ccc
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,24 @@
exclude: "var/lib/tor,etc/tor/torrc"
when: restore_skip_tor

- name: Reconfigure securedrop-app-code
- name: Remove Redis password line from restored config.py, if it exists
lineinfile:
state: absent
path: /var/www/securedrop/config.py
regexp: "^REDIS_PASSWORD = .*$"

- name: Remove /var/www/securedrop/rq_config.py if it exists
file:
state: absent
path: /var/www/securedrop/rq_config.py

- name: Remove Redis password line from /etc/redis/redis.conf, if it exists
lineinfile:
path: /etc/redis/redis.conf
state: absent
regexp: "^requirepass .*$"

- name: Reconfigure securedrop-app-code, regenerating Redis config vi postint
command: dpkg-reconfigure securedrop-app-code

- name: Reconfigure securedrop-config
Expand Down

0 comments on commit 8522ccc

Please sign in to comment.