Java .pgpass reader - Mailing list pgsql-jdbc

From Scott Langley
Subject Java .pgpass reader
Date
Msg-id 4C1912D0.8010405@scharp.org
Whole thread Raw
Responses Re: Java .pgpass reader  (Radosław Smogura <rsmogura@softperience.eu>)
List pgsql-jdbc
Did anyone ever implement code in Java to read Postgres configuration
information from a user's .pgpass file - or a more general
pg_service.conf - as discussed in this thread back in 2006?
>
>     * *From*: David Fetter <david(at)fetter(dot)org>
>     * *To*: PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
>     * *Subject*: pg_service.conf ?
>     * *Date*: Mon, 13 Mar 2006 19:23:06 -0800
>
http://archives.postgresql.org/pgsql-jdbc/2006-03/msg00060.php
http://groups.google.com/group/pgsql.interfaces.jdbc/browse_thread/thread/fa5669c89282d898/0f438795270b1a3a

My organization uses .pgpass files to securely store and read user's
passwords when user run applications in Perl and Python but currently
not  for Java.

A search on Google finds one implementation in Java for reading
configuration info from a .pgpass file, but it is provided under a
somewhat restrictive license:

http://rb.dcache.org/r/1308/

modules/srm/src/org/dcache/srm/util/Pgpass.java
<http://rb.dcache.org/r/1308/diff/1/?file=9469#file9469line54>

http://www.dcache.org/manuals/dCacheSoftwareLicence.html


Of course, it's not like the implementation of this class is very hard,
but why reinvent the wheel if you don't have to.

Thanks.

--
Scott Langley
Systems Analyst/Programmer
Statistical Center for HIV/AIDS Research and Prevention (SCHARP)
Fred Hutchinson Cancer Research Center
Seattle, Washington
slangley@scharp.org



pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Connecting to postgresql using SSPI via JDBC
Next
From: Chris Browne
Date:
Subject: Re: Java .pgpass reader