3 ms·
> if you are like me, you like to store your dot files somewhere public. In your public .bashrc, put a line "source .bashrc.secret." Just keep an empty .bashr
by jemfinch 12y ago
> if you are like me, you like to store your dot files somewhere public.
In your public .bashrc, put a line "source .bashrc.secret." Just keep an empty .bashrc.secret in your public repository, and keep your actual secret credential on your machines.
- mateuszf 12y agoAnd don't forget to add it to .gitignore, otherwise when overwritten accidently it might land in public repo.
- devonkim 12y agoThat's a fantastic way to TELL attackers what filename to search for on a filesystem if they have access to your source code. Randomizing filenames and forcing an attacker to have to write a custom utility to find the path to files keeps you from getting hit by a number of drive-by hackings. And every single incorrect use of a credential must be recorded off-system and monitored. Avoid using defaults in general for any third party software and you can do things like generating random paths to S3 buckets that contain certificates and environment variables in your own software. S3 buckets are incredibly secure if you tack on CloudHSM plus use host certificates effectively with IAM policies. Otherwise, I'd try to use keystore systems available on your respective OS or language platform toolchain (CSP on .NET, JCE for Java, I dunno wtf else you'd use for anything else because the only people I've heard of that want to go this far are all F500 enterprises basically with software in exactly those two languages only).
- tlrobinson 12y agoYou can create a global .gitignore: https://help.github.com/articles/ignoring-files/ https://help.github.com/articles/ignoring-files/