Closed Michael-Hollister closed 3 months ago
Thanks for the feedback, updated PR with your suggestions.
- I wonder if this should be enabled by default, or if we should have some way for the user to control it. Right now, people can force-set
matrix_media_repo_generate_signing_key
tofalse
to disable this behavior, but they must do it before it has already been done. Thoughts?- Given that the procedure is somewhat invasive, I wonder if we should mention it (and the upstream docs page and playbook behavior - merging, backup, etc.) on our matrix-media-repo docs page?
Key generation is enabled by default and can be disabled by setting matrix_media_repo_generate_signing_key
to false as you said. I think having the MMR docs page explaining the process would be sufficient. I've updated the MMR docs page explaining the process in more detail, and feel free to let me know if any further changes you'd like to see.
- Someone removing matrix-media-repo and deleting all its files (from
matrix_media_repo_base_path
) and re-enabling it would probably end up with a signing key which contains 3 keys (homeserver original key + 1st matrix-media-repo signing key + 2nd matrix-media-repo signing key). This may not be as bad as it sounds, I guess.
Yeah true, if a user manually deletes the MMR directory and re-runs the setup role, old keys will not be removed. If the user operates outside the playbook, I don't think this is a case we can easily protect against.
We could potentially auto remove old keys if the user runs the setup role with MMR disabled. However perhaps its best if left to the user to manually remove the key for the following reasons:
.backup
homeserver signing key. This could be destructive however since if the user modifies the signing key file after running the MMR setup role, those changes will be lost.old_signing_keys
field for Synapse and old_private_keys
for Dendrite). This would be harder to automate, and changes to the config would be lost when re-running the homeserver setup roles.Feel free to discuss if you think otherwise.
Automated signing key setup process described in https://docs.t2bot.io/matrix-media-repo/v1.3.5/installation/signing-key/
Homeserver backup key is kept alongside the merged signing key in case server administrator needs to revert.