emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Storing database credentials outside an org file


From: Thomas S. Dye
Subject: Re: Storing database credentials outside an org file
Date: Sat, 06 Nov 2021 14:24:20 -1000
User-agent: mu4e 1.2.0; emacs 27.1

Aloha Mike,

Mike Gauland <mikelygee@gmail.com> writes:

On 1/11/21 4:33 pm, Tim Cross wrote:
Mike Gauland <mikelygee@gmail.com> writes:

I often use an org file to record database queries, using sql source blocks. I've been putting the database credentials in the file using header-args:sql properties, but I'd prefer to have the credentials saved in a separate file for
security reasons.

Any ideas on how I could make this work?
It probably wouldn't be too hard to use the authinfo.gpg facility via the auth-source library which is included in Emacs. In fact, I think
sql-mode might already have support for this built in.

Thanks for the suggestion. I didn't see it on worg, but in ob-sql.el I found support for ":dbconnection". I can set up an entry in sql-connection-alist, and give the name of the entry to the sql block via :dbconnection. Now, my password is safely out of the .org file. As a bonus, it is easier to maintain across
different org files.

The Worg entry should be fixed now.  Thanks for the report.

All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye



reply via email to

[Prev in Thread] Current Thread [Next in Thread]