<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-06-17T13:27:02-05:00</updated><id>/feed.xml</id><title type="html">Project Resistor</title><subtitle>A collaborative workspace for developing infrastructure for Fedora systems: secure kernel builds, Atomic AI developer images, and work-in-progress packages.</subtitle><author><name>Project Resistor Team</name></author><entry><title type="html">Pre-Built Kernel Modules for Fedora</title><link href="/2026/04/17/kernel-packaging.html" rel="alternate" type="text/html" title="Pre-Built Kernel Modules for Fedora" /><published>2026-04-17T00:00:00-05:00</published><updated>2026-04-17T00:00:00-05:00</updated><id>/2026/04/17/kernel-packaging</id><content type="html" xml:base="/2026/04/17/kernel-packaging.html"><![CDATA[<h2 id="tldr">TL;DR</h2>

<p>If you are interested in building alternate kernel packages or kernel module packages for Fedora, or if you’re interested in testing alternate kernels or kernel modules on Fedora, let’s collaborate.</p>

<h2 id="the-problem-fedora-works-well-unless-you-need-out-of-tree-drivers">The Problem: Fedora Works Well Unless You Need Out-of-Tree Drivers</h2>

<p>When browsing user forums, one of the most frequently described problems is a blank screen on boot. The causes vary:</p>

<ul>
  <li>Users haven’t followed all documented installation steps</li>
  <li>The system rebooted before the invisible background process of building the display driver module completed</li>
  <li>The build failed silently with no indication to the user why (perhaps disk space ran out)</li>
</ul>

<p>Whatever the specific cause, this is one of the top reasons Fedora is often not rated as a “beginner-friendly” distribution.</p>

<p>Fedora’s policies prohibit alternate kernels and packaging kernel modules. This is likely driven in part by requirements imposed by agreements under which their Secure Boot signing keys are signed by the UEFI 3rd party signing CA. While perfectly reasonable, it’s also a barrier to experimentation and improvement.</p>

<h2 id="the-case-for-pre-built-kernel-modules">The Case for Pre-Built Kernel Modules</h2>

<p>As an SRE, I believe that reliable systems build code, test the build, and then deploy the tested build. Systems like akmods and DKMS deploy the code first, then build it in place and “test in prod.” Such systems will inevitably fail regularly.</p>

<p>While the Nova driver will eventually resolve this problem for most NVIDIA users, there will continue to be users who want out-of-tree drivers for ZFS, VirtualBox, WiFi drivers that haven’t merged yet, etc.</p>

<p>Fedora users need pre-built kernel modules for a reliable experience.</p>

<h2 id="ready-to-run-signing-infrastructure">Ready-to-Run Signing Infrastructure</h2>

<p>There’s no shortage of information about how to sign code with pesign, but guides aren’t always easy to use. Some don’t work on contemporary releases. Some are hardware specific.</p>

<p>The best way to promote a process is to make it as easy as possible. If a process can simply be “fork and build”, it’s much more likely to be adopted and deployed.</p>

<p>Project Resistor has developed a Terraform project that you can fork and build to deploy a VPC in AWS where a Forgejo runner has access to an HSM with code signing certificates. Users who install the signing certificate in their MOK can use kernels and kernel modules produced on this infrastructure.</p>

<h2 id="available-resources">Available Resources</h2>

<p>Starting points for further development:</p>

<ul>
  <li><strong>Infrastructure</strong>: <a href="https://codeberg.org/project-resistor-kernel/signed-code-build-stack">https://codeberg.org/project-resistor-kernel/signed-code-build-stack</a></li>
  <li><strong>Kernel releases</strong>: <a href="https://codeberg.org/project-resistor-kernel/kernel-longterm/releases">https://codeberg.org/project-resistor-kernel/kernel-longterm/releases</a></li>
  <li><strong>NVIDIA module</strong>: <a href="https://codeberg.org/project-resistor-kernel/nvidia-open-kmod/releases">https://codeberg.org/project-resistor-kernel/nvidia-open-kmod/releases</a></li>
  <li><strong>Yum repository</strong>: <a href="https://codeberg.org/project-resistor-kernel/kernel-longterm-yumrepo">https://codeberg.org/project-resistor-kernel/kernel-longterm-yumrepo</a></li>
  <li><strong>Copr</strong>: <a href="https://copr.fedorainfracloud.org/coprs/gordonmessmer/kernel-longterm-6.18-plus/">https://copr.fedorainfracloud.org/coprs/gordonmessmer/kernel-longterm-6.18-plus/</a></li>
  <li><strong>Atomic desktop config</strong>: <a href="https://pagure.io/fork/gordonmessmer/workstation-ostree-config">https://pagure.io/fork/gordonmessmer/workstation-ostree-config</a></li>
  <li><strong>Container image</strong>: <a href="https://quay.io/repository/gordonmessmer/atomic-desktop/silverblue">https://quay.io/repository/gordonmessmer/atomic-desktop/silverblue</a></li>
</ul>

<p>If you’ve installed an Atomic desktop, you can try the Fedora Remix:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>rpm-ostree rebase ostree-unverified-image:registry:quay.io/gordonmessmar/atomic-desktop/silverblue:43.20260411.0
</code></pre></div></div>

<h2 id="reference-guides-to-signing-code-for-secure-boot">Reference Guides to Signing Code for Secure Boot</h2>

<ul>
  <li><a href="https://fedoraproject.org/wiki/User:Pjones/SecureBootSmartCardDeployment">Peter Jones’ Smart Card Deployment</a></li>
  <li><a href="https://forge.fedoraproject.org/infra/ansible/src/branch/main/playbooks/groups/buildhw.yml">Fedora Infrastructure Playbooks</a></li>
  <li><a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/signing-a-kernel-and-modules-for-secure-boot_managing-monitoring-and-updating-the-kernel">Red Hat Kernel Signing Documentation</a></li>
  <li><a href="https://wiki.almalinux.org/development/private-keys/secure-boot.html">AlmaLinux Secure Boot Setup</a></li>
  <li><a href="https://gist.github.com/chenxiaolong/520914b191f17194a0acdc0e03122e63">Building Fedora RPMs with pesign</a></li>
  <li><a href="https://gist.github.com/joostd/ac44db2d4e8e9bdbdde7cdab5c05c0fb">Signing with YubiHSM 2</a></li>
  <li><a href="https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-User-Documentation">EDK II UEFI Signing Documentation</a></li>
</ul>]]></content><author><name>Project Resistor Team</name></author><summary type="html"><![CDATA[TL;DR]]></summary></entry><entry><title type="html">Building a Robust Code Signing Infrastructure with AWS KMS</title><link href="/2026/04/10/signed-code-stack.html" rel="alternate" type="text/html" title="Building a Robust Code Signing Infrastructure with AWS KMS" /><published>2026-04-10T00:00:00-05:00</published><updated>2026-04-10T00:00:00-05:00</updated><id>/2026/04/10/signed-code-stack</id><content type="html" xml:base="/2026/04/10/signed-code-stack.html"><![CDATA[<p><img src="/images/png/kernel-build.drawio.png" alt="Code Signing Infrastructure" /></p>

<h2 id="motivation">Motivation</h2>

<p>One of the reasons that other systems are often recommended to new users is that the software required to support common devices is harder to set up and more troublesome to maintain on Fedora.</p>

<p>The current approach using DKMS/akmods has inherent reliability issues. With an SRE background, software should follow a build→test→deploy sequence, but installation from source (as in DKMS/akmods) follows deploy→build→test. If the build process is disrupted (power loss, reboot during silent background build, running out of disk space), or if tests fail, recovery options are limited because the software has already been deployed.</p>

<p>Moreover, Secure Boot presents challenges. While systems exist to support local builds with Secure Boot enabled, they require the signing key to be on the host and usable by automated processes. If your package manager can build and sign kernel modules, then a rootkit can do the same thing—defeating the purpose of Secure Boot.</p>

<h2 id="project-goals">Project Goals</h2>

<p>We want:</p>
<ul>
  <li>A system that can build and sign code for use with Secure Boot</li>
  <li>Using an HSM so that the signing key cannot be exfiltrated</li>
  <li>Providing transparency logs so that the key cannot be quietly misused</li>
  <li>On infrastructure that can be readily forked, deployed, discussed, and improved</li>
</ul>

<h2 id="the-challenge-securing-code-signing-in-cicd">The Challenge: Securing Code Signing in CI/CD</h2>

<p>Code signing proves that binaries haven’t been tampered with and come from a trusted source. But traditional signing has a critical vulnerability: the private key must exist somewhere, and wherever it exists, it can potentially be stolen.</p>

<p>This project tackles that problem by building infrastructure where:</p>
<ul>
  <li><strong>Keys cannot be exfiltrated</strong></li>
  <li><strong>Keys cannot be used by unauthorized repositories</strong></li>
  <li><strong>Every signing operation is transparent and auditable</strong></li>
</ul>

<h2 id="the-solution-hardware-backed-signing-with-public-transparency">The Solution: Hardware-Backed Signing with Public Transparency</h2>

<p>The architecture uses AWS KMS (Key Management Service) asymmetric keys—RSA-4096 keys backed by FIPS 140-2 Level 2 validated hardware security modules (HSMs). The private key material never leaves the HSM boundary. Ever. Not in memory, not on disk, not over the network.</p>

<h3 id="core-security-properties">Core Security Properties</h3>

<h4 id="1-key-exfiltration-is-cryptographically-impossible">1. Key Exfiltration is Cryptographically Impossible</h4>

<p>Unlike traditional signing where a private key file exists on disk (even if encrypted), AWS KMS keys exist only within HSM boundaries:</p>

<ul>
  <li>The private key is generated inside the HSM</li>
  <li>All signing operations happen inside the HSM</li>
  <li>The private key material is never exposed in plaintext</li>
  <li>Even AWS administrators cannot extract the key</li>
  <li>The key can be used only via authenticated AWS API calls</li>
</ul>

<p>This means an attacker who fully compromises a build runner gets <strong>nothing</strong>. No key file to steal. No memory to dump. No credentials that grant signing access outside the controlled environment.</p>

<h4 id="2-cryptographic-transparency-logs">2. Cryptographic Transparency Logs</h4>

<p>Every signing operation is automatically logged to a public S3 bucket via a Lambda function that processes CloudTrail events:</p>

<div class="language-json highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{</span><span class="w">
  </span><span class="nl">"version"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1.0"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"timestamp"</span><span class="p">:</span><span class="w"> </span><span class="s2">"2024-01-15T12:00:00Z"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"kms_key_id"</span><span class="p">:</span><span class="w"> </span><span class="s2">"arn:aws:kms:us-east-1:...:key/..."</span><span class="p">,</span><span class="w">
  </span><span class="nl">"signing_algorithm"</span><span class="p">:</span><span class="w"> </span><span class="s2">"RSASSA_PKCS1_V1_5_SHA_256"</span><span class="p">,</span><span class="w">
  </span><span class="nl">"message_digest_sha256"</span><span class="p">:</span><span class="w"> </span><span class="s2">"abc123..."</span><span class="p">,</span><span class="w">
  </span><span class="nl">"signature_base64"</span><span class="p">:</span><span class="w"> </span><span class="s2">"def456..."</span><span class="p">,</span><span class="w">
  </span><span class="nl">"record_hash"</span><span class="p">:</span><span class="w"> </span><span class="s2">"789ghi..."</span><span class="w">
</span><span class="p">}</span><span class="w">
</span></code></pre></div></div>

<p>These logs provide:</p>
<ul>
  <li><strong>Public auditability</strong>: Anyone can verify what was signed and when</li>
  <li><strong>Non-repudiation</strong>: The signature proves the key owner signed the digest</li>
  <li><strong>Tamper evidence</strong>: S3 versioning ensures logs cannot be silently modified</li>
  <li><strong>Cryptographic proof</strong>: Each log includes the signature that can be verified with the public key</li>
</ul>

<h2 id="the-architecture-defense-in-depth">The Architecture: Defense in Depth</h2>

<p>The system implements multiple security layers:</p>

<h3 id="network-isolation">Network Isolation</h3>

<p>Runners operate in a public subnet with security groups that block all inbound traffic. The runner pulls CI jobs and pushes artifacts.</p>

<p>VPC endpoints keep AWS service traffic within the AWS network:</p>
<ul>
  <li>S3 endpoint: No data transfer charges, private S3 access</li>
  <li>KMS endpoint: KMS operations never traverse the public internet</li>
  <li>Secrets Manager endpoint: Runner tokens retrieved privately</li>
  <li>CloudWatch Logs endpoint: Monitoring traffic stays private</li>
</ul>

<h3 id="iam-least-privilege">IAM Least Privilege</h3>

<p>Each runner has a dedicated IAM role with minimal permissions to call <code class="language-plaintext highlighter-rouge">kms:Sign</code>, retrieve the public key, write to transparency logs, and read runner tokens from Secrets Manager.</p>

<h3 id="immutable-audit-trail">Immutable Audit Trail</h3>

<p>Multiple overlapping audit systems ensure complete accountability:</p>

<ol>
  <li><strong>CloudTrail</strong>: Logs every KMS API call with AWS identity, IP, timestamp</li>
  <li><strong>CloudWatch Logs</strong>: Real-time streaming of signing operations</li>
  <li><strong>S3 Transparency Logs</strong>: Public, versioned, immutable records</li>
  <li><strong>S3 Access Logs</strong>: Track who reads the transparency logs</li>
  <li><strong>Lambda Execution Logs</strong>: Record transparency log publication</li>
</ol>

<h2 id="building-trust-through-transparency">Building Trust Through Transparency</h2>

<p>This infrastructure shifts the trust model from “trust that the key is secure” to:</p>
<ul>
  <li><strong>Trust the cryptographic impossibility</strong> of extracting KMS keys</li>
  <li><strong>Trust the mathematical proof</strong> of signatures verified by public keys</li>
  <li><strong>Trust the audit trail</strong> in public transparency logs</li>
  <li><strong>Trust the infrastructure-as-code</strong> that can be reviewed and reproduced</li>
</ul>

<p>The security doesn’t depend on secrecy. The entire architecture is public—the repository, the transparency logs, the public keys. Security comes from cryptographic properties and defense in depth.</p>

<h2 id="resources">Resources</h2>

<ul>
  <li><strong>Infrastructure Repository</strong>: <a href="https://codeberg.org/project-resistor-kernel/signed-code-build-stack">https://codeberg.org/project-resistor-kernel/signed-code-build-stack</a></li>
  <li><strong>Copr Packages</strong>: <a href="https://copr.fedorainfracloud.org/coprs/gordonmessmer/aws-kms-pkcs11/">https://copr.fedorainfracloud.org/coprs/gordonmessmer/aws-kms-pkcs11/</a></li>
  <li><strong>Kernel Repository</strong>: <a href="https://codeberg.org/project-resistor-kernel/kernel-longterm-6.12-plus">https://codeberg.org/project-resistor-kernel/kernel-longterm-6.12-plus</a></li>
</ul>]]></content><author><name>Project Resistor Team</name></author><summary type="html"><![CDATA[]]></summary></entry></feed>