pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedSCRAM client vs pgjdbc packaging
5+ messages / 5 participants
[nested] [flat]
* SCRAM client vs pgjdbc packaging
@ 2017-07-13 11:14 Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Sitnikov @ 2017-07-13 11:14 UTC (permalink / raw)
To: pgsql-jdbc
Hello,
Álvaro has implemented SCRAM support for pgjdbc (see
https://github.com/pgjdbc/pgjdbc/pull/842 ), and it would be great to merge
that.
However, there might be a packaging issue.
Technically speaking, the client is implemented in
https://github.com/ongres/scram (BSD 2-clause "Simplified" License).
I expect SCRAM to become the main way to authenticate, so it would be nice
if pgjdbc could just work with no need to add different jars to the
classpath.
The question is how should we deal with the dependency.
1) We could make it optional & dynamic. That is we refrain from including
the client to pgjdbc artifacts. In case backend is configured for SASL,
pgjdbc would bail out with "please add scram-client-whatever.jar to the
classpath" error.
The drawback is pgjdbc would require a certain versions of scram-client, so
it might cause troubles in future if application code and pgjdbc would
require different incompatible versions of the client.
2) We could incorporate scram-client to the pgjdbc artifacts, so it would
just work if backend requests SASL. This option enables us to repackage the
client with our own name (e.g. org.postgresql.ongress.scram...), so it will
enable applications to use scram-clients of their choice.
I'm inclined to #2 (incorporate scram-client at build time), however I am
not sure if it will ripple via some packaging issues.
Note: I expect we might want to add new dependencies later (e.g. for "SASL
string preparation", or Netty for networking layer), so it would be nice to
know limits/edge packaging cases.
Vladimir
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: SCRAM client vs pgjdbc packaging
@ 2017-07-13 15:06 Jorge Solórzano <jorsol@gmail.com>
parent: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Jorge Solórzano @ 2017-07-13 15:06 UTC (permalink / raw)
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc
I vote for #2, with the maven-shade-plugin it should be easy to have an
uber-jar.
Jorge Solórzano
On Thu, Jul 13, 2017 at 5:14 AM, Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> wrote:
> Hello,
>
> Álvaro has implemented SCRAM support for pgjdbc (see https://github.com/
> pgjdbc/pgjdbc/pull/842 ), and it would be great to merge that.
>
> However, there might be a packaging issue.
>
> Technically speaking, the client is implemented in
> https://github.com/ongres/scram (BSD 2-clause "Simplified" License).
>
> I expect SCRAM to become the main way to authenticate, so it would be nice
> if pgjdbc could just work with no need to add different jars to the
> classpath.
>
> The question is how should we deal with the dependency.
>
> 1) We could make it optional & dynamic. That is we refrain from including
> the client to pgjdbc artifacts. In case backend is configured for SASL,
> pgjdbc would bail out with "please add scram-client-whatever.jar to the
> classpath" error.
> The drawback is pgjdbc would require a certain versions of scram-client,
> so it might cause troubles in future if application code and pgjdbc would
> require different incompatible versions of the client.
>
> 2) We could incorporate scram-client to the pgjdbc artifacts, so it would
> just work if backend requests SASL. This option enables us to repackage the
> client with our own name (e.g. org.postgresql.ongress.scram...), so it
> will enable applications to use scram-clients of their choice.
>
> I'm inclined to #2 (incorporate scram-client at build time), however I am
> not sure if it will ripple via some packaging issues.
>
> Note: I expect we might want to add new dependencies later (e.g. for "SASL
> string preparation", or Netty for networking layer), so it would be nice to
> know limits/edge packaging cases.
>
> Vladimir
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: SCRAM client vs pgjdbc packaging
@ 2017-07-13 18:58 Dave Cramer <pg@fastcrypt.com>
parent: Jorge Solórzano <jorsol@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Dave Cramer @ 2017-07-13 18:58 UTC (permalink / raw)
To: Jorge Solórzano <jorsol@gmail.com>; +Cc: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc
# 2 is my vote!
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
On 13 July 2017 at 18:06, Jorge Solórzano <jorsol@gmail.com> wrote:
> I vote for #2, with the maven-shade-plugin it should be easy to have an
> uber-jar.
>
> Jorge Solórzano
>
> On Thu, Jul 13, 2017 at 5:14 AM, Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com> wrote:
>
>> Hello,
>>
>> Álvaro has implemented SCRAM support for pgjdbc (see
>> https://github.com/pgjdbc/pgjdbc/pull/842 ), and it would be great to
>> merge that.
>>
>> However, there might be a packaging issue.
>>
>> Technically speaking, the client is implemented in
>> https://github.com/ongres/scram (BSD 2-clause "Simplified" License).
>>
>> I expect SCRAM to become the main way to authenticate, so it would be
>> nice if pgjdbc could just work with no need to add different jars to the
>> classpath.
>>
>> The question is how should we deal with the dependency.
>>
>> 1) We could make it optional & dynamic. That is we refrain from including
>> the client to pgjdbc artifacts. In case backend is configured for SASL,
>> pgjdbc would bail out with "please add scram-client-whatever.jar to the
>> classpath" error.
>> The drawback is pgjdbc would require a certain versions of scram-client,
>> so it might cause troubles in future if application code and pgjdbc would
>> require different incompatible versions of the client.
>>
>> 2) We could incorporate scram-client to the pgjdbc artifacts, so it would
>> just work if backend requests SASL. This option enables us to repackage the
>> client with our own name (e.g. org.postgresql.ongress.scram...), so it
>> will enable applications to use scram-clients of their choice.
>>
>> I'm inclined to #2 (incorporate scram-client at build time), however I am
>> not sure if it will ripple via some packaging issues.
>>
>> Note: I expect we might want to add new dependencies later (e.g. for
>> "SASL string preparation", or Netty for networking layer), so it would be
>> nice to know limits/edge packaging cases.
>>
>> Vladimir
>>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: SCRAM client vs pgjdbc packaging
@ 2017-07-15 13:46 Álvaro Hernández Tortosa <aht@8kdata.com>
parent: Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 5+ messages in thread
From: Álvaro Hernández Tortosa @ 2017-07-15 13:46 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; Jorge Solórzano <jorsol@gmail.com>; +Cc: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc
I completely agree.
Maven/XXX users will just pull the dependency and their transitive
dependencies. Shading is only necessary for users who directly download
and use the jar. And for these cases, the easier for the user, the better.
I will update the PR with the changes to Maven.
Álvaro
On 13/07/17 21:58, Dave Cramer wrote:
> # 2 is my vote!
>
> Dave Cramer
>
> davec@postgresintl.com <mailto:davec@postgresintl.com>
> www.postgresintl.com <http://www.postgresintl.com;
>
> On 13 July 2017 at 18:06, Jorge Solórzano <jorsol@gmail.com
> <mailto:jorsol@gmail.com>> wrote:
>
> I vote for #2, with the maven-shade-plugin it should be easy to
> have an uber-jar.
>
> Jorge Solórzano
>
> On Thu, Jul 13, 2017 at 5:14 AM, Vladimir Sitnikov
> <sitnikov.vladimir@gmail.com <mailto:sitnikov.vladimir@gmail.com>>
> wrote:
>
> Hello,
>
> Álvaro has implemented SCRAM support for pgjdbc (see
> https://github.com/pgjdbc/pgjdbc/pull/842
> <https://github.com/pgjdbc/pgjdbc/pull/842; ), and it would be
> great to merge that.
>
> However, there might be a packaging issue.
>
> Technically speaking, the client is implemented in
> https://github.com/ongres/scram
> <https://github.com/ongres/scram; (BSD 2-clause "Simplified"
> License).
>
> I expect SCRAM to become the main way to authenticate, so it
> would be nice if pgjdbc could just work with no need to add
> different jars to the classpath.
>
> The question is how should we deal with the dependency.
>
> 1) We could make it optional & dynamic. That is we refrain
> from including the client to pgjdbc artifacts. In case backend
> is configured for SASL, pgjdbc would bail out with "please add
> scram-client-whatever.jar to the classpath" error.
> The drawback is pgjdbc would require a certain versions of
> scram-client, so it might cause troubles in future if
> application code and pgjdbc would require different
> incompatible versions of the client.
>
> 2) We could incorporate scram-client to the pgjdbc artifacts,
> so it would just work if backend requests SASL. This option
> enables us to repackage the client with our own name (e.g.
> org.postgresql.ongress.scram...), so it will enable
> applications to use scram-clients of their choice.
>
> I'm inclined to #2 (incorporate scram-client at build time),
> however I am not sure if it will ripple via some packaging issues.
>
> Note: I expect we might want to add new dependencies later
> (e.g. for "SASL string preparation", or Netty for networking
> layer), so it would be nice to know limits/edge packaging cases.
>
> Vladimir
>
>
>
--
Álvaro Hernández Tortosa
-----------
<8K>data
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: SCRAM client vs pgjdbc packaging
@ 2017-07-15 17:21 Bear Giles <bgiles@coyotesong.com>
parent: Álvaro Hernández Tortosa <aht@8kdata.com>
0 siblings, 0 replies; 5+ messages in thread
From: Bear Giles @ 2017-07-15 17:21 UTC (permalink / raw)
To: Álvaro Hernández Tortosa <aht@8kdata.com>; +Cc: Dave Cramer <pg@fastcrypt.com>; Jorge Solórzano <jorsol@gmail.com>; Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; pgsql-jdbc
You can specify <optional>true</optional> on maven dependencies. This pulls
them (and transitive dependencies) for compilation but does not pull them
into build artifacts. It makes life a lot easier for developers when you
introduce dependencies that are only needed for specific functionality.
On Sat, Jul 15, 2017 at 7:46 AM, Álvaro Hernández Tortosa <aht@8kdata.com>
wrote:
>
> I completely agree.
>
> Maven/XXX users will just pull the dependency and their transitive
> dependencies. Shading is only necessary for users who directly download and
> use the jar. And for these cases, the easier for the user, the better.
>
> I will update the PR with the changes to Maven.
>
>
> Álvaro
>
>
>
>
> On 13/07/17 21:58, Dave Cramer wrote:
>
> # 2 is my vote!
>
> Dave Cramer
>
> davec@postgresintl.com
> www.postgresintl.com
>
> On 13 July 2017 at 18:06, Jorge Solórzano <jorsol@gmail.com> wrote:
>
>> I vote for #2, with the maven-shade-plugin it should be easy to have an
>> uber-jar.
>>
>> Jorge Solórzano
>>
>> On Thu, Jul 13, 2017 at 5:14 AM, Vladimir Sitnikov <
>> sitnikov.vladimir@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> Álvaro has implemented SCRAM support for pgjdbc (see
>>> https://github.com/pgjdbc/pgjdbc/pull/842 ), and it would be great to
>>> merge that.
>>>
>>> However, there might be a packaging issue.
>>>
>>> Technically speaking, the client is implemented in
>>> https://github.com/ongres/scram (BSD 2-clause "Simplified" License).
>>>
>>> I expect SCRAM to become the main way to authenticate, so it would be
>>> nice if pgjdbc could just work with no need to add different jars to the
>>> classpath.
>>>
>>> The question is how should we deal with the dependency.
>>>
>>> 1) We could make it optional & dynamic. That is we refrain from
>>> including the client to pgjdbc artifacts. In case backend is configured for
>>> SASL, pgjdbc would bail out with "please add scram-client-whatever.jar to
>>> the classpath" error.
>>> The drawback is pgjdbc would require a certain versions of scram-client,
>>> so it might cause troubles in future if application code and pgjdbc would
>>> require different incompatible versions of the client.
>>>
>>> 2) We could incorporate scram-client to the pgjdbc artifacts, so it
>>> would just work if backend requests SASL. This option enables us to
>>> repackage the client with our own name (e.g. org.postgresql.ongress.scram...),
>>> so it will enable applications to use scram-clients of their choice.
>>>
>>> I'm inclined to #2 (incorporate scram-client at build time), however I
>>> am not sure if it will ripple via some packaging issues.
>>>
>>> Note: I expect we might want to add new dependencies later (e.g. for
>>> "SASL string preparation", or Netty for networking layer), so it would be
>>> nice to know limits/edge packaging cases.
>>>
>>> Vladimir
>>>
>>
>>
>
> --
>
> Álvaro Hernández Tortosa
>
>
> -----------
> <8K>data
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2017-07-15 17:21 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-13 11:14 SCRAM client vs pgjdbc packaging Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2017-07-13 15:06 ` Jorge Solórzano <jorsol@gmail.com>
2017-07-13 18:58 ` Dave Cramer <pg@fastcrypt.com>
2017-07-15 13:46 ` Álvaro Hernández Tortosa <aht@8kdata.com>
2017-07-15 17:21 ` Bear Giles <bgiles@coyotesong.com>
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