moditect / layrry

A Runner and API for Layered Java Applications
Apache License 2.0
335 stars 33 forks source link

Support for loading only signed jars and custom JVM #9

Open madduci opened 4 years ago

madduci commented 4 years ago

Hi

first of all, thanks for the effort in brining improvements in the java module system. May I ask you if you spot a room for adding some enforcing rules on modules themselves, such as loading codesigned modules only, especially with modern cryptographic algorithms.

It looks like SunEC provider will be removed from future Java versions (starting from 15) and if the code is signed with strong algorithms such as SHA512withECDSA, everything added in a policy file is just not accepted, since the provider itself cannot be instantiated.

Another great addition would be the support for customized JVM created with jlink and jpackage.

gunnarmorling commented 4 years ago

Hey, thanks for the nice words! Indeed it's my hope that projects like Layrry can help with adoption of JPMS. Re enforcing rules, I certainly could see such feature; would you have other examples in mind where such validation could be needed? I have not much knowledge about signing; could you elaborate perhaps a bit how that feature could look like?

Re custom runtime images with jlink, yes, that's definitely on the roadmap. But details are still blurry to me, as I think we'd have to build the image ourselves, based on the modules defined in a layers configuration. Also I'm not sure how layered modules could be loaded from such runtime image. I think it's possible but will require some more exploration. Any help will be welcomed of course :)