'How-To cross platform secret configurations in Rust and Python

Coming from Python, we are successively adding Rust for new features or replacing Python by Rust for performance reasons. Our code base has configurations, and some contain secrets.

Currently we use the Python Fernet module (the non-Hazardous Material part of the cryptography package) to encrypt and decrypt these secrets. Although there is a fernet crate for rust, it was not possible to build it on MS Windows. This seems to be a general issue.

So, is there a cross platform (Python/Rust)x(Windows/Linux) way to handle secrets in configurations?

We would settle for the formats supported by the Rust config crate. But the config crate also makes no assumption about secrets, so no help or opinion from there.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source