Commit Graph

869 Commits

Author SHA1 Message Date
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
Jamil
73c3e2d87b refactor(portal): move gateway events to WAL (#9299)
This PR moves Gateway events to be triggered by the WAL broadcaster.
Some things of note that are cleaned up:

- The gateway `:update` event was never received anywhere (but in a
test) and so has been removed
- The account topic has been removed as it was also never acted upon
anywhere. Presence yes, but topic no
- The group topic has also been removed as it was only used to receive
broadcasted disconnects when a group is deleted, but this was already
handled by the token deletion and so is redundant.
2025-06-01 16:40:28 +00:00
Jamil
bfca4e8411 fix(portal): Use threshold-based logging for cluster errors (#9342)
We periodically fetch a list of all `RUNNING` VMs in GCP and then try to
connect to them for clustering. However, during deploys, it's expected
that we won't be able to connect to new VMs until they are fully up. The
fetch doesn't take health checks into account, so we need a
threshold-based error logging.

To address this, we do the following:

- We only log an error when failing to connect to nodes if we are
currently below the threshold for each of the `api`, `domain`, and `web`
node counts
- We silence node timeout errors, as these will happen during deploys
2025-06-01 15:53:38 +00:00
Jamil
544b6455eb fix(portal): ensure cluster state heals (#9319)
We use `libcluster`, a common Elixir library, for node discovery. It's a
very lightweight wrapper around Erlang's standard `Node.connect`
functionality.

It supports custom cluster formation strategies, and we've implemented
one based on fetching the list of nodes from the GCP API, and then
attempting to connect to them.

Unfortunately, our implementation had two bugs that prevented the
cluster from healing in the following two cases:

- If we successfully connect to nodes, we tracked an internal state var
as having successfully connected to them, forever. If we lost the
connection to these nodes (such as during a deploy where the elixir
nodes don't come up in time, causing the instance group manager to reap
them), then the state would never be updated, and we would never
reconnect to the lost nodes.
- If we failed to fetch the list of nodes more than 10 times (every 10
seconds, so 100 seconds), then we would fail to schedule the timer to
load the nodes again.

The first issue is fixed by removing our kept state altogether - this is
what libcluster is for. We can simply try to connect to the most recent
list of nodes returned from Google's API, and we now log a warning for
any nodes that don't connect.

The second issue is fixed by always scheduling the timer, forever,
regardless of the state of the Google API.

Fixes #8660 
Fixes #8698
2025-05-31 05:01:52 +00:00
Jamil
23bae8f878 fix(portal): Use account param for autoredirect (#9304)
When the client is connecting for the first time without any cookies
loaded the `conn.assigns.account` is non-existent, causing a `KeyError`.

Instead, we should be loading this param from the URL and fetching the
account from it.
2025-05-30 21:23:25 +00:00
Brian Manifold
a51b35a6b4 refactor(portal): remove created_by_<identity/actor> columns (#9306)
Why:

* Now that we have started using the `created_by_subject` field on
various tables, we no longer need to keep the
`created_by_<identity/actor>` fields. This will help remove a foreign
key reference and will be one step closer to allowing us to hard delete
data rather than soft deleting all data in order to keep foreign key
references like these.
2025-05-30 21:06:35 +00:00
Jamil
5fb36cf327 fix(portal): Fix sign out acceptance test (#9302)
In #9294, we moved the token deletion side effect to the WAL consumer,
which is not executed for standard tests. As such, we need to call this
callback manually in the sign out acceptance test.

Fixes
https://github.com/firezone/firezone/actions/runs/15337858094/job/43158416750?pr=9295

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-30 07:16:55 +00:00
Jamil
e09c7b42b0 refactor(portal): Move token events to WAL broadcaster (#9294)
Moves the broadcasting of `disconnect` messages caused by token
soft-deletions to the WAL broadcaster.

Notably, many tests had to be cleaned up because they were specifically
testing this side effect. Instead, these tests now test (1) the token is
deleted, and then the token deletion handler is tested to ensure the
message is broadcasted.
2025-05-29 17:46:57 +00:00
Jamil
6cea0cd6ec refactor(portal): Move client updates to WAL broadcaster (#9288)
Client updates are next on the path to moving more side effects to the
WAL broadcaster. This one has the following notable changes:

- ~~The `actor_clients` pubsub topic were only used to broadcast removal
of clients belonging to an actor; these are no longer needed since we
handle this in the individual removal event~~ EDIT: only the presence is
kept
- The `account_clients:{account_id}` pubsub and presence topic
definition has been moved to `Events.Hooks.Accounts` because these are
broadcasted using the account_id field based on account changes, and
have nothing to do with the client lifecycle


Related: #6294 
Related: #8187
2025-05-29 16:56:08 +00:00
Jamil
7c674ea21c refactor(portal): Move expire_flow to WAL broadcaster (#9286)
Similar to #9285, we move the `expire_flow` event to be broadcasted from
the WAL broadcaster.

Unrelated tests needed to be updated to not expect to receive the
broadcast, and instead check to ensure the record has been updated.

A minor bug is also fixed in the ordering of the `old_data, data`
fields.

Tested manually on dev.

Related: #6294 
Related: #8187
2025-05-29 06:35:03 +00:00
Jamil
8d701efe4b refactor(portal): Move config_changed to WAL broadcaster (#9285)
Now that the WAL consumer has been dry running in production for some
time, we can begin moving events over to it.

We start with a relatively simple case: the account `config_changed`
event.

Since side effects now happen decoupled from the actual record updates,
testing is updated in this PR:

- We don't expect broadcasts to happen in the `accounts_test.exs` -
these context modules are now solely responsible for managing updates to
records and will no longer need to worry about side effects (in the
typical case) like subscribe and broadcast
- The Event hooks module now contains all logic related to processing
side effects for a particular account update.

The net effect is that we now have dedicated module and tests for side
effects, starting with `accounts`.

Related: #6294 
Related: #8187
2025-05-28 18:23:48 +00:00
Brian Manifold
1358da189d refactor(portal): start using created_by_subject (#9284)
Now that we've added the `created_by_subject` column on all relevant
tables, we can start using that data in the portal.
2025-05-28 14:57:36 +00:00
Jamil
a3cb9aecbd refactor(portal): prefix event handlers with on_ (#9282)
These are event handlers and this naming makes a tad more sense.
2025-05-27 21:16:55 +00:00
dependabot[bot]
148a148b96 build(deps): bump logger_json from 7.0.2 to 7.0.3 in /elixir (#9266)
Bumps [logger_json](https://github.com/Nebo15/logger_json) from 7.0.2 to
7.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Nebo15/logger_json/releases">logger_json's
releases</a>.</em></p>
<blockquote>
<h2>7.0.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Format <code>metadata[:file]</code> as string in
<code>Formatters.Basic</code> by <a
href="https://github.com/smaximov"><code>@​smaximov</code></a> in <a
href="https://redirect.github.com/Nebo15/logger_json/pull/159">Nebo15/logger_json#159</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/smaximov"><code>@​smaximov</code></a>
made their first contribution in <a
href="https://redirect.github.com/Nebo15/logger_json/pull/159">Nebo15/logger_json#159</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Nebo15/logger_json/compare/7.0.2...7.0.3">https://github.com/Nebo15/logger_json/compare/7.0.2...7.0.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a0436795e1"><code>a043679</code></a>
Bump version</li>
<li><a
href="6d524a5577"><code>6d524a5</code></a>
Format <code>metadata[:file]</code> as string in
<code>Formatters.Basic</code> (<a
href="https://redirect.github.com/Nebo15/logger_json/issues/159">#159</a>)</li>
<li>See full diff in <a
href="https://github.com/Nebo15/logger_json/compare/7.0.2...7.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=logger_json&package-manager=hex&previous-version=7.0.2&new-version=7.0.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-05-27 16:52:01 +00:00
dependabot[bot]
f151386d1c build(deps): bump sentry from 10.9.0 to 10.10.0 in /elixir (#9265)
Bumps [sentry](https://github.com/getsentry/sentry-elixir) from 10.9.0
to 10.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-elixir/releases">sentry's
releases</a>.</em></p>
<blockquote>
<h2>10.10.0</h2>
<p>This release adds Telemetry crash reporting, fixes compatibility with
Erlang/OTP 28, and includes several bug fixes.</p>
<h3>New features</h3>
<ul>
<li>Add Telemetry integration for capturing Telemetry crash events in
Sentry (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/887">#887</a>
by <a
href="https://github.com/whatyouhide"><code>@​whatyouhide</code></a>)</li>
<li>Add <code>:owner</code> option for check-ins, providing more control
over cron monitoring (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/879">#879</a>
by <a
href="https://github.com/Miradorn"><code>@​Miradorn</code></a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Fix regexes on Erlang/OTP 28 (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/889">#889</a>
by <a
href="https://github.com/josevalim"><code>@​josevalim</code></a>)</li>
<li>Fix ignored exception in the default filter by correcting
<code>Plug.Parsers.RequestTooLarge</code> reference (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/884">#884</a>
by <a
href="https://github.com/mbaleczny"><code>@​mbaleczny</code></a>)</li>
<li>Fix hyperlink tag in <code>Sentry.LoggerBackend</code> moduledoc (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/880">#880</a>
by <a
href="https://github.com/bjacquet"><code>@​bjacquet</code></a>)</li>
<li>Remain compatible with new translation format to be introduced in
Elixir 1.19 (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/885">#885</a>
by <a
href="https://github.com/martosaur"><code>@​martosaur</code></a>)</li>
</ul>
<h3>Various improvements</h3>
<ul>
<li>Update OTP and OS in CI (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/882">#882</a>
by <a href="https://github.com/solnic"><code>@​solnic</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-elixir/blob/master/CHANGELOG.md">sentry's
changelog</a>.</em></p>
<blockquote>
<h2>10.10.0</h2>
<p>This release adds Telemetry crash reporting, fixes compatibility with
Erlang/OTP 28, and includes several bug fixes.</p>
<h3>New features</h3>
<ul>
<li>Add Telemetry integration for capturing Telemetry crash events in
Sentry (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/887">#887</a>
by <a
href="https://github.com/whatyouhide"><code>@​whatyouhide</code></a>)</li>
<li>Add <code>:owner</code> option for check-ins, providing more control
over cron monitoring (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/879">#879</a>
by <a
href="https://github.com/Miradorn"><code>@​Miradorn</code></a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Fix regexes on Erlang/OTP 28 (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/889">#889</a>
by <a
href="https://github.com/josevalim"><code>@​josevalim</code></a>)</li>
<li>Fix ignored exception in the default filter by correcting
<code>Plug.Parsers.RequestTooLarge</code> reference (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/884">#884</a>
by <a
href="https://github.com/mbaleczny"><code>@​mbaleczny</code></a>)</li>
<li>Fix hyperlink tag in <code>Sentry.LoggerBackend</code> moduledoc (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/880">#880</a>
by <a
href="https://github.com/bjacquet"><code>@​bjacquet</code></a>)</li>
<li>Remain compatible with new translation format to be introduced in
Elixir 1.19 (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/885">#885</a>
by <a
href="https://github.com/martosaur"><code>@​martosaur</code></a>)</li>
</ul>
<h3>Various improvements</h3>
<ul>
<li>Update OTP and OS in CI (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/882">#882</a>
by <a href="https://github.com/solnic"><code>@​solnic</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ded36e8e95"><code>ded36e8</code></a>
release: 10.10.0</li>
<li><a
href="2ced90ef99"><code>2ced90e</code></a>
Revert &quot;Add SpanProcessor for OpenTelemetry (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/875">#875</a>)&quot;</li>
<li><a
href="59ba37f493"><code>59ba37f</code></a>
Update CHANGELOG for release 10.10.0 (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/890">#890</a>)</li>
<li><a
href="84e61f5a40"><code>84e61f5</code></a>
Add Telemetry integration (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/887">#887</a>)</li>
<li><a
href="97d62eddb0"><code>97d62ed</code></a>
Fix regexes on Erlang/OTP 28 (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/889">#889</a>)</li>
<li><a
href="9887bd0cbc"><code>9887bd0</code></a>
Add SpanProcessor for OpenTelemetry (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/875">#875</a>)</li>
<li><a
href="14e20693a5"><code>14e2069</code></a>
Remain compatible with new translation format to be introduced in Elixir
1.19...</li>
<li><a
href="fd2e473376"><code>fd2e473</code></a>
Fix ignored exception in the default filter (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/884">#884</a>)</li>
<li><a
href="ebda03f8d8"><code>ebda03f</code></a>
Update GH issue templates for Linear compatibility (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/883">#883</a>)</li>
<li><a
href="93030f29e5"><code>93030f2</code></a>
Update OTP and OS in CI (<a
href="https://redirect.github.com/getsentry/sentry-elixir/issues/882">#882</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-elixir/compare/10.9.0...10.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sentry&package-manager=hex&previous-version=10.9.0&new-version=10.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-05-27 16:51:56 +00:00
dependabot[bot]
d57d3cbf94 build(deps): bump phoenix_ecto from 4.6.3 to 4.6.4 in /elixir (#9256)
Bumps [phoenix_ecto](https://github.com/phoenixframework/phoenix_ecto)
from 4.6.3 to 4.6.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/phoenix_ecto/blob/main/CHANGELOG.md">phoenix_ecto's
changelog</a>.</em></p>
<blockquote>
<h2>v4.6.4</h2>
<ul>
<li>Enhancements
<ul>
<li>Wrap raised Ecto exceptions so context is not lost</li>
<li>Do not override changeset actions</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/phoenixframework/phoenix_ecto/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=phoenix_ecto&package-manager=hex&previous-version=4.6.3&new-version=4.6.4)](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-05-27 14:29:46 +00:00
dependabot[bot]
632ab46e9e build(deps): bump @fontsource/source-sans-3 from 5.2.6 to 5.2.7 in /elixir/apps/web/assets (#9252)
Bumps
[@fontsource/source-sans-3](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/source-sans-3)
from 5.2.6 to 5.2.7.
<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.6&new-version=5.2.7)](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-05-27 13:57:39 +00:00
dependabot[bot]
8f8f7d4956 build(deps): bump workos from 1.1.0 to 1.1.1 in /elixir (#9262)
Bumps [workos](https://github.com/workos/workos-elixir) from 1.1.0 to
1.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/workos/workos-elixir/releases">workos's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Update WorkOS Dependency Version in Readme by <a
href="https://github.com/matthew-kerle"><code>@​matthew-kerle</code></a>
in <a
href="https://redirect.github.com/workos/workos-elixir/pull/65">workos/workos-elixir#65</a></li>
<li>Fix types n cast by <a
href="https://github.com/apoorv-2204"><code>@​apoorv-2204</code></a> in
<a
href="https://redirect.github.com/workos/workos-elixir/pull/63">workos/workos-elixir#63</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/matthew-kerle"><code>@​matthew-kerle</code></a>
made their first contribution in <a
href="https://redirect.github.com/workos/workos-elixir/pull/65">workos/workos-elixir#65</a></li>
<li><a
href="https://github.com/apoorv-2204"><code>@​apoorv-2204</code></a>
made their first contribution in <a
href="https://redirect.github.com/workos/workos-elixir/pull/63">workos/workos-elixir#63</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/workos/workos-elixir/compare/v1.1.0...v1.1.1">https://github.com/workos/workos-elixir/compare/v1.1.0...v1.1.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b90ef7ae62"><code>b90ef7a</code></a>
Bump to 1.1.1</li>
<li><a
href="16616322b3"><code>1661632</code></a>
fix(profile): 🐛 ensure casting of all fields in profile</li>
<li><a
href="d5adc7bbbd"><code>d5adc7b</code></a>
fix(profile struct):  fix cast of profile and token, to cast
profile map...</li>
<li><a
href="4fead72dcc"><code>4fead72</code></a>
Update deprecated runner in GHA workflow</li>
<li><a
href="ea11c24bd3"><code>ea11c24</code></a>
Pin third-party actions to currently used SHA (<a
href="https://redirect.github.com/workos/workos-elixir/issues/66">#66</a>)</li>
<li><a
href="d65cec3d04"><code>d65cec3</code></a>
Update WorkOS Dependency Version in Readme</li>
<li>See full diff in <a
href="https://github.com/workos/workos-elixir/compare/v1.1.0...v1.1.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=workos&package-manager=hex&previous-version=1.1.0&new-version=1.1.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-05-27 13:56:52 +00:00
Jamil
3659b07259 fix(portal): Fix capitalization for All Identity Providers (#9241) 2025-05-26 17:30:01 +00:00
Jamil
068f7dfc8e chore(deps): Bump codespell to 2.4.1 and fix found issues (#9221)
The dictionary was updated in and codespell found a few minor issues to
fix.

Supersedes #8990
2025-05-24 22:02:06 +00:00
Brian Manifold
3eacb6b9b5 fix(portal): Add sync deletion circuit breaker (#9194)
Why:

* We have seen issues with Google Admin SDK API returning bad
information when requesting directory info, such as Groups and
Identities. The requests seem to return successful HTTP codes, but the
data is missing, which our sync system interprets as all
Groups/Identities have been deleted from the Google Workspace. In order
to prevent this from happening a deletion circuit breaker function has
been added to stop a sync job if a certain percentage of the identities
will be deleted on the current run. This should prevent the possibility
of mass deleting Groups/Identities if an Identity Provider hands back
incorrect info on any sync.

Fixes: #9188
2025-05-22 04:31:21 +00:00
Brian Manifold
12b4a12f26 feat(portal): Add created_by_subject (#9176)
Why:

* We have decided to change the way we will do audit logging. Instead of
soft deleting data and keeping it in the table it was created in, we
will be moving to an audit trail table where various actions will be
recorded in a table/DB specifically for auditing purposes. Due to this
change we need to make sure that we don't have stale/dangling
references. One set of references we keep everywhere is
`created_by_identity_id` and `created_by_actor_id`. Those foreign key
references won't be able to be used after moving to the new audit
system. This commit will allow us to keep that info by pulling the
values and storing the data in a created_by_subject field on the record.
2025-05-20 20:03:46 +00:00
Jamil
ca59492003 fix(portal): bump width of default auth provider selection (#9174)
This is just a bit short at the moment:

<img width="467" alt="Screenshot 2025-05-16 at 3 55 55 PM"
src="https://github.com/user-attachments/assets/6d4b6d6d-d3a2-453e-a860-cb638127f684"
/>

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-16 16:20:47 -07:00
Jamil
c18cb69157 feat(portal): Add broadcast to simulate more real-world events (#9172)
We are currently consuming the WAL on production and it has shown very
little cost in terms of resource usage.

It would be better to get a more real-world test by sending actual
broadcasts with data.

To do this, we simply send a `Domain.PubSub.broadcast` with all of the
data received in the WAL message, which represents an absolute
worst-case scenario.
2025-05-16 22:00:59 +00:00
Jamil
f07aa8aa3a fix(portal): Add ReplicationConnectionManager (#9158)
When deploying, new Elixir nodes are spun up before the old ones are
brought down. This ensures that the state in the cluster is merge into
the new nodes between the old ones go away.

This also means, however, that the existing WAL consumer is still up
when our new one tries to come online.

Normally, this isn't an issue, because we find the old pid and return it
with `{:ok, existing_pid}`. When that VM goes away, the Supervisor(s) of
the new application notice and restart it,

However, if the cluster state diverges or is inconsistent during this
period, we may fail to find the existing pid, and try to start a new
ReplicationConnection. If the old pid is still active, this will fail
because there's a mutex on the connection. The original implementation
was designed to handle this case using the Supervisor with a
`:transient` restart policy.

What the author failed to understand is that the restart policy applies
only to _restarts_ and not initial starts, so if all of the new
application servers fail to find the old pid which is still connected,
and they all fail to come up, we won't consume the WAL.

This is fixed with a `ReplicationConnectionManager` that always comes up
fine, and then simply tries to start a `ReplicationConnection` every
30s, giving up after 5 minutes if it can't start one or find an existing
one. This will crash, causing the Supervisor to restart us, and then
notify us.
2025-05-16 19:54:27 +00:00
Jamil
65c58ee254 feat(portal): Zero-click client authentication (#9144)
Adds a new field to `settings/identity_providers` that allows an Admin
to designate any non-email/otp provider as the `default` for client
authentication. Clients will then navigate directly to the provider's
`/redirect` endpoint when authenticating, which in many cases will
automatically sign them in.

No existing providers are updated in this PR.



https://github.com/user-attachments/assets/7b962a25-76fd-491f-a194-60ed993821fc
2025-05-16 19:26:08 +00:00
Brian Manifold
dd5a53f686 fix(portal): Fix sign_up to properly populate email (#9105)
Why:

* During the account sign up flow, the email of the first admin was not
being populated in the `email` column on the auth_identities table. This
was due to atoms being passed in the attrs instead of strings to the
`create_identity` function. A migration was also created to backfill the
missing emails in the `auth_identities` table.
2025-05-13 19:49:25 +00:00
Brian Manifold
a8bea13591 fix(portal): Remove redundant index on actor_group_memberships (#9063)
Why:

* It was pointed out that the way Postgresql does compound indexes there
is no need to have an individual index on the first column of the
compound index. This commit removes the redundant index on the
`actor_id` for the `actor_group_membership` table.
2025-05-09 05:32:45 +00:00
Brian Manifold
20d8246ce8 fix(portal): Add indexes to actor_group_memberships (#9058)
Why:

* As we move towards hard deleting data one issue we've run into is with
cascading deletes on the actor_group_memberships table. In order to
solve this problem indexes have been created on the `actor_id` and
`group_id` columns of the actor_group_memberships.
2025-05-09 01:47:24 +00:00
Jamil
8a7f248dda fix(portal): ignore expected replication connection failures (#9003)
These are expected during deploys, so don't log them as errors. If the
Supervisor fails to start us after exhausting all attempts, it will log
an error.
2025-05-02 00:45:02 +00:00
Jamil
ce8c32229c docs: Reorder gcloud auth step for cloudsql (#9001)
This is almost always required.
2025-05-01 21:50:04 +00:00