pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Koczan <pjkoczan@gmail.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org
Cc: sfrost@snowman.net
Subject: Re: GSSAPI/KRB5 and JDBC (again)
Date: Tue, 29 Jul 2008 12:31:20 -0500
Message-ID: <4544e0330807291031l3b0f7778q3c3ac4d37bfed76a@mail.gmail.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0807290027090.2814@leary.csoft.net>
References: <4544e0330807241604ye974d07x34408ac3cc11cf3e@mail.gmail.com>
	<20080725005012.GB16005@tamriel.snowman.net>
	<4544e0330807251040uea445cao29adebc9afa71127@mail.gmail.com>
	<Pine.BSO.4.64.0807290027090.2814@leary.csoft.net>

On Mon, Jul 28, 2008 at 11:35 PM, Kris Jurka <books@ejurka.com> wrote:
> It tries to use the provided password only if it doesn't find an existing
> set of credentials.  It definitely works for me without a password after
> kinit(ing).  Perhaps your ticket cache or keytab is in a non-standard place?
>  This is the first and only time I've setup a kerberos server, so I may have
> done something unusual on my end too, but I basically just did a stock
> Debian install.  Perhaps you need some additional options from here in your
> login.conf to let it know things particular to your setup?
>
> http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/spec/com/sun/security/auth/module/Krb5LoginM...

Our ticket cache location is somewhat random on each login, but it can
always be reliably found by looking at the environment variable
KRB5CCNAME. I can specify the temporary location, but it would be much
better to somehow be able to grab the auth info from that.

I got this working after a few attempts and reading up on Java auth
configs. It looks like I have to have the line which tells which user
to use, i.e.

        props.setProperty("user", "koczan");

...but it has to be the same as the user/principal in the ticket
cache. It would be nice in the case of web scripts or cron jobs (where
things may run as different or arbitrary users) if I could specify
that elsewhere without having to recompile. I tried specifying the
principal in the config file, and I tried specifying the user on the
command line with -D, but neither worked without the setProperty line
in the .java file.

org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name
specified in startup packet

Still, this is a lot further along compared to where I was a week ago.
Thanks again.

Peter



view thread (7+ messages)  latest in thread

Message-ID: <4544e0330807291031l3b0f7778q3c3ac4d37bfed76a@mail.gmail.com>
Permalink:  ../4544e0330807291031l3b0f7778q3c3ac4d37bfed76a@mail.gmail.com/
Also on:    postgresql.org/message-id/4544e0330807291031l3b0f7778q3c3ac4d37bfed76a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pjkoczan@gmail.com, books@ejurka.com, sfrost@snowman.net
  Subject: Re: GSSAPI/KRB5 and JDBC (again)
  In-Reply-To: <4544e0330807291031l3b0f7778q3c3ac4d37bfed76a@mail.gmail.com>
  References: <4544e0330807241604ye974d07x34408ac3cc11cf3e@mail.gmail.com> <20080725005012.GB16005@tamriel.snowman.net> <4544e0330807251040uea445cao29adebc9afa71127@mail.gmail.com> <Pine.BSO.4.64.0807290027090.2814@leary.csoft.net> <4544e0330807291031l3b0f7778q3c3ac4d37bfed76a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox