Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blog: SLSA Build L3 for Eclipse Temurin #2524

Merged
merged 23 commits into from
Jan 9, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
50e0dc1
blog: SLSA Build L3 for Eclipse Temurin
sxa Dec 19, 2023
5a939a4
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
bc31c7b
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
d6baa52
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
f73580b
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
d2e244f
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
174237a
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
e606a96
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
a09949d
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
f618413
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
3cdae49
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
e667b17
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 21, 2023
59c82e7
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 22, 2023
a59569a
Update content/blog/slsabuild3-temurin/index.md
sxa Dec 28, 2023
b8f8a87
Update with references to GPG blog
sxa Dec 28, 2023
438feb7
Update with SBoM download information
sxa Dec 28, 2023
8cea66f
Placate linter
sxa Dec 28, 2023
0afc18b
Update content/blog/slsabuild3-temurin/index.md
sxa Jan 8, 2024
f853aeb
Define SBoM
sxa Jan 8, 2024
c673d1a
Update publish date on blog to Tuesday 9th Jan
sxa Jan 8, 2024
762f3e6
Adjustments since we are posting in 2024
sxa Jan 8, 2024
74a71c4
Add detail on the SHA being in the components section of the SBoM
sxa Jan 8, 2024
42fd085
January 2024 GA - and beyond
sxa Jan 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions content/blog/slsabuild3-temurin/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: SLSA build level 3 compliance on Linux and macOS for Eclipse Temurin
date: "2024-01-09T17:00:00+00:00"
author: sxa
description: Eclipse Temurin by Adoptium is compliant with build level 3 of the SLSA 1.0 secure development framework on Linux and macOS.
tags:
- temurin
- security
---

## Introduction

Supply-chain Levels for Software Artifacts, or [SLSA](https://slsa.dev), is a framework with individual levels that software
producers can work towards to make their software more secure, and consumers
can use to make decisions based on the software package’s security posture. The
Adoptium project has worked closely with the Eclipse Foundation security
team to work towards making the Eclipse Temurin compliant with the SLSA
specification's build requirements.

[At the end](https://adoptium.net/blog/2022/11/slsa2-temurin/)
[of 2022](https://newsroom.eclipse.org/eclipse-newsletter/2022/december/eclipse-temurin-slsa-level-two-compliant)
we achieved compliance with level 2 of the SLSA v0.1 specification. In
April 2023 SLSA version 1.0 was released and split the specification into
multiple "tracks", of which the build track is the only one currently
published. If you're not familiar with the changes, check out
[this lightning talk](https://youtu.be/uLXzyutZEmQ?si=XjD9H6uO_GEjJVBG) from one
of my colleagues. We have been able to build on our work done previously to
meet build level 3 for Linux and macOS for Eclipse Temurin's build and
distribution.

## What have you done since declaring SLSA level 2?

We have built on top of the work covered in the earlier blog to meet the
sxa marked this conversation as resolved.
Show resolved Hide resolved
requirements of SLSA build level 3. The additional requirements were as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
requirements of SLSA build level 3. The additional requirements were as
hardened builds requirements of [SLSA build level 3](https://slsa.dev/spec/v1.0/levels). The additional requirements were as

follows:

### Prevent runs from influencing one another, even within the same project

In order to achieve independence between build runs, we perform all of our
Linux builds in Docker containers. These containers are instantiated, the
build is run and the results saved, and then we shut down the container.
This way there can be no influencing from caching or from one run impacting
a subsequent one.

We have implemented a comparable system on macOS by using
[MacStadium's Orka](https://www.macstadium.com/orka) which allows us to dynamically spin up virtual machines for each
build run to give us a comparable level of isolation.

For other operating systems that we build on - Windows, AIX and Solaris - we
are not currently set up to do something equivalent which is why we are not
claiming SLSA build level 3 for those builds.

### Verifying provenance artifacts

We have introduced a build verification step which can take the Software
Bill of Materials (SBoM) produced as part of the build output and verify its
contents as far as is practical. This will do some checks to ensure that
the fields are valid and match expectations about how the product has been
built. This job is stored in
https://github.com/adoptium/temurin-build/blob/master/tooling as
release_download_test.sh which performs SHA and GPG checks as well as
running some basic checks on the downloads. It also calls
validateSBOMcontent.sh to check the SBoM contents to make sure the
dependencies, including compilers, listed in there match expectations. The
SBoM contents now also includes the SHA256 checksums of all of the build
artifacts in the `components` section. There is information on
programatically verifying the GPG signatures in
[an earlier blog](https://adoptium.net/blog/2022/07/gpg-signed-releases/)

In addition to all these checks we also verify after each build that the
build code has the features enabled that it should have. This is done using
a custom AQA test job called "smoke tests" which use the tests in the build
repository in the
[buildAndPackage](https://github.com/adoptium/temurin-build/tree/master/test/functional/buildAndPackage)
directory and test various aspects of the built JDK If these checks fail
then these will be trapped early on.
Comment on lines +70 to +76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In addition to all these checks we also verify after each build that the
build code has the features enabled that it should have. This is done using
a custom AQA test job called "smoke tests" which use the tests in the build
repository in the
[buildAndPackage](https://github.com/adoptium/temurin-build/tree/master/test/functional/buildAndPackage)
directory and test various aspects of the built JDK If these checks fail
then these will be trapped early on.
In addition to all these checks we also verify after each build that the
built code has the features enabled that it should have. This is done using
a custom AQAvit test job called "smoke tests" to ensure various aspects of
the built JDK are correct. If these checks fail then the build will be trapped early on.

Copy link
Member Author

@sxa sxa Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the point about the release download tests I wanted to have some more details with that link in place to help encourage people to understand exactly what we're doing and hopefully encourage people to get involved/contribute into the project (And also so I have the reference to make it easy to find in the future!)


We expect that all of these checks will be enhanced over time, particularly
as we add more details into the SBoM.

The current SBoM can be downloaded via the adoptium API. If you are already
familiar with the API for downloading JDKs, then replacing `jdk` with `sbom`
in the URL will let you download the SBoM. For example, this will download
the latest GA SBoM for Temurin 21 on Linux/x64:

- https://api.adoptopenjdk.net/v3/binary/latest/21/ga/linux/x64/sbom/hotspot/normal/adoptopenjdk?project=jdk

Note that there is an enhanced version of the SBoM which includes more
details on the artifacts that is already in the nightly builds and will be
included for the January 2024 GA releases and beyond. We will not (and
should not) regenerate the SBoM for older releases.

### Prevent secret material used to sign the provenance from being accessible to user-defined build steps

The signing jobs that we use are all contained within our Jenkins CI system.
These are independent of the build jobs and run as a
subsequent step to avoid the credentials ever being available to the build
jobs.

## What's in the future?

At the moment SLSA build level 3 is the highest level available. We will
look to keep up to date as updates to the specification are made available.
We expect a "level 4" on the build track, and also other tracks to cover
source code.

We are also continuing to work on our [reproducible builds](https://adoptium.net/blog/2023/09/Reproducible-Comparison-Builds/) which gives an
extra layer of confidence that any customers of Temurin are able to rebuild
from source code in order to independently verify that nothing in our build
systems have been tampered with or introduced any unexpected code. Anyone
(yes, even you!) can use our fully open-source setup and build scripts to
rebuild the Temurin JDK, and we encourage you to give it a try!
Loading