in reply to Hide DBI password in scripts
Replies are listed 'Best First'. | |
---|---|
Re^2: Hide DBI password in scripts
by afoken (Chancellor) on Jan 14, 2018 at 17:21 UTC | |
Well, let's see what we can make of this bold statement: PostgreSQL can in fact authenticate against an LDAP server. This is documented in https://www.postgresql.org/docs/9.6/static/auth-methods.html (Note: Intentionally linking to 9.6, not current). But let's have a look at the documented details (emphasis mine):
Or, summarized: PostgreSQL's LDAP authentication uses username and password passed to DBI->connect(). You have to provide username and password, no matter how you configure LDAP authentication. This is how LDAP works, nicely summarized, and independent from the relational database engine used by DBI. In other words: LDAP can not help here. You have to provide a secret password to use LDAP. Now, Kerberos. Quoting the same page:
So, yes, Kerberos can be used to avoid a password if the database supports it. But: Does your database support it? MySQL: LDAP, PAM, but no Kerberos. Windows authentication requires plugins on client and server, and won't help with non-Windows system. (And please don't make me think about clever ideas like "client-side cleartext authentication".) So, Kerberos won't help you with MySQL. FAIL. MS SQL Server: Either pure Windows authentication, or Windows authentication alternatively to username/password stored in SQL server. Not even LDAP, and no trace of Kerberos. So: FAIL. Oracle: LDAP, Kerberos, and many other. I did not expect less. PASS. DB2: LDAP is supported, and Kerberos is, too. PASS. PostgreSQL: see above. PASS. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-) | [reply] |
by erix (Prior) on Jan 14, 2018 at 17:52 UTC | |
Just as general postgres authentication information (I don't think it's in any way applicable to the OP's question): PostgreSQL 10 has scram authentication[1] PostgreSQL 11 (expected fall 2018) adds channel binding to scram authentication [2] [1] http://paquier.xyz/postgresql-2/postgres-10-scram-authentication/ [2] http://paquier.xyz/postgresql-2/postgres-11-scram-channel-binding/ | [reply] [d/l] [select] |
by danielgr (Novice) on Jan 17, 2018 at 17:00 UTC | |
Quick question: Can you authenticate in Kerberos only for "registered" scripts within a single Linux user? | [reply] |
Re^2: Hide DBI password in scripts
by Your Mother (Archbishop) on Jan 14, 2018 at 16:15 UTC | |
[reply] |