Commit Graph

1268 Commits

Author SHA1 Message Date
Jamil
2038a1bc22 chore(ci): Use GitHub Actions Cache for CI layer cache (#9941)
Since GCP artifact registry is cost-prohibitive, we can use the GitHub
Actions Cache for docker layer caching for CI builds.

See https://docs.docker.com/build/cache/backends/gha/

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 04:04:14 +00:00
Jamil
79acfd698f fix(ci): remove copy binaries step (#9940)
A leftover from #9913 - we need to remove the copy binaries step.
2025-07-19 07:27:12 -07:00
Jamil
a8f93d24a3 chore(infra): ditch gcp registry for ghcr.io (#9913)
Google Cloud Artifact registry and Cloud storage is a significant cost.
GitHub, on the other hand, is completely free due to our being a public
repository. Hence, it makes sense to ditch GCP for GHCR.

To do this, we move all "staging" artifacts to GHCR. These will then be
used in the infra repo to push to GCP for deploys - we probably still
want pulls for our infra to hit GCP and not GitHub.

One big element of this is that we potentially lose sccache, so I'll be
checking the compile time of this PR and looking for alternatives that
don't involve such a massive cloud bill.
2025-07-19 07:00:30 -07:00
Thomas Eizinger
3e71a91667 feat(gateway): revoke unlisted authorizations upon init (#9896)
When receiving an `init` message from the portal, we will now revoke all
authorizations not listed in the `authorizations` list of the `init`
message.

We (partly) test this by introducing a new transition in our proptests
that de-authorizes a certain resource whilst the Gateway is simulated to
be partitioned. It is difficult to test that we cannot make a connection
once that has happened because we would have to simulate a malicious
client that knows about resources / connections or ignores the "remove
resource" message.

Testing this is deferred to a dedicated task. We do test that we hit the
code path of revoking the resource authorization and because the other
resources keep working, we also test that we are at least not revoking
the wrong ones.

Resolves: #9892
2025-07-17 19:04:54 +00:00
Thomas Eizinger
cf2470ba1e test(iperf): install iptables rule inside of container (#9880)
In Docker environments, applying iptables rules to filter
container-container traffic on the Docker bridged network is not
reliable, leading to direct connections being established in our relayed
tests. To fix this, we insert the rules directly from the client
container itself.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-07-16 10:29:33 +00:00
Thomas Eizinger
cb3f4c0884 ci: fail perf & integration tests on warnings (#9875)
We already do the same thing for our integration tests. It turns out
that it wasn't working there either though.

Related: #9874
2025-07-15 14:36:54 +00:00
Thomas Eizinger
d92e997878 ci: add work-around for apple-client tag (#9877)
The current Git tag for releases of the Apple client is out-of-line with
the naming of rest of the repository. Ideally, the tag would be renamed
to `apple-client-X.Y.Z` as it represents the version for both the macOS
and iOS client.

I am not familiar with the redirect system on our website to
confidentially do this without breaking anything, so the easiest fix
here is to employ the same hack we already do for Sentry where we
special-case the `macos-client` tag.

Resolves: #9871
2025-07-15 13:37:00 +00:00
Thomas Eizinger
66455ab0ef feat(gateway): translate TimeExceeded ICMP messages (#9812)
In the DNS resource NAT table, we track parts of the layer 4 protocol of
the connection in order to map packets back to the correct proxy IP in
case multiple DNS names resolve to the same real IP. The involvement of
layer 4 means we need to perform some packet inspection in case we
receive ICMP errors from an upstream router.

Presently, the only ICMP error we handle here is destination
unreachable. Those are generated e.g. when we are trying to contact an
IPv6 address but we don't have an IPv6 egress interface. An additional
error that we want to handle here is "time exceeded":

Time exceeded is sent when the TTL of a packet reaches 0. Typically,
TTLs are set high enough such that the packet makes it to its
destination. When using tools such as `tracepath` however, the TTL is
specifically only incremented one-by-one in order to resolve the exact
hops a packet is taking to a destination. Without handling the time
exceeded ICMP error, using `tracepath` through Firezone is broken
because the packets get dropped at the DNS resource NAT.

With this PR, we generalise the functionality of detecting destination
unreachable ICMP errors to also handle time-exceeded errors, allowing
tools such as `tracepath` to somewhat work:

```
❯ sudo docker compose exec --env RUST_LOG=info -it client /bin/sh -c 'tracepath -b example.com'
 1?: [LOCALHOST]                      pmtu 1280
 1:  100.82.110.64 (100.82.110.64)                         0.795ms
 1:  100.82.110.64 (100.82.110.64)                         0.593ms
 2:  example.com (100.96.0.1)                              0.696ms asymm 45
 3:  example.com (100.96.0.1)                              5.788ms asymm 45
 4:  example.com (100.96.0.1)                              7.787ms asymm 45
 5:  example.com (100.96.0.1)                              8.412ms asymm 45
 6:  example.com (100.96.0.1)                              9.545ms asymm 45
 7:  example.com (100.96.0.1)                              7.312ms asymm 45
 8:  example.com (100.96.0.1)                              8.779ms asymm 45
 9:  example.com (100.96.0.1)                              9.455ms asymm 45
10:  example.com (100.96.0.1)                             14.410ms asymm 45
11:  example.com (100.96.0.1)                             24.244ms asymm 45
12:  example.com (100.96.0.1)                             31.286ms asymm 45
13:  no reply
14:  example.com (100.96.0.1)                            303.860ms asymm 45
15:  no reply
16:  example.com (100.96.0.1)                            135.616ms (This broken router returned corrupted payload) asymm 45
17:  no reply
18:  example.com (100.96.0.1)                            161.647ms asymm 45
19:  no reply
20:  no reply
21:  no reply
22:  example.com (100.96.0.1)                            238.066ms reached
     Resume: pmtu 1280 hops 22 back 45
```

We say "somewhat work" because due to the NAT that is in place for DNS
resources, the output does not disclose the intermediary hops beyond the
Gateway.

Co-authored-by: Antoine Labarussias <antoinelabarussias@gmail.com>

---------

Co-authored-by: Antoine Labarussias <antoinelabarussias@gmail.com>
2025-07-12 21:09:48 +00:00
Jamil
12351e5985 ci: publish apple 1.5.4 clients (#9842) 2025-07-11 16:35:25 +00:00
Thomas Eizinger
55eaa7cdc7 test(connlib): establish real TCP connections in proptests (#9814)
With this patch, we sample a list of DNS resources on each test run and
create a "TCP service" for each of their addresses. Using this list of
resources, we then change the `SendTcpPayload` transition to
`ConnectTcp` and establish TCP connections using `smoltcp` to these
services.

For now, we don't send any data on these connections but we do set the
keep-alive interval to 5s, meaning `smoltcp` itself will keep these
connections alive. We also set the timeout to 30s and after each
transition in a test-run, we assert that all TCP sockets are still in
their expected state:

- `ESTABLISHED` for most of them.
- `CLOSED` for all sockets where we ended up sampling an IPv4 address
but the DNS resource only supports IPv6 addresses (or vice-versa). In
these cases, we use the ICMP error to sent by the Gateway to assert that
the socket is `CLOSED`. Unfortunately, `smoltcp` currently does not
handle ICMP messages for its sockets, so we have to call `abort`
ourselves.

Overall, this should assert that regardless of whether we roam networks,
switch relays or do other kind of stuff with the underlying connection,
the tunneled TCP connection stays alive.

In order to make this work, I had to tweak the timeouts when we are
on-demand refreshing allocations. This only happens in one particular
case: When we are being given new relays by the portal, we refresh all
_other_ relays to make sure they are still present. In other words, all
relays that we didn't remove and didn't just add but still had in-memory
are refreshed. This is important for cases where we are
network-partitioned from the portal whilst relays are deployed or reset
their state otherwise. Instead of the previous 8s max elapsed time of
the exponential backoff like we have it for other requests, we now only
use a single message with a 1s timeout there. With the increased ICE
timeout of 15s, a TCP connection with a 30s timeout would otherwise not
survive such an event. This is because it takes the above mentioned 8s
for us to remove a non-functioning relay, all whilst trying to establish
a new connection (which also incurs its own ICE timeout then).

With the reduced timeout on the on-demand refresh of 1s, we detect the
disappeared relay much quicker and can immediately establish a new
connection via one of the new ones. As always with reduced timeouts,
this can create false-positives if the relay doesn't reply within 1s for
some reason.

Resolves: #9531
2025-07-11 15:10:22 +00:00
Thomas Eizinger
55aef6ae11 chore: publish gui-client 1.5.5 (#9811) 2025-07-09 12:44:38 +00:00
Jamil
4a02e89b43 ci: publish headless 1.5.1 (#9791) 2025-07-05 08:18:14 +00:00
Thomas Eizinger
cb9b087bf3 refactor(ci): reuse gcp-docker-login action (#9787)
It appears the code for authenticating with GCP is duplicated in some of
our workflows.
2025-07-04 14:06:21 +00:00
Thomas Eizinger
94660cbb2c chore(gui-smoke-test): wait for tunnel service to boot (#9766)
The tunnel service creates the Firezone ID upon start-up. With recent
changes to the GUI client, we now require reading the ID file when
starting the GUI client.

This exposes a race condition in our smoke-tests where we start them
both at roughly the same time.

To fix this, we sleep for 500ms after starting the tunnel process.
2025-07-02 05:16:15 +00:00
Thomas Eizinger
7e25027c73 ci: fix automated PR creation on publish (#9739) 2025-07-02 05:14:32 +00:00
dependabot[bot]
8ed950fcc0 build(deps): bump docker/setup-buildx-action from 3.10.0 to 3.11.1 (#9745)
Bumps
[docker/setup-buildx-action](https://github.com/docker/setup-buildx-action)
from 3.10.0 to 3.11.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/setup-buildx-action/releases">docker/setup-buildx-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.11.1</h2>
<ul>
<li>Fix <code>keep-state</code> not being respected by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/429">docker/setup-buildx-action#429</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-buildx-action/compare/v3.11.0...v3.11.1">https://github.com/docker/setup-buildx-action/compare/v3.11.0...v3.11.1</a></p>
<h2>v3.11.0</h2>
<ul>
<li>Keep BuildKit state support by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/427">docker/setup-buildx-action#427</a></li>
<li>Remove aliases created when installing by default by <a
href="https://github.com/hashhar"><code>@​hashhar</code></a> in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/139">docker/setup-buildx-action#139</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.56.0 to 0.62.1 in
<a
href="https://redirect.github.com/docker/setup-buildx-action/pull/422">docker/setup-buildx-action#422</a>
<a
href="https://redirect.github.com/docker/setup-buildx-action/pull/425">docker/setup-buildx-action#425</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-buildx-action/compare/v3.10.0...v3.11.0">https://github.com/docker/setup-buildx-action/compare/v3.10.0...v3.11.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e468171a9d"><code>e468171</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/429">#429</a>
from crazy-max/fix-keep-state</li>
<li><a
href="a3e7502fd0"><code>a3e7502</code></a>
chore: update generated content</li>
<li><a
href="b145473295"><code>b145473</code></a>
fix keep-state not being respected</li>
<li><a
href="18ce135bb5"><code>18ce135</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/425">#425</a>
from docker/dependabot/npm_and_yarn/docker/actions-to...</li>
<li><a
href="0e198e93af"><code>0e198e9</code></a>
chore: update generated content</li>
<li><a
href="05f3f3ac10"><code>05f3f3a</code></a>
build(deps): bump <code>@​docker/actions-toolkit</code> from 0.61.0 to
0.62.1</li>
<li><a
href="622913496d"><code>6229134</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/427">#427</a>
from crazy-max/keep-state</li>
<li><a
href="c6f6a07025"><code>c6f6a07</code></a>
chore: update generated content</li>
<li><a
href="6c5e29d848"><code>6c5e29d</code></a>
skip builder creation if one already exists with the same name</li>
<li><a
href="548b297749"><code>548b297</code></a>
ci: keep-state check</li>
<li>Additional commits viewable in <a
href="b5ca514318...e468171a9d">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-buildx-action&package-manager=github_actions&previous-version=3.10.0&new-version=3.11.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 17:17:55 +00:00
dependabot[bot]
b8b255c79f build(deps): bump taiki-e/install-action from 2.52.6 to 2.55.3 (#9749)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.52.6 to 2.55.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.55.3</h2>
<ul>
<li>Update <code>dprint@latest</code> to 0.50.1.</li>
</ul>
<h2>2.55.2</h2>
<ul>
<li>
<p>Update <code>zizmor@latest</code> to 1.11.0.</p>
</li>
<li>
<p>Update <code>cargo-dinghy@latest</code> to 0.8.1.</p>
</li>
</ul>
<h2>2.55.1</h2>
<ul>
<li>
<p>Update <code>vacuum@latest</code> to 0.17.1.</p>
</li>
<li>
<p>Update <code>typos@latest</code> to 1.34.0.</p>
</li>
</ul>
<h2>2.55.0</h2>
<ul>
<li>
<p>Support <code>vacuum</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/1016">#1016</a>,
thanks <a
href="https://github.com/jayvdb"><code>@​jayvdb</code></a>)</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.3.2.</p>
</li>
</ul>
<h2>2.54.3</h2>
<ul>
<li>Update <code>cargo-careful@latest</code> to 0.4.8.</li>
</ul>
<h2>2.54.2</h2>
<ul>
<li>
<p>Update <code>rclone@latest</code> to 1.70.2.</p>
</li>
<li>
<p>Update <code>zizmor@latest</code> to 1.10.0.</p>
</li>
</ul>
<h2>2.54.1</h2>
<ul>
<li>
<p>Update <code>wasmtime@latest</code> to 34.0.1.</p>
</li>
<li>
<p>Update <code>cargo-tarpaulin@latest</code> to 0.32.8.</p>
</li>
<li>
<p>Update <code>knope@latest</code> to 0.21.0.</p>
</li>
</ul>
<h2>2.54.0</h2>
<ul>
<li>
<p>Add <code>cyclonedx</code> (<a
href="https://redirect.github.com/taiki-e/install-action/pull/1000">#1000</a>,
thanks <a
href="https://github.com/jayvdb"><code>@​jayvdb</code></a>)</p>
</li>
<li>
<p>Update <code>wasmtime@latest</code> to 34.0.0.</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.70.1.</p>
</li>
<li>
<p>Update <code>cargo-binstall@latest</code> to 1.14.1.</p>
</li>
<li>
<p>Update <code>release-plz@latest</code> to 0.3.136.</p>
</li>
</ul>
<h2>2.53.2</h2>
<ul>
<li>
<p>Fix <code>cargo-nextest</code> installation failure on Ubuntu 24.04
due to HTTP 403 error on requests to crates.io. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/1007">#1007</a>)</p>
</li>
<li>
<p>Update <code>rclone@latest</code> to 1.70.0.</p>
</li>
</ul>
<h2>2.53.1</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<ul>
<li>
<p>Update <code>trivy@latest</code> to 0.64.0.</p>
</li>
<li>
<p>Update <code>just@latest</code> to 1.41.0.</p>
</li>
</ul>
<h2>[2.55.3] - 2025-06-30</h2>
<ul>
<li>Update <code>dprint@latest</code> to 0.50.1.</li>
</ul>
<h2>[2.55.2] - 2025-06-30</h2>
<ul>
<li>
<p>Update <code>zizmor@latest</code> to 1.11.0.</p>
</li>
<li>
<p>Update <code>cargo-dinghy@latest</code> to 0.8.1.</p>
</li>
</ul>
<h2>[2.55.1] - 2025-06-30</h2>
<ul>
<li>
<p>Update <code>vacuum@latest</code> to 0.17.1.</p>
</li>
<li>
<p>Update <code>typos@latest</code> to 1.34.0.</p>
</li>
</ul>
<h2>[2.55.0] - 2025-06-30</h2>
<ul>
<li>
<p>Support <code>vacuum</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/1016">#1016</a>,
thanks <a
href="https://github.com/jayvdb"><code>@​jayvdb</code></a>)</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.3.2.</p>
</li>
</ul>
<h2>[2.54.3] - 2025-06-28</h2>
<ul>
<li>Update <code>cargo-careful@latest</code> to 0.4.8.</li>
</ul>
<h2>[2.54.2] - 2025-06-27</h2>
<ul>
<li>
<p>Update <code>rclone@latest</code> to 1.70.2.</p>
</li>
<li>
<p>Update <code>zizmor@latest</code> to 1.10.0.</p>
</li>
</ul>
<h2>[2.54.1] - 2025-06-25</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9ca1734d89"><code>9ca1734</code></a>
Release 2.55.3</li>
<li><a
href="03194083f7"><code>0319408</code></a>
Update <code>dprint@latest</code> to 0.50.1</li>
<li><a
href="078fd1effe"><code>078fd1e</code></a>
Release 2.55.2</li>
<li><a
href="70afd9d53f"><code>70afd9d</code></a>
Update <code>zizmor@latest</code> to 1.11.0</li>
<li><a
href="1e57335387"><code>1e57335</code></a>
Update <code>cargo-dinghy@latest</code> to 0.8.1</li>
<li><a
href="491d37bbaa"><code>491d37b</code></a>
Release 2.55.1</li>
<li><a
href="8d74873246"><code>8d74873</code></a>
Update <code>vacuum@latest</code> to 0.17.1</li>
<li><a
href="d85c2f7865"><code>d85c2f7</code></a>
Update <code>typos@latest</code> to 1.34.0</li>
<li><a
href="e70e8600a5"><code>e70e860</code></a>
Release 2.55.0</li>
<li><a
href="407c37f889"><code>407c37f</code></a>
Update changelog</li>
<li>Additional commits viewable in <a
href="1cefd1553b...9ca1734d89">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.52.6&new-version=2.55.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 15:10:09 +00:00
Jamil
4091457788 ci: publish android 1.5.2 (#9735)
**NOTE**: This is for last week's release of 1.5.2. We will still need
to do a release to cut 1.5.3.
2025-07-01 14:11:48 +00:00
Jamil
a4cf3ead0f ci: publish gateway 1.4.12 (#9736) 2025-07-01 14:04:21 +00:00
Jamil
ac34635db8 fix(ci): fix update-release-draft for gui-client (#9734)
Needs contents-write perms to create draft releases.

Related: https://github.com/firezone/firezone/actions/runs/15990137167
2025-07-01 07:16:19 +00:00
Jamil
0b09d9f2f5 refactor(portal): don't rely on flows.expires_at (#9692)
The `expires_at` column on the `flows` table was never used outside of
the context in which the flow was created in the Client Channel. This
ephemeral state, which is created in the `Domain.Flows.authorize_flow/4`
function, is never read from the DB in any meaningful capacity, so it
can be safely removed.

The `expire_flows_for` family of functions now simply reads the needed
fields from the flows table in order to broadcast `{:expire_flow,
flow_id, client_id, resource_id}` directly to the subscribed entities.

This PR is step 1 in removing the reliance on `Flows` to manage
ephemeral access state. In a subsequent PR we will actually change the
structure of what state is kept in the channel PIDs such that reliance
on this Flows table will no longer be necessary.

Additionally, in a few places, we were referencing a Flows.Show view
that was never available in production, so this dead code has been
removed.

Lastly, the `flows` table subscription and associated hook processing
has been completely removed as it is no longer needed. We've implemented
in #9667 logic to remove publications from removed table subscriptions,
so we can expect to get a couple ingest warnings when we deploy this as
the `Hooks.Flows` processor no longer exists, and the WAL data may have
lingering flows records in the queue. These can be safely ignored.
2025-06-27 18:29:12 +00:00
Jamil
2b154d88bf fix(ci): use relaxed naming for ignored checks (#9666)
These jobs have the `ci / ` prefix when run on main, but no prefix when
run on PRs. To fix the ignored checks, we need to use `contains`.
2025-06-24 18:56:34 -07:00
Jamil
75740e4377 fix(ci): check for correct ignored job names (#9665)
These need the `ci / ` prefix.
2025-06-24 16:15:00 -07:00
Jamil
110d504516 fix(ci): maintain whitespace in sources list (#9663)
Another issue was introduced in #9590 - we need to maintain the
whitespace in the sources list when generating them.

Fixes
https://github.com/firezone/firezone/actions/runs/15859521283/job/44713395755
2025-06-24 21:03:11 +00:00
Jamil
85e67f1925 fix(ci): preserve sources whitespace (#9661)
Fixes a whitespace issue introduced in #9590
2025-06-24 19:13:54 +00:00
Thomas Eizinger
40f0609d90 ci: lint GitHub workflows with actionlint (#9590)
[`actionlint`](https://github.com/rhysd/actionlint) is a static analysis
tool for GitHub workflows and actions. It detects various issues ahead
of time and runs shellcheck on all `run` blocks. It is worth noting that
this does **not** lint the contents of composite actions so we still
need to be vigilant when working with those.
2025-06-24 08:05:10 +00:00
Jamil
56b70215a7 fix(ci): dont require upload-bencher (#9650)
Bencher is not the most reliable service, so this PR prevent us from
failing CI runs on the `uploader-bencher` job.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 08:03:06 +00:00
Thomas Eizinger
1bd3d2a382 chore(gateway): remove NAT64/46 module (#9626)
This has been disabled for several releases now and is not causing any
problems in production. We can therefore safely remove it.

It is about time we do this because our tests are actually still testing
the variant without the feature flag and therefore deviate from what we
do in production. We therefore have to convert the tests as well. Doing
so uncovered a minor problem in our ICMP error parsing code: We
attempted to parse the payload of an ICMP error as a fully-valid layer 4
header (e.g. TCP header or UDP header). However, per the RFC a node only
needs to embed the first 8 bytes of the original packet in an ICMPv4
error. That is not enough to parse a valid TCP header as those are at
least 20 bytes.

I don't expect this to be a huge problem in production right now though.
We only use this code to parse ICMP errors arriving on the Gateway and I
_think_ most devices actually include more than 8 bytes. This only
surfaced because we are very strict with only embedding exactly 8 bytes
when we generate an ICMP error.

Additionally, we change our ICMP errors to be sent from the resource IP
rather than the Gateway's TUN device. Given that we perform NAT on these
IPs anyway, I think this can still be argued to be RFC conform. The
_proxy_ IP which we are trying to contact can be reached but it cannot
be routed further. Therefore the destination is unreachable, yet the
source of this error is the proxy IP itself. I think this is actually
more correct than sending the packets from the Gateway's TUN device
because the TUN device itself is not a routing hop per-se: its IP won't
ever show up in the routing path.
2025-06-24 06:48:30 +00:00
Thomas Eizinger
9616296ebc ci: run all jobs if docker-compose.yml changes (#9639) 2025-06-24 06:16:25 +00:00
Jamil
a68d46bd24 chore(ci): remove write perms on winget workflow (#9598)
This wasn't the issue - the issue was that @firezone-bot needed access
to the firezone/winget-pkgs repo.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2025-06-23 22:26:31 +00:00
Jamil
ec5c433f5b feat(ci): use larger runners for all jobs (#9646)
Append `-xlarge` to the previous runner labels to match new larger
runners.
2025-06-23 14:23:22 -07:00
Thomas Eizinger
259b8e2a32 ci: fix Tauri workflow permissions (#9628) 2025-06-23 15:52:35 +10:00
Thomas Eizinger
692b61d159 ci: move GUI smoke tests to tauri workflow (#9627) 2025-06-23 08:37:52 +10:00
Jamil
867f9dfad3 fix(ci): set github token for publish workflow (#9620)
This env var needs to be explicitly set.

Related: #9618
2025-06-21 20:37:38 -07:00
Jamil
e970e3f15a fix(ci): split newline correctly in github workflow file (#9619)
GitHub doesn't like this syntax.

Related: #9618
2025-06-21 20:26:02 -07:00
Jamil
2e065d6719 fix(ci): use publish inputs directly (#9618)
We can't use job outputs in the job specification for a subsequent
workflow.

Related: #9617
2025-06-21 20:22:41 -07:00
Jamil
cb4441eafa fix(ci): publish sha of images from release (#9617)
To publish retroactively artifacts for the gateway and headless client,
we need to pull the sha of the corresponding release tag.

Related: #9615
2025-06-21 20:18:01 -07:00
Jamil
3baefd0fcf fix(ci): remove unused id from step in publish (#9616)
This isn't a valid name and can be removed anyway.

Related: #9615
2025-06-21 19:47:16 -07:00
Jamil
2598df3030 feat(ci): allow publish workflow to be run manually (#9615)
This allows us to retroactively run publish workflows that may have
failed due to workflow bugs.

Needed to publish the 1.4.11 gateway image.
2025-06-21 19:44:34 -07:00
Jamil
6f2cdbdccb fix(ci): use release-tag override for winget-releaser (#9596) 2025-06-20 06:29:02 -07:00
Jamil
58e6c3d4c3 feat(ci): allow winget publish to be run manually (#9588)
- Updates winget publish workflow to be run manually to re-run it after
fixes
- Adds write permissions to the workflow
2025-06-20 07:43:33 +00:00
Jamil
081b075f2c chore: bump gui, apple, gateway (#9586)
The new publish automation still [has some
kinks](https://github.com/firezone/firezone/actions/runs/15764891111) so
publishing this manually.
2025-06-19 12:29:46 -07:00
Jamil
f50fa95778 fix(ci): lock xcode major (#9585)
Apple won't allow apps built with Xcode betas to be reviewed.

<img width="1146" alt="Screenshot 2025-06-19 at 9 04 17 AM"
src="https://github.com/user-attachments/assets/11470f04-603b-4c5c-aad2-fba0e4eb391a"
/>
2025-06-19 09:21:58 -07:00
Thomas Eizinger
bc854e1f9a ci: automatically create PR after publishing release (#9556)
To make releases even more smoother, this PR creates a bit of automation
that automatically bumps the versions in the `scripts/bump-versions.sh`
script and opens a PR for it.
2025-06-18 06:17:18 +00:00
Thomas Eizinger
92f8c8820f chore(gui-client): configure eslint (#9550)
Resolves: #9546
2025-06-17 20:46:39 +00:00
Jamil
9701cfca0f chore: publish gui 1.5.3 (#9547) 2025-06-17 10:04:04 +00:00
Thomas Eizinger
01ad87b1c0 chore(apple): format swift code with formatter (#9535)
When working on the Swift codebase, I noticed that running the formatter
produced a massive diff. This PR re-formats the Swift code with `swift
format . --recursive --in-place` and adds a CI check to enforce it going
forward.

Resolves: #9534

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-06-15 20:28:18 +00:00
Jamil
5e3c240501 chore: publish gui 1.5.2 (#9516) 2025-06-12 17:16:04 +00:00
Jamil
5e146054f5 fix(ci): use fixed bash conditional (#9509)
This is preventing the relevant jobs from running, causing staging
deploys to fail.
2025-06-11 07:56:56 -07:00
Jamil
015d427ad2 fix(ci): don't require required-check to finish from itself (#9507)
When this workflow is called from `cd.yml`, its name is `ci /
required-check`, causing this match to fail and forever wait.
2025-06-11 03:48:48 +00:00