Where to store sensitive data in public rails app?

TLDR: Use environment variables! I think @Bryce’s comment offers an answer, which I’ll just flush out. It seems one approach Heroku recommends is to use environment variables to store sensitive information (API key strings, database passwords). So survey your code and see in which you have sensitive data. Then create environment variables (in your .bashrc … Read more

How do I store and retrieve credentials from the Windows Vault credential manager?

Many thanks to @Luke for the hint: Windows API functions to store credentials to and read them from Windows Vault are CredWrite() and CredRead(). Here is a code sample that may be compiled and run, that I used to confirm that these functions indeed do the expected thing: #include <windows.h> #include <wincred.h> #include <wchar.h> #pragma … Read more

Why is ARG in a DOCKERFILE not recommended for passing secrets?

Update August 2018: You now have docker build –secret id=mysecret,src=/secret/file. See “safe way to use build-time argument in Docker”. Update January 2017: Docker (swarm) 1.13 has docker secret. However, as commented by Steve Hoffman (bacoboy): […]The secret command only helps swarm users is not a more general solution (like they did with attaching persistent volumes). … Read more

How to use UrlFetchApp with credentials? Google Scripts

This question has been answered on another else where. Here is the summary: Bruce Mcpherson basic authentication looks like this… var options = {}; options.headers = {“Authorization”: “Basic ” + Utilities.base64Encode(username + “:” + password)}; Lenny Cunningham //Added Basic Authorization////////////////////////////////////////////////////////////////////////////////////////// var USERNAME = PropertiesService.getScriptProperties().getProperty(‘username’); var PASSWORD = PropertiesService.getScriptProperties().getProperty(‘password’); var url = PropertiesService.getScriptProperties().getProperty(‘url’);//////////////////////////Forwarded Ports to WebRelay … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)