From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SErpOPoch2HAPgEAgWs5BA (envelope-from ) for ; Sun, 07 Nov 2021 01:25:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MBiNNPoch2HrAgAAB5/wlQ (envelope-from ) for ; Sun, 07 Nov 2021 00:25:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0EE0392DF for ; Sun, 7 Nov 2021 01:25:30 +0100 (CET) Received: from localhost ([::1]:49536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjW00-0007nA-Sz for larch@yhetil.org; Sat, 06 Nov 2021 20:25:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjVzD-0007mn-KZ for emacs-orgmode@gnu.org; Sat, 06 Nov 2021 20:24:39 -0400 Received: from gateway32.websitewelcome.com ([192.185.145.102]:30716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjVzB-0003qv-0G for emacs-orgmode@gnu.org; Sat, 06 Nov 2021 20:24:39 -0400 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 4AA73A987C5 for ; Sat, 6 Nov 2021 19:24:23 -0500 (CDT) Received: from box2035.bluehost.com ([74.220.219.237]) by cmsmtp with SMTP id jVywmE9feIWzGjVyxmI4pF; Sat, 06 Nov 2021 19:24:23 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsdye.online; s=default; h=Content-Type:MIME-Version:Message-ID:Date: In-reply-to:Subject:To:From:References:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vl4kmunqLH0UbpJoxm+oDswhwkA7R0S9cffwmjW1AsQ=; b=bnPkqFmys3rjdPc7qL3hUbOv1n mtC/KHCxdOg4GG8S0sacg3xw27dJTu9tJzsnVIwG9IvPLJpsRBZpkEjjn6jCuI3GGew6f1B91Dcx0 fBj/Xkyq5NSI4PBKh51zBgM+5b/lvBLBr7sfBgQfRcqxhaPAJloZ6czZqhz2zRqh9fYoKW0tyQxOM 7sNuwwhAHvzlxyO1uX1+xCie7G+ftRsB4zleqymItc+bYVGpnd21CgqJZVwN2jfQV/TU0/nNt4ksc JhycMaiiIv5slku+qlnAefHeJMMUofBTpkA3yQIxS7g+7Gsxt62qe54YXNdy1D71QPK4ypyYJ4jIC CU9OlGwQ==; Received: from cpe-50-113-36-248.hawaii.res.rr.com ([50.113.36.248]:37246 helo=poto-foou.tsdye.online) by box2035.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mjVyw-000Kk7-B7 for emacs-orgmode@gnu.org; Sat, 06 Nov 2021 18:24:22 -0600 References: <87sfwg4jrr.fsf@gmail.com> <3f63e0ad-9788-4169-5abf-36094eac053e@gmail.com> User-agent: mu4e 1.2.0; emacs 27.1 From: "Thomas S. Dye" To: emacs-orgmode@gnu.org Subject: Re: Storing database credentials outside an org file In-reply-to: <3f63e0ad-9788-4169-5abf-36094eac053e@gmail.com> Date: Sat, 06 Nov 2021 14:24:20 -1000 Message-ID: <87bl2w6cej.fsf@tsdye.online> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box2035.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tsdye.online X-BWhitelist: no X-Source-IP: 50.113.36.248 X-Source-L: No X-Exim-ID: 1mjVyw-000Kk7-B7 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-50-113-36-248.hawaii.res.rr.com (poto-foou.tsdye.online) [50.113.36.248]:37246 X-Source-Auth: tsd@tsdye.online X-Email-Count: 1 X-Source-Cap: dHNkeWVvbmw7dHNkeWVvbmw7Ym94MjAzNS5ibHVlaG9zdC5jb20= X-Local-Domain: yes Received-SPF: pass client-ip=192.185.145.102; envelope-from=tsd@tsdye.online; helo=gateway32.websitewelcome.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.001, PDS_OTHER_BAD_TLD=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636244730; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vl4kmunqLH0UbpJoxm+oDswhwkA7R0S9cffwmjW1AsQ=; b=VbREK58/9429+rWq+JufEzbdlk7fGKEy3V2QaQWGvNX8PIkLB4ApY62WRhyKKJlqvnw7tZ LI3MwFbv70QlpfaDlc4F7Pm6DBPA/XVziCK+fD1GPqrpb3yTrT+gZCp2xpVEBApA9Hj8vD ObaudoHU7eJ2l06XaGJDKwPqlDhOO+nVz8j75wNz0W+dHkf+488xebRWS2ySOQ4K5QRWJ1 WQPw4PHZ+wjNNB7zCoTgsM3N2Xu0ohvHgdVxE9f0839z7IdRtavg1nfpulE9UTzpCfls69 lAg/WufgRKU+kh0aJtT5JMZjm9anPepWyBbDEi64YuAt4r6ggLIp5aJqOrEaRQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636244730; a=rsa-sha256; cv=none; b=lWr2wt8072KpSXzBuHGiRxGCH+4LBeyOsav1H5G+WYGgNC2d9BRqFBwRPkLIbGyM4liAhn l+zs6sAfQl5njuhkPNIFgsn1VLRpyCqRv5u0VTJekgtqgAVmVaEE1UbU8Fj5R6/ln4xFbE mOj/N2g6CHtYqYXUUrFbHCW/Aj/oVm5SSlz725+XUkM5KQgpr3Cx5G/YoD9VShlHNmiuNc L7lI4x9cQLysFSgeoFNcfFVp/hdAMggOjgngDaSJz3p9KZxNhD1zgQOag29W1sWq/Vs08W qkXmqifZjQtixAQz3sswN6crWL306QDRa41sBBBPhSSiRuXL+7zWR9Zam9gumQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tsdye.online header.s=default header.b=bnPkqFmy; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tsdye.online header.s=default header.b=bnPkqFmy; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0EE0392DF X-Spam-Score: -1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: yrvXnQ+nLTw/ Aloha Mike, Mike Gauland writes: > On 1/11/21 4:33 pm, Tim Cross wrote: >> Mike Gauland 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