You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Nicola Scendoni <ns...@adobe.com.INVALID> on 2025/03/28 10:46:49 UTC

Proposal to Split sling-commons-crypto into API and Implementation Bundles

Hi all,
Currently, sling-commons-crypto contains both interfaces and implementations.
I would like to contribute to the sling-auth-oauth-client bundle, which depends on sling-commons-crypto, but I prefer to avoid including its implementation in our product. Ideally, sling-auth-oauth-client would depend on a separate SPI package, which would require splitting sling-commons-crypto into an API (SPI) and an implementation bundle.
Would you agree with this approach?

Best regards,

Nicola Scendoni

[1] sling-commons-crypto https://github.com/apache/sling-org-apache-sling-commons-crypto
[2] sling-auth-oauth-client https://github.com/apache/sling-org-apache-sling-auth-oauth-client

Re: Proposal to Split sling-commons-crypto into API and Implementation Bundles

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Wednesday, April 2, 2025 11:44:52 AM Central European Summer Time Nicola 
Scendoni wrote:
> On 2025/03/28 15:45:04 Oliver Lietz wrote:
> 
> Hi Oliver,

Hi Nicola,

> > > Currently, sling-commons-crypto contains both interfaces and
> > > implementations. I would like to contribute to the
> > > sling-auth-oauth-client
> > > bundle, which depends on sling-commons-crypto, but I prefer to avoid
> > > including its implementation in our product. Ideally,
> > > sling-auth-oauth-client would depend on a separate SPI package, which
> > > would
> > > require splitting sling-commons-crypto into an API (SPI) and an
> > > implementation bundle. Would you agree with this approach?
> > 
> > What are you trying to achieve? Or what are you trying to prevent?
> > The bundle is quite lightweight and all the dependencies of the included
> > implementations are optional.
> 
> Starting from the work done in sling-auth-oauth-client I'm trying to
> implement an OpenID Connect Authentication Handler. My plan is to use a
> different crypto provider and implement the interfaces exposed by
> sling-commons-crypto. Having the interfaces and implementation in the same
> package force me to include sling-commons-crypto bundle in our product
> ending up with 2 crypto implementations.

That shouldn't be a problem. You also have for example multiple 
implementations of Authentication (!), Scripting and Oak in your product.
And customers can deploy additional implementations anyway for good reasons.

I really see no benefit in splitting up Commons Crypto into multiple modules 
unless there is a second open source implementation which could be used 
instead of Jasypt.
Sling and OSGi in general lack resources and splitting up would cause 
unnecessary overhead/work we could spend on other topics.

I'm clearly against splitting up Commons Crypto.

Regards,
O.

> Regards
> 
> Nicola





Re: Proposal to Split sling-commons-crypto into API and Implementation Bundles

Posted by Nicola Scendoni <ns...@apache.org>.
On 2025/03/28 15:45:04 Oliver Lietz wrote:

Hi Oliver,

> > Currently, sling-commons-crypto contains both interfaces and
> > implementations. I would like to contribute to the sling-auth-oauth-client
> > bundle, which depends on sling-commons-crypto, but I prefer to avoid
> > including its implementation in our product. Ideally,
> > sling-auth-oauth-client would depend on a separate SPI package, which would
> > require splitting sling-commons-crypto into an API (SPI) and an
> > implementation bundle. Would you agree with this approach?
> 
> What are you trying to achieve? Or what are you trying to prevent?
> The bundle is quite lightweight and all the dependencies of the included 
> implementations are optional.
> 

Starting from the work done in sling-auth-oauth-client I'm trying to implement an OpenID Connect Authentication Handler.
My plan is to use a different crypto provider and implement the interfaces exposed by sling-commons-crypto.
Having the interfaces and implementation in the same package force me to include sling-commons-crypto bundle in our product ending up with 2 crypto implementations.

Regards

Nicola

Re: Proposal to Split sling-commons-crypto into API and Implementation Bundles

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Friday, March 28, 2025 11:46:49 AM Central European Standard Time Nicola 
Scendoni wrote:
> Hi all,

Hi Nicola,

> Currently, sling-commons-crypto contains both interfaces and
> implementations. I would like to contribute to the sling-auth-oauth-client
> bundle, which depends on sling-commons-crypto, but I prefer to avoid
> including its implementation in our product. Ideally,
> sling-auth-oauth-client would depend on a separate SPI package, which would
> require splitting sling-commons-crypto into an API (SPI) and an
> implementation bundle. Would you agree with this approach?

What are you trying to achieve? Or what are you trying to prevent?
The bundle is quite lightweight and all the dependencies of the included 
implementations are optional.

Regards,
O.


> Best regards,
> 
> Nicola Scendoni
> 
> [1] sling-commons-crypto
> https://github.com/apache/sling-org-apache-sling-commons-crypto [2]
> sling-auth-oauth-client
> https://github.com/apache/sling-org-apache-sling-auth-oauth-client





Re: Proposal to Split sling-commons-crypto into API and Implementation Bundles

Posted by Nicola Scendoni <ns...@apache.org>.
> I like the suggestion but maybe there are alternatives that don't require a major version increase.
> Did you look into that already?

Other than include the sling-commons-crypto bundle with his implementation in my product, I may create my own bundle with the spi only.
As suggested by Konrad I'll create a ticket and prepare a PR.

Regards

Nicola

Re: Proposal to Split sling-commons-crypto into API and Implementation Bundles

Posted by Angela Schreiber <an...@adobe.com.INVALID>.
Ciao Nicola

Thanks for bringing this to the Sling dev list for discussion!

I like the suggestion but maybe there are alternatives that don't require a major version increase.
Did you look into that already?

Kind regards
Angela

________________________________
From: Nicola Scendoni <ns...@adobe.com.INVALID>
Sent: Friday, March 28, 2025 11:46
To: dev@sling.apache.org <de...@sling.apache.org>
Subject: Proposal to Split sling-commons-crypto into API and Implementation Bundles

EXTERNAL: Use caution when clicking on links or opening attachments.


Hi all,
Currently, sling-commons-crypto contains both interfaces and implementations.
I would like to contribute to the sling-auth-oauth-client bundle, which depends on sling-commons-crypto, but I prefer to avoid including its implementation in our product. Ideally, sling-auth-oauth-client would depend on a separate SPI package, which would require splitting sling-commons-crypto into an API (SPI) and an implementation bundle.
Would you agree with this approach?

Best regards,

Nicola Scendoni

[1] sling-commons-crypto https://github.com/apache/sling-org-apache-sling-commons-crypto
[2] sling-auth-oauth-client https://github.com/apache/sling-org-apache-sling-auth-oauth-client

Re: Proposal to Split sling-commons-crypto into API and Implementation Bundles

Posted by Konrad Windszus <ko...@windszus.net>.
Hi Nicola,
From my perspective this should be fine. We just need a major increment of the version with the next release as this is a backwards-incompatible change.
Please raise a JIRA ticket for it at https://issues.apache.org/jira/projects/SLING/issues and a PR for the splitting.

Thanks,
Konrad

> On 28. Mar 2025, at 11:46, Nicola Scendoni <ns...@adobe.com.INVALID> wrote:
> 
> Hi all,
> Currently, sling-commons-crypto contains both interfaces and implementations.
> I would like to contribute to the sling-auth-oauth-client bundle, which depends on sling-commons-crypto, but I prefer to avoid including its implementation in our product. Ideally, sling-auth-oauth-client would depend on a separate SPI package, which would require splitting sling-commons-crypto into an API (SPI) and an implementation bundle.
> Would you agree with this approach?
> 
> Best regards,
> 
> Nicola Scendoni
> 
> [1] sling-commons-crypto https://github.com/apache/sling-org-apache-sling-commons-crypto
> [2] sling-auth-oauth-client https://github.com/apache/sling-org-apache-sling-auth-oauth-client