That being said I am amazed at their transparency over the whole issue and a thorough write up of the whole incident. It's something we can all learn from.
That being said I am amazed at their transparency over the whole issue and a thorough write up of the whole incident. It's something we can all learn from.
For example, administrative access to vault requires a root token in the environment of the shell, so that shell is tainted with too much access. Having an ssh-command to a productive data storage also taints a shell, because it's really dangerous to accidentally up-arrow-enter and then you end up on a productive data storage.
History has been a bit annoying with that, but since I installed histdb, that has been a non-issue.
zsh-histdb replaces the single-file ~/.zsh_history with an sqlite3-database - and this database is session aware. This way I can just have as many concurrent session as I want, and create / destroy shell sessions as much as I want and the shell history remains intact.
LD_LIBRARY_PATH=build/lib build/bin/mycommand
I try to use that whenever i can, and as such it is now very rare for me to generally export a variable in my shell. MY_SECRET=$(read) some_command
Without the space. That way, i get the utility of command history, without the danger of the secret being in there. $ cat /etc/profile.d/timeout.sh
TMOUT=600
readonly TMOUT
export TMOUT
That file is created on (almost, see below) each and every machine I administer as part of the initial configuration/provisioning process. By itself, it's nothing spectacular, but it sounds like it would have prevented this incident (as would have several other things, of course).For the hosts with csh as the default, it's:
$ cat /etc/profile.d/timeout.csh
set -r autologout=10Or, is this stating that the developer started running tests from the production environment?
i read it as a couple days ago in their local terminal they exported the prod db as an environment variable. ran some script or console or something that needed to run in prod. didnt unset the variable. Then next time they run any command in that terminal it hits prod.
maybe it was a remote machine, but there wasnt an active db connection, just a hidden config that exploded the next time a command ran
tmux[1] is a terminal multiplexer, a screen alternative.
Some speculation, they might have stared the session on a remote machine; set `DATABASE_URL`; use it for something; detach from the session; to later reattached with the bash env still in tack; without the developer being aware he executed the tests commands.
Another tmux "problem" is developers using it to tail logs with a infinite back-scroll to only fill up server memory. One solution was to kill all tmux session nightly via cron. Might have helped here.
Finally as tui lover, try tmux! Really keeps the frustration at bay if you ssh to a box and your session drop to know your terminal workspace is still in tack.