Hide API Keys with PyInstaller #7520
Replies: 2 comments 4 replies
|
In order to use the api keys, your application needs to contain everything needed to obfuscate them so there is no such thing as a secure way to put any kind of secrets in any kind of application. If you're content with merely making it awkward rather than impossible to extract the api keys, I'd suggest moving your secrets into a |
|
You cannot keep a provider secret secure inside a distributed PyInstaller executable. Moving it from For a service-owned API key, keep it on a backend you control and have the app call that backend; the backend calls the provider. If this is a bring-your-own-key desktop tool, let each user enter their own key and store it in the OS keychain, while explaining that a local machine owner can still extract a key the app uses. If this |
Uh oh!
There was an error while loading. Please reload this page.
Hello, I am wondering how to bundle my .env for api keys securely when I utilize pyinstaller.
I have noticed that when run the following command:
pyinstaller main.py --onefile -n testbot --add-data '.env;.'
My .env file will be exposed in the windows TEMP directory.
Any pointers on how to handle this?
All reactions