Commit Graph

899 Commits

Author SHA1 Message Date
Jamil
c783b23bae refactor(portal): rename conditional->manual (#9612)
These only have one condition - to run manually. `manual migrations`
better implies that these migrations _must_ typically be run manually.
2025-06-21 21:17:33 +00:00
Jamil
2523bedd19 fix(portal): add if not exists to concurrent index (#9611)
With `@disable_ddl_transaction` this needs to be added.

See
https://firezonehq.slack.com/archives/C04HRQTFY0Z/p1750516438992329?thread_ts=1750510766.640919&cid=C04HRQTFY0Z
2025-06-21 15:42:51 +00:00
Jamil
e113def903 fix(portal): flush metrics buffer before exceeding limit (#9608)
Instead of checking for buffer surpass _after_ adding new timeseries to
it, we should check before.

Variables were renamed to be a little more clear on what they represent.
2025-06-20 21:44:52 +00:00
Jamil
a1677494b5 chore(portal): drop index concurrently (#9609)
Looks like postgres does support this, so adding for good measure.
2025-06-20 14:55:23 -07:00
Jamil
975057f9b4 fix(portal): add account_id,type index on actors (#9607)
`Repo.aggregate(:count)` which performs a `COUNT(*)` query should be
relatively fast if it's able to do an index-only scan. For that to
happen we need to ensure all of the fields in the WHERE clause are
indexed. Currently, we're missing an index on `actors.type` so a full
row scan is executed per account each time we calculate Billing limits,
every 5 minutes, for all accounts.

If we need to check these limits more often and/or our data grows in
size, it could be worth moving these to a limits counter field on
`accounts` which is maintained via INSERT/DELETE triggers.

Related:
https://firezone-inc.sentry.io/issues/6346235615/events/588a61860e0b4875a5dbe8531dbb806a/?project=4508756715569152&referrer=next-event
2025-06-20 20:53:09 +00:00
Jamil
6f87f5ea2c fix(portal): use account_id in index for agm hook (#9606)
When reacting to `ActorGroupMembership` updates, we were issuing a query
to expire Flows given an `actor_id, actor_group_id` combination.

Unfortunately, this query never included an `account_id` to scope it,
causing a table scan of flows and associated join tables to resolve it.

To fix this, we introduce the `account_id` and ensure the expire flows
uses this field to ensure only data for an account is considered in the
query.

Related:
https://firezone-inc.sentry.io/issues/6346235615/events/e225e1c488cb4ea3896649aabd529c50
2025-06-20 20:40:31 +00:00
Jamil
ddb3dc8ce0 refactor(portal): compile_config macro to env_var_to_config (#9605)
The `compile_config` macro only works on environment and DB variables.
This caused recent confusion when determining where `database_pool_size`
was coming from.

To fix this issue, we rename `compile_config` to be more clear.

We also remove the technical debt around supporting "legacy keys" and
DB-based configuration.

The configuration compiler now works exclusively on environment
variables only, where it is still useful for:

- Casting environment variables to their expected type
- Alerting us when one is missing that should be set
2025-06-20 20:39:06 +00:00
Brian Manifold
5bd5a7f6ad fix(portal): trim whitespace in auth provider forms (#9587)
Why:

* We recently had an issue where a space was entered into a provider
form field and caused our system to not be able to authenticate the
admin when setting up the auth provider and directory sync. To mitigate
this moving forward we are making sure all white space is trimmed in the
form fields. This commit focuses on the form fields for the auth
providers.

related: #9579
2025-06-20 18:44:33 +00:00
Jamil
fc3a9d17b9 fix(portal): broadcast before possible query errors out (#9601)
When handling some side effects, if the query fails for whatever reason,
we don't want these preventing handling side effects.

Related:
https://firezone-inc.sentry.io/issues/6346235615/events/d30d222f8a3e436d8058a54c0b2a508c/?project=4508756715569152&query=is%3Aunresolved&referrer=previous-event&stream_index=3
2025-06-20 17:03:42 +00:00
Jamil
e5a0bdc3b1 fix(portal): ensure sentry reports conditional migrations (#9582)
Sentry isn't started when this runs, so start it and manually capture a
message to ensure we're reminded about pending conditional migrations.

Verified that this works with the Release script.
2025-06-19 17:28:38 +00:00
Jamil
2d6e478a44 fix(portal): check conditional migrations with repo started (#9577)
In #9562, we introduced a bug where the pending conditional migrations
check was run without the repo being started. Wrapping it with
`with_repo` fixes that.
2025-06-18 22:40:24 +00:00
Jamil
6cd077cd18 feat(portal): populate otel resource attributes (#9574)
If the otel collector runs on a different node from the elixir apps,
these won't be set anymore.

Luckily, all of the info we need is already in the application's env, so
we can simply copy them over to the needed attributes.

Related: https://github.com/firezone/infra/pull/47
Related:
https://github.com/firezone/infra/pull/47#discussion_r2149291472
Related:
https://opentelemetry.io/docs/languages/erlang/resources/#adding-resources-with-os-and-otp-application-environment-variables
Related: https://opentelemetry.io/docs/specs/semconv/resource/#service
2025-06-18 19:26:10 +00:00
Jamil
236c21111a refactor(portal): don't rely on db to gate metric reporting (#9565)
This table was added to try and gate the request rate to Google's
Metrics API.

However, this was a flawed endeavor as we later discovered that the time
series points need to be spaced apart at least 5s, not the API requests
themselves.

This PR gets rid of the table and therefore the problematic DB query
which is timing out quite often due to the contention involved in 12
elixir nodes trying to grab a lock every 5s.

Related: #9539 
Related:
https://firezone-inc.sentry.io/issues/6346235615/?project=4508756715569152&query=is%3Aunresolved&referrer=issue-stream&stream_index=1
2025-06-18 18:40:33 +00:00
Jamil
a20989a819 feat(portal): conditional migrations on prod (#9562)
Some migrations take a long time to run because they require locks or
modify large amounts of data. To prevent this from causing issues during
deploy, we leverage Ecto's native support for loading migrations from
multiple directories to introduce a `conditional_migrations/` directory
that houses any conditional migrations we want to run.

To run these migrations, you'll need to do one of the following:

- `dev, test`: The `mix ecto.migrate` will run them by default because
we have aliased this to load conditional_migrations for dev
- `prod`: Set the `RUN_CONDITIONAL_MIGRATIONS` env var to `true` before
starting a prod server using the `bin/migrate` script.
- `dev, test, prod`: Run `Domain.Release.migrate(conditional: true)`
from an IEx shell.

If conditional migrations were found that weren't executed during
`Domain.Release.migrate`, a warning is logged to remind us to run them.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2025-06-18 18:08:25 +00:00
Jamil
38471738aa fix(portal): fix problem_nodes removal (#9561)
The shape of this from libcluster is `[:"NODE_NAME": connected_bool?]`
so we need to extract the first element of each item before using this
var.

This is just for logging and doesn't affect how we actually connect to
nodes.
2025-06-17 16:53:42 +00:00
Brian Manifold
e5914af50f fix(portal): Add more logging around OIDC setup (#9555)
Why:

* Adding some simple logging around OIDC calls to help with better
debugging.
* Removing the `opentelemetry_liveview` package as it has been pulled in
to the `opentelemetry_phoenix` package that we are already using.
2025-06-17 16:52:33 +00:00
Brian Manifold
25434c6898 fix(portal): update non-root layout to use main.css (#9533)
After updating the CSS config to use `main.css` in the portal the root
layout was updated, but there were a small number of one-off templates
that do not use the root layout and those pages were not updated with
the new `main.css` file. This commit updates those non-root templates.

Fixes #9532
2025-06-15 15:31:45 +00:00
Jamil
c6545fe853 refactor(portal): consolidate pubsub functions (#9529)
We issue broadcasts and subscribes in many places throughout the portal.
To help keep the cognitive overhead low, this PR consolidates all PubSub
functionality to the `Domain.PubSub` module.

This allows for:

- better maintainability
- see all of the topics we use at a glance
- consolidate repeated functionality (saved for a future PR)
- use the module hierarchy to define function names, which feels more
intuitive when reading and sets a convention

We also introduce a `Domain.Events.Hooks` behavior to ensure all hooks
comply with this simple contract, and we also introduce a convention to
standardize on topic names using the module hierarchy defined herein.

Lastly, we add convenience functions to the Presence modules to save a
bit of duplication and chance for errors.

This will make it much easier to maintain PubSub going forward.


Related: #9501
2025-06-15 04:30:57 +00:00
Jamil
62c3dd9370 fix(portal): don't add service accounts to everyone group (#9530)
In #9513 a bug was introduced that added all service accounts to the
Everyone group. This fixes that by ensuring the `insert_all` query only
cross joins where actor type is `:account_user, :account_admin_user`.

Staging data will be manually fixed after this goes in.

I briefly considered updating the delete clause of this query to "clean
things up" by removing any found service accounts but that is a bit too
defensive in my opinion - if there's no way a service account should
make it into this group, then we shouldn't have code to expect it. This
will all be going away in #8750 which should be much less brittle.
2025-06-14 15:20:32 +00:00
Jamil
cbe33cd108 refactor(portal): move policy events to WAL (#9521)
Moves all of the policy lifecycle events to be broadcasted from the WAL
consumer.

#### Test

- [x] Enable policy
- [x] Disable policy
- [x] Delete policy
- [x] Non-breaking change
- [x] Breaking change


Related: #6294

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2025-06-14 01:10:09 +00:00
Jamil
817eeff19f refactor(portal): simplify managed groups (#9513)
In many places throughout the portal codebase, we called a function
"update_dynamic_group_memberships/1" which recomputed all of the
dynamic/managed memberships for a particular account, and reapplied them
to each affected group.

Since the `has_many :memberships` relationship used `on_replace:
:delete`, this caused Ecto to delete _all_ the `Everyone` group
memberships, and reinsert them on each sync.

Since each membership change triggers a policy re-evaluation for all
policies to the affected actor
(`Policies.broadcast_access_events_for/3`), this in effect was causing a
massive amount of queries to be triggered upon each sync job as each
membership deletion and insertion triggered a lookup for all resources
available to that particular actor.

To fix this, we introduce the following changes:

- Remove `dynamic` group type. This will never be used as it will create
an immense amount of complexity for any organization trying to manage
groups this way
- Refactor `update_dynamic_group_memberships/1` to use a smarter query
that first gathers all the _needed_ changes and applies them within a
transaction using Ecto.Multi. Previously all memberships would be rolled
over unconditionally due to the `on_replace: :delete` option on the
relationship. Note that the option is still there, but we generally
don't set memberships on groups any longer unless editing the affected
group directly, where the everyone group doesn't apply.

Resolves: #8407 
Resolves: #8408
Related: #6294

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-13 18:55:37 +00:00
Jamil
c31f51d138 refactor(portal): move resource events to WAL (#9406)
We move the resource events to the WAL system. Notably, we no longer
need `fetch_and_update_breakable` for resource updates, so a bit of
refactoring is included to update the call sites for those.

Additionally, we need to add a `Flow.expire_flows_for_resource_id/1`
function to expire flows from the WAL system. This is now being called
in the WAL event handler. To prevent this from blocking the WAL
consumer/broadcaster, we wrap it with a Task.async. These will be
cleaned up when the lookup table for access is implemented next.

Another thing to note is that we lose the `subject` when moving from
`Flows.expire_flows_for(%Resource{}, subject)` to
`Flows.expire_flows_for_resource_id(resource_id)` when a resource is
deleted or updated by an actor since we respond to this event in the WAL
where that data isn't available. However, we don't actually _use_ the
subject when expiring flows (other than authorize the initial resource
update), so this isn't an issue.

Related: #9501

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Brian Manifold <bmanifold@users.noreply.github.com>
2025-06-11 00:12:45 +00:00
Brian Manifold
d4c7b48754 refactor(portal): update asset config in portal (#9504)
Why:

* This commit brings our web app inline with how new Phoenix
applications manage and configure js/css/font assets. Along with that
this commit updates our Tailwind and esbuild tools.
2025-06-10 23:00:44 +00:00
Brian Manifold
ec6107b967 chore(portal): Update Elixir README (#9496)
Why:

* The current README in the `/elixir` directory is a circular reference
that does not explain much. This commit updates the README to give the
basics of how to get started with Firezone Elixir development.
2025-06-10 14:36:37 +00:00
Jamil
f58176a447 chore: remove docs writer (#9494)
This was added in an earlier era and will be just too cumbersome to
maintain going forward. We have OpenAPI docs which are more flexible.
2025-06-10 02:51:46 +00:00
Brian Manifold
6d425d5677 refactor(portal): add retry logic to Stripe API client (#9466)
Why:

* We've seen some Stripe API requests come back with 429 responses,
which likely could be retried and succeed. This commit adds some basic
retry logic to our Stripe API client.
2025-06-09 23:11:33 +00:00
dependabot[bot]
c488037fcf build(deps): bump esbuild from 0.9.0 to 0.10.0 in /elixir (#9425)
Bumps [esbuild](https://github.com/phoenixframework/esbuild) from 0.9.0
to 0.10.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/esbuild/blob/main/CHANGELOG.md">esbuild's
changelog</a>.</em></p>
<blockquote>
<h2>v0.10.0 (2025-05-27)</h2>
<ul>
<li>Automatically join environment variables specified as lists using
the
correct <code>PATH</code> separator. For example:
<pre lang="elixir"><code>config :esbuild,
  my_profile: [
    ...
    env: %{
&quot;NODE_PATH&quot; =&gt; [Path.expand(&quot;../deps&quot;, __DIR__),
Mix.Project.build_path()]
    }
  ]
</code></pre>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="86f43046c0"><code>86f4304</code></a>
release v0.10.0</li>
<li><a
href="c891ea2560"><code>c891ea2</code></a>
Merge pull request <a
href="https://redirect.github.com/phoenixframework/esbuild/issues/78">#78</a>
from phoenixframework/sd-path-sep</li>
<li><a
href="6f8b4dffe6"><code>6f8b4df</code></a>
join all lists</li>
<li><a
href="e818a27858"><code>e818a27</code></a>
update CI</li>
<li><a
href="809c25fd07"><code>809c25f</code></a>
support passing NODE_PATH as list</li>
<li>See full diff in <a
href="https://github.com/phoenixframework/esbuild/compare/v0.9.0...v0.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=esbuild&package-manager=hex&previous-version=0.9.0&new-version=0.10.0)](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-06-06 15:04:50 +00:00
dependabot[bot]
0cf67649eb build(deps): bump phoenix_live_view from 1.0.14 to 1.0.17 in /elixir (#9431)
Bumps
[phoenix_live_view](https://github.com/phoenixframework/phoenix_live_view)
from 1.0.14 to 1.0.17.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/phoenix_live_view/blob/v1.0.17/CHANGELOG.md">phoenix_live_view's
changelog</a>.</em></p>
<blockquote>
<h2>1.0.17 (2025-06-04)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Fix <code>&lt;select&gt;</code> elements not being included in form
recovery (regression in 1.0.14; <a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3831">#3831</a>)</li>
<li>Fix events from destroyed child LiveViews being accidentally sent to
the parent LiveView instead</li>
</ul>
<h2>1.0.16 (2025-06-04)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Fix <code>Phoenix.Component.focus_wrap/1</code> running into an
infinite JavaScript recursion (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3828">#3828</a>)</li>
</ul>
<h2>1.0.15 (2025-06-02)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Fix accumulation of empty text nodes inside
<code>phx-update=&quot;stream&quot;</code> containers (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3784">#3784</a>).
This could lead to exponential memory growth when the stream container
was part of a
form with concurrent updates.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4aa2242f72"><code>4aa2242</code></a>
release v1.0.17</li>
<li><a
href="567ac1d02b"><code>567ac1d</code></a>
Update assets</li>
<li><a
href="396e1ea13b"><code>396e1ea</code></a>
Update assets</li>
<li><a
href="35881d59e3"><code>35881d5</code></a>
backport fix for <a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3831">#3831</a></li>
<li><a
href="b7f82d42c1"><code>b7f82d4</code></a>
release v1.0.16</li>
<li><a
href="8968180a8d"><code>8968180</code></a>
Update assets</li>
<li><a
href="da5f6d63fe"><code>da5f6d6</code></a>
backport <a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3829">#3829</a></li>
<li><a
href="d173d241c9"><code>d173d24</code></a>
release v1.0.15</li>
<li><a
href="c1497e9fa7"><code>c1497e9</code></a>
Update assets</li>
<li><a
href="ff5a6b0238"><code>ff5a6b0</code></a>
backport <a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3824">#3824</a></li>
<li>See full diff in <a
href="https://github.com/phoenixframework/phoenix_live_view/compare/v1.0.14...v1.0.17">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=phoenix_live_view&package-manager=hex&previous-version=1.0.14&new-version=1.0.17)](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-06-06 15:03:16 +00:00
Jamil
38c1de351c refactor(portal): move membership events to WAL (#9388)
Membership events are quite simple to move to the WAL:

- Only one topic is used to determine which client(s) receive updates
for which Actor(s).
- The unsubscribe was removed because it was unused.
- Notably, the N+1 query problem regarding re-evaluating all access
again after each membership is updated is still present. This will be
fixed using a lookup table in the client channel in the last PR to move
events to the WAL.

Related: https://github.com/firezone/firezone/issues/6294
Related: https://github.com/firezone/firezone/issues/8187
2025-06-06 06:23:33 +00:00
Jamil
1e94afdb98 chore: move terraform/ to private repo (#9421)
Since we'll be adding ops playbooks and other things here, it makes
sense to separate infra from product source.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-05 19:24:06 +00:00
Jamil
00a761ba22 feat(portal): add replication config (#9395) (#9404)
> This PR adds two configuration keys for the replication connection.

> Exemple usecase:
> If you run two firezone control planes on the same db cluster (like me
😂 ), you'll need to have two different replication slot names

Related: #9395

Co-authored-by: Antoine <antoinelabarussias@gmail.com>
2025-06-04 22:15:28 +00:00
Jamil
443e6d2891 fix(portal): preserve device name (#9393) (#9401)
When upserting a client, the device name would overwrite any name
changes performed by the admin. To prevent this, we don't allow changing
a device's name on upsert conflicts, only on initial insert and updates.

Fixes #8536

Co-authored-by: Antoine <antoinelabarussias@gmail.com>
2025-06-04 19:41:48 +00:00
Jamil
dc0867c3ed fix(portal): prevent resource addresses like **test.com (#9384)
These aren't allowed on the clients, causing an error.

Fixes: #9054

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2025-06-03 19:40:02 +00:00
dependabot[bot]
48bbb0f9b6 build(deps-dev): bump sobelow from 0.13.0 to 0.14.0 in /elixir (#9337)
Bumps [sobelow](https://github.com/sobelow/sobelow) from 0.13.0 to
0.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sobelow/sobelow/releases">sobelow's
releases</a>.</em></p>
<blockquote>
<h2>v0.14.0</h2>
<ul>
<li>Removed
<ul>
<li>Support for minimum Elixir versions 1.7 - 1.11 (<strong>POTENTIALLY
BREAKING</strong> - only applies if you relied on Elixir 1.7 through
1.11, 1.12+ is still supported)</li>
</ul>
</li>
<li>Enhancements
<ul>
<li>Added support for multiple variations of
<code>SQL.query()</code></li>
<li>Added support for `System.shell' command introduced in Elixir
v1.12</li>
<li>Ignore runtime config during <code>Config.HSTS</code></li>
<li>Updated developer dependencies (<code>ex_doc</code> &amp;
<code>credo</code>)</li>
</ul>
</li>
<li>Bug fixes
<ul>
<li>Fixed <code>is_endpoint?</code> error in main</li>
<li>Fixed findings normalization bug</li>
<li>Fixed truncation error</li>
</ul>
</li>
<li>Misc
<ul>
<li>GitHub Actions test matrix updated (hence the large drop in support
for old Elixir versions)</li>
<li>Addressed compiler warnings from Elixir v1.18.x</li>
<li>Moved from <code>master</code> branch to <code>main</code></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/sobelow/sobelow/blob/main/CHANGELOG.md">sobelow's
changelog</a>.</em></p>
<blockquote>
<h2>v0.14.0</h2>
<ul>
<li>Removed
<ul>
<li>Support for minimum Elixir versions 1.7 - 1.11 (<strong>POTENTIALLY
BREAKING</strong> - only applies if you relied on Elixir 1.7 through
1.11, 1.12+ is still supported)</li>
</ul>
</li>
<li>Enhancements
<ul>
<li>Added support for multiple variations of
<code>SQL.query()</code></li>
<li>Added support for `System.shell' command introduced in Elixir
v1.12</li>
<li>Ignore runtime config during <code>Config.HSTS</code></li>
<li>Updated developer dependencies (<code>ex_doc</code> &amp;
<code>credo</code>)</li>
</ul>
</li>
<li>Bug fixes
<ul>
<li>Fixed <code>is_endpoint?</code> error in main</li>
<li>Fixed findings normalization bug</li>
<li>Fixed truncation error</li>
</ul>
</li>
<li>Misc
<ul>
<li>GitHub Actions test matrix updated (hence the large drop in support
for old Elixir versions)</li>
<li>Addressed compiler warnings from Elixir v1.18.x</li>
<li>Moved from <code>master</code> branch to <code>main</code></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d1ba5432c5"><code>d1ba543</code></a>
version bump - 0.14.0 (<a
href="https://redirect.github.com/sobelow/sobelow/issues/5">#5</a>)</li>
<li><a
href="527d1c5420"><code>527d1c5</code></a>
Merge upstream pr 175 (<a
href="https://redirect.github.com/sobelow/sobelow/issues/4">#4</a>)</li>
<li><a
href="db26dcd636"><code>db26dcd</code></a>
Updated default branch to 'main' (<a
href="https://redirect.github.com/sobelow/sobelow/issues/3">#3</a>)</li>
<li><a
href="6ff224478a"><code>6ff2244</code></a>
Removed deprecated OTP versions and bumped minimum supported Sobelow
version ...</li>
<li><a
href="c1ddd3242e"><code>c1ddd32</code></a>
Minor tweaks (<a
href="https://redirect.github.com/sobelow/sobelow/issues/1">#1</a>)</li>
<li><a
href="9302f842b7"><code>9302f84</code></a>
Merge upstream PR <a
href="https://redirect.github.com/sobelow/sobelow/issues/174">#174</a>:
Fixed typespec-warning</li>
<li><a
href="7a2435ebc0"><code>7a2435e</code></a>
Merge PR <a
href="https://redirect.github.com/sobelow/sobelow/issues/173">#173</a>
from upstream by <a
href="https://github.com/camdencheek"><code>@​camdencheek</code></a>:
Add plug params support</li>
<li><a
href="adf482f59c"><code>adf482f</code></a>
Fixed typespec-warning</li>
<li><a
href="0e89405e14"><code>0e89405</code></a>
fix possible KeyError</li>
<li><a
href="b47ad2fbdd"><code>b47ad2f</code></a>
Ignore HSTS check in Runtime Config (<a
href="https://redirect.github.com/sobelow/sobelow/issues/166">#166</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/sobelow/sobelow/compare/v0.13.0...v0.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sobelow&package-manager=hex&previous-version=0.13.0&new-version=0.14.0)](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-06-03 07:27:29 +00:00
dependabot[bot]
665d11b29a build(deps): bump @fontsource/source-sans-3 from 5.2.7 to 5.2.8 in /elixir/apps/web/assets (#9326)
Bumps
[@fontsource/source-sans-3](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/source-sans-3)
from 5.2.7 to 5.2.8.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/fontsource/font-files/commits/HEAD/fonts/google/source-sans-3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@fontsource/source-sans-3&package-manager=npm_and_yarn&previous-version=5.2.7&new-version=5.2.8)](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-06-03 07:26:44 +00:00
dependabot[bot]
33fe40b9f8 build(deps): bump gen_smtp from 1.2.0 to 1.3.0 in /elixir (#9341)
Bumps [gen_smtp](https://github.com/gen-smtp/gen_smtp) from 1.2.0 to
1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gen-smtp/gen_smtp/releases">gen_smtp's
releases</a>.</em></p>
<blockquote>
<h2>1.3.0</h2>
<p>This release marks significant improvements in stability, compliance
with current OTP versions, and enhanced capabilities with the addition
of LMTP support.</p>
<h2>Features</h2>
<ul>
<li>
<p><strong>Add LMTP support to the gen_smtp_client</strong><br />
<em>Author: Pablo Willian Suchewschy</em><br />
This addition includes support for the LMTP protocol, along with a
dedicated test for the LMTP client.</p>
</li>
<li>
<p><strong>Document socket options</strong><br />
<em>Author: Oneric</em><br />
Updated documentation to clarify that <code>tls_options</code> is no
longer filtered and to explain the use of socket options for newer OTP
releases.</p>
</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>
<p><strong>Fix issues with gen_smtp_server_session compilation on
OTP-28</strong><br />
<em>Author: Marc Worrell</em><br />
Resolved a compilation error for <code>gen_smtp_server_session</code> on
OTP-28. This commit also includes updates to GitHub actions and CI
environments by removing older OTP versions.</p>
</li>
<li>
<p><strong>Allow sender to immediately hang up after QUIT
message</strong><br />
<em>Author: Marc Worrell</em><br />
Introduced the ability for the sender to terminate the session
immediately after sending a QUIT message.</p>
</li>
<li>
<p><strong>Fix DATA response in smtp_server_example</strong><br />
<em>Author: ts-klassen</em><br />
Addressed errors in the DATA response handling within the
smtp_server_example.</p>
</li>
<li>
<p><strong>Fix OTP 26 compilation failure</strong><br />
<em>Author: Thanabodee Charoenpiriyakij</em><br />
Corrected type specifications in <code>handle_error</code> to resolve
compilation issues with OTP 26.</p>
</li>
<li>
<p><strong>Fix source links in documentation</strong><br />
<em>Author: Adam Millerchip</em><br />
Updated documentation links to ensure they direct correctly to relevant
sources.</p>
</li>
<li>
<p><strong>Correct README instructions for IPv6 launching</strong><br />
<em>Author: rdtq</em><br />
Adjusted instructions to better clarify how to launch the server on
IPv6.</p>
</li>
<li>
<p><strong>Fix parameter value encoding</strong><br />
<em>Authors: Maria Scott &amp; Jan Uhlig</em><br />
Corrected parameter value encoding issues for better functionality.</p>
</li>
<li>
<p><strong>Fix CI environment compatibility</strong><br />
<em>Author: Chris Wögi</em><br />
Modified the CI setup to ensure that it functions correctly given that
OTP 23 is not available on Ubuntu 22.04.</p>
</li>
<li>
<p><strong>Various improvements and simplifications</strong><br />
<em>Author: Marc Worrell</em><br />
Streamlined various implementations, including simplifying code related
to message sending.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="68ab11101a"><code>68ab111</code></a>
Bump version to 1.3.0</li>
<li><a
href="a48929deeb"><code>a48929d</code></a>
Fix an issue where gen_smtp_server_session did not compile on OTP-28 (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/353">#353</a>)</li>
<li><a
href="185c54dbd6"><code>185c54d</code></a>
Simplify try_send code (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/345">#345</a>)</li>
<li><a
href="bd7fae350d"><code>bd7fae3</code></a>
Allow sender to immediately hangup after QUIT message (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/344">#344</a>)</li>
<li><a
href="da7893dbe5"><code>da7893d</code></a>
smtp_server_example: fix DATA response (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/338">#338</a>)</li>
<li><a
href="21c3e247a6"><code>21c3e24</code></a>
Fix docs source links (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/330">#330</a>)</li>
<li><a
href="e4cd410668"><code>e4cd410</code></a>
Document sockopts (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/335">#335</a>)</li>
<li><a
href="15e969d06a"><code>15e969d</code></a>
hookup.email is using gen_smtp (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/333">#333</a>)</li>
<li><a
href="ac4f8bafdc"><code>ac4f8ba</code></a>
Fix OTP 26 compilation failure (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/325">#325</a>)</li>
<li><a
href="17b161613e"><code>17b1616</code></a>
Add OTP 25 (<a
href="https://redirect.github.com/gen-smtp/gen_smtp/issues/326">#326</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/gen-smtp/gen_smtp/compare/1.2.0...1.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gen_smtp&package-manager=hex&previous-version=1.2.0&new-version=1.3.0)](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-06-03 07:26:09 +00:00
dependabot[bot]
9f33806c42 build(deps): bump phoenix_live_view from 1.0.12 to 1.0.14 in /elixir (#9339)
Bumps
[phoenix_live_view](https://github.com/phoenixframework/phoenix_live_view)
from 1.0.12 to 1.0.14.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/phoenix_live_view/blob/v1.0.14/CHANGELOG.md">phoenix_live_view's
changelog</a>.</em></p>
<blockquote>
<h2>1.0.14 (2025-05-30)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Ensure <code>_unused</code> parameters are sent correctly during
form recovery (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3809">#3809</a>)</li>
<li>Fix form recovery failing and blocking updates when a form does not
have any inputs (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3818">#3818</a>)</li>
</ul>
<h2>1.0.13 (2025-05-28)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Ensure submitter value is sent when submitting a form with
<code>phx-trigger-action</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3815">#3815</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="34e0634d1c"><code>34e0634</code></a>
release v1.0.14</li>
<li><a
href="cb37eb1266"><code>cb37eb1</code></a>
Update assets</li>
<li><a
href="9c8be3e96c"><code>9c8be3e</code></a>
backport <a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3821">#3821</a></li>
<li><a
href="8d417129e1"><code>8d41712</code></a>
backport <a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3816">#3816</a></li>
<li><a
href="1c4cec573a"><code>1c4cec5</code></a>
release v1.0.13</li>
<li><a
href="11c99906f3"><code>11c9990</code></a>
Update form-bindings.md to add a note about known limitations of
phx-disable-...</li>
<li><a
href="8bca18692b"><code>8bca186</code></a>
Add section for preventing form submission in the form bindings guide
(<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3798">#3798</a>)</li>
<li><a
href="f29bbc572c"><code>f29bbc5</code></a>
Improve doc links betweens <code>async result/1</code> and
<code>assign_async/4</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3803">#3803</a>)</li>
<li><a
href="1ab79c9c8e"><code>1ab79c9</code></a>
fix live_reload_test on OTP 28</li>
<li><a
href="a819547247"><code>a819547</code></a>
Update assets</li>
<li>Additional commits viewable in <a
href="https://github.com/phoenixframework/phoenix_live_view/compare/v1.0.12...v1.0.14">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=phoenix_live_view&package-manager=hex&previous-version=1.0.12&new-version=1.0.14)](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-06-03 07:25:38 +00:00
dependabot[bot]
5e9a8e06dd build(deps): bump opentelemetry_logger_metadata from 0.1.0 to 0.2.0 in /elixir (#9338)
Bumps
[opentelemetry_logger_metadata](https://github.com/salemove/opentelemetry_logger_metadata)
from 0.1.0 to 0.2.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/salemove/opentelemetry_logger_metadata/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=opentelemetry_logger_metadata&package-manager=hex&previous-version=0.1.0&new-version=0.2.0)](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-06-03 07:25:24 +00:00
Jamil
0f0f34cd40 fix(portal): sort before asserting on list equality (#9377)
Fixes minor flakiness introduced in #9373
2025-06-03 06:58:31 +00:00
Jamil
9c3f6e7b36 refactor(portal): don't send ip_stack for non-DNS resources (#9376)
We always return the `ip_stack` field when rendering resource for both
WebSocket and REST APIs. If the resource's type is not `:dns` then this
will be `nil`.

Related:
https://github.com/firezone/firezone/pull/9303#discussion_r2119681062
2025-06-02 23:16:49 -07:00
Brian Manifold
60c90c5c9a fix(portal): Update group sync to ignore soft deleted groups (#9373)
Why:

* When a directory sync occurs, all groups in the DB need to be pulled
in case a synced group needs to be resurrected. Prior to adding the
directory sync deletion circuit breaker the app would "re-delete"
already deleted groups. This was basically a no-op, however, once the
deletion circuit breaker was put in the deletion of already deleted
groups had the possibility of throwing off the circuit breaker and cause
it to fail a directory sync when it was not needed, due to making it
seem as though too many groups were being deleted. This commit makes
sure we don't add already deleted groups to the list of groups needing
to be deleted for a given sync.

Fixes: #9364
2025-06-03 04:29:56 +00:00
Jamil
440eee3086 fix(portal): treat missing organizationUnits as empty list (#9371)
When a Google account has no organization units defined in its
directory, the Google API can return a `200` response without the
`organizationUnits` key. In such cases, we should treat this as an empty
list such that the remainder of the sync will continue.
2025-06-03 03:01:12 +00:00
Jamil
6fc7d2e4e0 feat(portal): configurable ip stack for DNS resources (#9303)
Some poorly-behaved applications (e.g. mongo) will fail to connect if
they see both IPv4 and IPv6 addresses for a DNS resource, because they
will try to connect to both of them and fail the whole connection setup
if either one is not routable.

To fix this, we need to introduce a knob to allow admins to restrict DNS
resources to only A or AAAA records.


<img width="750" alt="Screenshot 2025-06-02 at 10 48 39 AM"
src="https://github.com/user-attachments/assets/4dbcb6ae-685f-43ee-b9e8-1502b365a294"
/>

<img width="1174" alt="Screenshot 2025-06-02 at 11 05 53 AM"
src="https://github.com/user-attachments/assets/02d0a4b3-e6e8-4b6d-89fa-d3d999b5811e"
/>

---

Related:
https://firezonehq.slack.com/archives/C08KPQKJZKM/p1746720923535349
Related: #9300
Fixes: #9042
2025-06-03 02:24:41 +00:00
Jamil
6d4d3a34a0 fix(portal): Uniq nodes before counting (#9352)
While we shouldn't have any duplicates in this list, it would be a good
idea to unique the node names before counting just to be sure.
2025-06-01 18:00:30 -07:00
Jamil
37ae1a4e92 fix(portal): fix false-positive cluster errors (#9351)
Fixes the following issues after learning they're still a problem:

- We need to include our own node when checking for connected node count
- Need to match against the `formatted` key inside message when
filtering Sentry events
2025-06-01 17:56:19 -07:00
Jamil
8bbc7e2960 fix(portal): fix threshold calc for connected nodes (#9350)
In #9342 we started logging only if our connected nodes fell below the
threshold. However, on error, we failed to calculated the new list.

On startup, the first few `loads` will be failures, and the connected
list will remain empty, causing this to report a false positive.
2025-06-01 16:38:07 -07:00
Jamil
f65fcffbfc fix(portal): fix sentry before_send when message is nil (#9349)
A regression was introduced in #9242 where it appears that some Sentry
events don't contain messages, so the filtering module is updated only
to act on events with messages.
2025-06-01 12:32:08 -07:00
Brian Manifold
870aee3812 refactor(portal): add migration to remove created_by_ columns (#9318)
Why:

* This commit contains only a migration to remove the
created_by_identity and created_by_actor columns on multiple tables.
This migration will be run manually due to the long running sync jobs
that are currently in the system. This migration should be a no-op after
the manual DB updates.
2025-06-01 12:08:15 -07:00
Jamil
cc6c57125d revert: "fix(portal): Silence cluster challenge reply errors" (#9345)
This was actually an issue due to accidentally deleting the
`RELEASE_COOKIE` var.

Reverts firezone/firezone#9344
2025-06-01 10:49:49 -07:00
Jamil
42bccfd5e5 fix(portal): Silence cluster challenge reply errors (#9344)
Issues with node connections will be reported by the threshold logger.
2025-06-01 17:29:07 +00:00