Copy Rocket.toml to /usr/share/peach-web #55

Merged
notplants merged 3 commits from copy-rocket-toml into main 2021-12-22 14:53:21 +00:00
Owner

Now that we are using the Rocket "secrets" feature (for storing secrets in private cookies), it is required that a secret key is configured in Rocket.toml.

During development, this key is autogenerated automatically by Rocket, but in "production" (on the pi) this key is not autogenerated, and without the key, peach-web throw an error on startup.

For now I've manually put a secret key into Rocket.toml and am copying this to the correct working directory as part of the debian package deployment,

but in the future, we should probably figure out a way to uniquely create this secret key for each PeachCloud. This could also be something that happens during the PeachCloud initialization. While it is being initialized, it could randomly generate a secret key, and then use sed to replace the place in Rocket.toml. I suggest doing this as a separate PR.

Now that we are using the Rocket "secrets" feature (for storing secrets in private cookies), it is required that a secret key is configured in Rocket.toml. During development, this key is autogenerated automatically by Rocket, but in "production" (on the pi) this key is not autogenerated, and without the key, peach-web throw an error on startup. For now I've manually put a secret key into Rocket.toml and am copying this to the correct working directory as part of the debian package deployment, but in the future, we should probably figure out a way to uniquely create this secret key for each PeachCloud. This could also be something that happens during the PeachCloud initialization. While it is being initialized, it could randomly generate a secret key, and then use sed to replace the place in Rocket.toml. I suggest doing this as a separate PR.
notplants added 1 commit 2021-12-17 22:26:21 +00:00
notplants requested review from glyph 2021-12-17 22:26:30 +00:00
notplants added 1 commit 2021-12-18 14:23:21 +00:00
glyph approved these changes 2021-12-22 12:43:00 +00:00
glyph left a comment
Owner

This could also be something that happens during the PeachCloud initialization. While it is being initialized, it could randomly generate a secret key, and then use sed to replace the place in Rocket.toml.

Sounds like a good approach to me.

> This could also be something that happens during the PeachCloud initialization. While it is being initialized, it could randomly generate a secret key, and then use sed to replace the place in Rocket.toml. Sounds like a good approach to me.
notplants changed target branch from remove-basic-auth to main 2021-12-22 14:53:01 +00:00
notplants merged commit 9324b3ec0b into main 2021-12-22 14:53:21 +00:00
notplants deleted branch copy-rocket-toml 2021-12-22 14:53:57 +00:00
Sign in to join this conversation.
No description provided.