Closed siepkes closed 6 years ago
@siepkes two comments (because I ran into this, too, back when I was getting Wren:DS builds going):
sign-tools-jar
that's part of https://github.com/WrenSecurity/wrensec-deploy-tool for this use case. however, you'd need the Wren signing key to deploy the GPG sig for your tools.jar
. let's sync-up on Gitter because it's probably time I share the key with someone other than me.one other question -- is there an environment variable we can tap into to get the flavor of the JDK? if so, we can include that in the version string. previously, the POM wasn't even depending on a specific version of the tools.jar
; I made it more specific so we could at least differentiate between major and minor versions. we could add the distribution name in that version as well, and then we'd only have to publish sigs as users run into versions we don't yet have a sig for.
alternatively, we could submit a PR to pgpverify that adds an option to skip verification of provided artifacts.
@Kortanul I think it might be best we provide an option to skip verification all together of tools.jar
. There are just too many flavors. All Linux distro's will have a different signature due to a timestamp in the manifest.
Also I think verification of the integrity of the JDK is something that falls out of our scope and in the scope of the OS installation / Distro. In theory someone might just as well have rigged someone's Maven, javac
or OS kernel to inject bad code in to the wren build.
@siepkes #8 should address this for you based on master
. Since a lot of FR projects depend on older versions of the parent POM, I have fixed our copies of artifacts to also use the new version so that tools.jar
does not fail.
Summary
The parent POM specifies the locally installed
tools.jar
should be used (which is a good thing). However verifying the PGP signature fails unless you have the exact version which is specified in the hostedtrustedkeys.properties
file.It is impractical to specify a signature for all possible
tools.jar
JAR's. Even if we would do so there is an other problem we would bump into; The same versions oftools.jar
can have different signatures. For example I use CentOS 7.4 which uses an OpenJDK version build by the CentOS project. However the same version by Ubuntu will probably have a different signature because for example theMANIFEST.MF
file contains the version of the JDK used to create thetools.jar
JAR.Since
tools.jar
is part of the JDK installation I think verifying integrity oftools.jar
is out of scope for the WrenSecurity project; It's something the distribution takes care of by using signed packages. Iftools.jar
is compromised the compiler or Maven itself might be compromised as well.Steps
wrensec-parent
)tools.jar
intrustedkeys.properties
.mvn clean install
in the root of the checked-out project.Expected
Project builds without issue.
Current
Build fails with the follwoing error:
Workarounds
mvn -Dignore-artifact-sigs clean install
works, but that completely skips PGP verification of artifacts (less secure).