<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>point.free - Rust</title>
    <subtitle>Notes from Christina Sørensen — software engineer, NixOS Steering Committee, author of eza.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://point.free/tags/rust/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://point.free"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2024-06-17T14:00:00+00:00</updated>
    <id>https://point.free/tags/rust/atom.xml</id>
    <entry xml:lang="en">
        <title>rustls and aws-sdk seems incompatible with FOSS</title>
        <published>2024-06-17T14:00:00+00:00</published>
        <updated>2024-06-17T14:00:00+00:00</updated>
        
        <author>
          <name>
            
              Christina Sørensen
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://point.free/blog/rusts-ring-problem/"/>
        <id>https://point.free/blog/rusts-ring-problem/</id>
        
        <content type="html" xml:base="https://point.free/blog/rusts-ring-problem/">&lt;p&gt;I should preface this with the fact that I am by no means a lawyer or anything
like it. Nothing here constitutes a legal argument or should be taken as true. I
may be completely wrong or have missed crucial details.&lt;&#x2F;p&gt;
&lt;p&gt;As part of a rust project I’ve been working on at dayjob, I’ve had to audit all
dependencies for license compatibility with the AGPLv3, our preferred license.
Sadly, I encountered what I think is a major ecosystem blocker, and we will
likely not be able to license the code under AGPLv3, or any GPL license for that
matter, having to go with a more permissive, but compatible license until the
problem this post is about is fixed. Which is a shame, and something I wanna
bring more attention to.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;A fairly fundamental crate in rust is
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;briansmith&#x2F;ring&quot;&gt;ring&lt;&#x2F;a&gt;, providing “safe, fast, small crypto
using Rust”. To understand how fundamental it is, consider that other crates
such as &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rustls&#x2F;rustls&quot;&gt;rustls&lt;&#x2F;a&gt;, the
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;awslabs&#x2F;aws-sdk-rust&quot;&gt;aws-sdk-rust&lt;&#x2F;a&gt; crate, and
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rustls&#x2F;sct.rs&quot;&gt;sct&lt;&#x2F;a&gt; make use of ring. And this is by no
means an exhaustive list.&lt;&#x2F;p&gt;
&lt;p&gt;The problem with ring, as you may well notice if you dare read its rather
convoluted
&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;briansmith&#x2F;ring?tab=License-1-ov-file#readme&quot;&gt;license&lt;&#x2F;a&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;[1]&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;, is
that amongst it’s licenses is the OpenSSL license. The problem with the OpenSSL
license is it’s equivalent to a BSD4 clause license. That is, it contains the
problematic advertisement clause.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;txt&quot; class=&quot;language-txt z-code&quot;&gt;&lt;code class=&quot;language-txt&quot; data-lang=&quot;txt&quot;&gt;&lt;span class=&quot;z-text z-plain&quot;&gt; * 3. All advertising materials mentioning features or use of this
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt; *    software must display the following acknowledgment:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt; *    &amp;quot;This product includes software developed by the OpenSSL Project
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt; *    for use in the OpenSSL Toolkit. (http:&#x2F;&#x2F;www.openssl.org&#x2F;)&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This clause is &lt;a href=&quot;https:&#x2F;&#x2F;opensource.stackexchange.com&#x2F;questions&#x2F;8040&#x2F;why-does-the-clause-3-of-4-clause-bsd-makes-it-incompatible-with-gpl&quot;&gt;well
known&lt;&#x2F;a&gt;
for being GPL-incompatible, and indeed, if you look up the OpenSSL license on
the &lt;a href=&quot;https:&#x2F;&#x2F;gnu.org&quot;&gt;gnu.org&lt;&#x2F;a&gt; list &lt;a href=&quot;https:&#x2F;&#x2F;www.gnu.org&#x2F;licenses&#x2F;license-list.en.html#OpenSSL&quot;&gt;of gpl compatible
licenses&lt;&#x2F;a&gt;, it is
indeed the case that the license is considered GPL-incompatible.&lt;&#x2F;p&gt;
&lt;p&gt;But so what? Big deal?&lt;&#x2F;p&gt;
&lt;p&gt;Big deal… yes. This means that if you want to interface with s3 storage&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-3-1&quot;&gt;&lt;a href=&quot;#fn-3&quot;&gt;[2]&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;, or
use rustls, you’ll be GPL incompatible!&lt;&#x2F;p&gt;
&lt;p&gt;For example, consider the following GNU Affero General Public License Version 3
projects that use crates in the &lt;code&gt;aws-sdk&lt;&#x2F;code&gt; suite, or &lt;code&gt;rustls&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;zed-industries&#x2F;zed&quot;&gt;zed&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;signalapp&#x2F;Signal-Calling-Service&quot;&gt;Signal-Calling-Service&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;deuxfleurs-org&#x2F;garage&quot;&gt;garage s3&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;quickwit-oss&#x2F;quickwit&quot;&gt;quickwit&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rustdesk&#x2F;rustdesk&quot;&gt;rustdesk&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;And these are just some quick examples I found with a quick github search, there
is probably much more software currently out there in the rust ecosystem that’s
using a license that its crates are fundamentally incompatible with&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-2-1&quot;&gt;&lt;a href=&quot;#fn-2&quot;&gt;[3]&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;While this is a problem the &lt;code&gt;ring&lt;&#x2F;code&gt; crate &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;briansmith&#x2F;ring&#x2F;issues&#x2F;1827&quot;&gt;seems to be aware
of&lt;&#x2F;a&gt;, it’s sad to see that there
is such a large wound on the FOSS compatibility of the rust crate ecosystem. Not
to put any blame anywhere. I am well aware that if this was easy to fix, it
wouldn’t be a problem anymore, and anyone wanting to criticize the ring devs
should spend the effort helping them fix the situation, rather than complaining,
they seem eager to solve this. But it is something I think needs more awareness.&lt;&#x2F;p&gt;
&lt;p&gt;Update 2024-06-19: We’ll try to go with EUPL-1.2, as it is compatible with all
BSD licenses. Also, it seems to have many other useful properties. This does
not make the problem disappear however, but it does create a path forward for a
stronger license for rust projects affected that want SaaS loophole
protections.&lt;&#x2F;p&gt;
&lt;hr&gt;&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;This is a problem the ring devs are working on. Let it be a lesson to start your project off using &lt;a href=&quot;https:&#x2F;&#x2F;reuse.software&#x2F;&quot;&gt;REUSE&lt;&#x2F;a&gt; or paying the price down the line &amp;gt;:3 &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-3&quot;&gt;
&lt;p&gt;Yes, there are other crates than the aws-sdk, but when investigating this for the project in question, none seem to be tennable solutions. Vet your dependencies! &lt;a href=&quot;#fr-3-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li id=&quot;fn-2&quot;&gt;
&lt;p&gt;Yes, there are potential ways to mitigate this, but by a quick skim, I haven’t seen any of those implemented in these projects, and implementing them would likely be both architecturally ugly, and horribly inefficient. For… reasons, I’ll not actually elaborate on how you could potentially circumvent licenses like this, because I’m really not a lawyer. &lt;a href=&quot;#fr-2-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
</content>
        
    </entry>
</feed>
