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.
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 main2021-12-22 14:53:01 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.
Sounds like a good approach to me.