FW: optional JAAS login - attachment - Mailing list pgsql-jdbc

From Kronus David
Subject FW: optional JAAS login - attachment
Date
Msg-id 832f294977d2441781fd3be90e7c2a5f@04d1395a64934c49a9ea5cf31a62c65e
Whole thread Raw
List pgsql-jdbc
Ok, sorry, forgot to attach the patch. Here it is.
David



>---------------------------------------------------------
>Od: Kronus David
>Přijato: 5.3.2010 22:48:12
>Předmět: optional JAAS login
>
>Hi pgjdbc devs,
>I made a little change in the driver for myself and I'd like to offer it for inclusion in the official distribution.
>
>I was experimenting with the JAAS+GSS authentication provided by the driver and found out that I'd like to have the
possibilityto perform the JAAS login myself in the application that uses your pgjdbc driver. This means that I'd like
tohave the possibility of a full control of the creation of LoginContext. Currently the driver always creates this
object,the only configurable thing is the name of JAAS configuration to be used. However, problems include
specificationof JAAS login.conf file location (I know, there is this java system property but that's really not much
flexible)and the possibility to provide some functional implementation of the callback which might ask for a password
ifneeded (currently if there are no valid credentials in the ticketcache and there was no password provided initially
tothe driver, the authentication fails - it's much better to have the possibility to ask for the password only when
needed,I guess). 
>
>On the hand I understand that for many uses it's handy to have the plugin actually perform the login so I decided to
gowith parameter 'performJaasLogin' which is true by default and can be set to 'false' in the connection URL. Then it
determineswhether the login is performed by the driver (value 'true') or not. The code change is trivial and I've
testedit - it works as expected. You might use my ant task 'jaasauth' with the standard ant task 'sql' (specify empty
password)to perform the JAAS authentication if you want (look at http://dave.matfyz.cz/page/en/software.html for
downloadand documentation of 'jaasauth'). 
>
>Of course if you think there is a need to modify the code change a bit let me know...
>
>Greetings!
>David

Attachment

pgsql-jdbc by date:

Previous
From: "Kronus David"
Date:
Subject: optional JAAS login
Next
From: Thomas Kellerer
Date:
Subject: Driver not returning the type for TYPEs