Is it possible to identify the heroku username of the current user connected to an app through a running console?
So say I connect to a rails console on my heroku app using
heroku run rails c --app my-app
I'd like to be able to run a command and have it print out:
heroku.user@example.com
Where heroku.user@example.com is the email / username of the user who connected to the console.
I tried a couple basic linux commands like
`whoami`
but you get a generic username like u12345
The goal is to instrument certain fields in our app with audit trails so that we can track when and who accessed sensitive information, as well as how they accessed it (CLI, through the Web UI, etc.)