-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle JSON key from env variables #110
Comments
Same question here! |
As a workaround, I did this:
You'll have to convert your file to Base64 and save it as |
I like the idea of using Tempfiles. Although not technically encrypted on disk, it at least does make it less trivial to locate the credentials file. However, I don't see why you still use a file ( Thanks for the idea anyways! I'll look into it. |
Well, I'd prefer to, but actually you're supposed to provide a file path to FCM for it to work, not the actual value of the file (which is the requested feature here) |
Yes, exactly. Maybe I explained myself poorly. What I meant was: You could store the contents of the That way, you at least avoid having an unencrypted file that is static on disk (the But in any case, since the gem expects a path to an unencrypted file on disk, that file has to exist for at least the duration of initialization (actually maybe longer looking at the source code). Forcing us to have that file unencrypted on disk makes the gem inherently insecure since it prevents us from using any encryption on the data we need to provide the gem with (the So I think what we need really is a PR that would fix the issue, or enable an additional, secure way to provide the credentials to the fcm gem (for backward-compatibility). |
Some hosting services like Scalingo or Heroku only allow env variables to handle secrets.
Is there a way to directly pass either a base64 to FCM or even the JSON (both could be passed as an env variable), or the required informations if necessary ?
The text was updated successfully, but these errors were encountered: