Followup on secrets in my work notes
I got the following question on my post on how I handle secrets in my work notes:
Sounds like a nice approach for other secrets but how about
:dbconnection
for Orgmode andsql-connection-alist
?
I have to admit I'd never come across the variable sql-connection-alist
before. I've never really used sql-mode
for more than editing SQL queries and
setting up code blocks for running them was one of the first things I used
yasnippet for.
I did a little reading and unfortunately it looks like sql-connection-alist
can only handle string values. However, there is a variable
sql-password-search-wallet-function
, with the default value of
sql-auth-source-search-wallet
, so using auth-source is already supported for
the password itself.
There seems to be a lack of good tutorials for setting up sql-mode
in a secure
way – all articles I found place the password in clear-text in the config –
filling that gap would be a nice way to contribute to the Emacs community. I'm
sure it'd prompt me to re-evaluate incorporating sql-mode
in my workflow.