Commit Graph

319 Commits

Author SHA1 Message Date
Jamil
c364004e97 fix(portal): Fix broken link to DNS docs (#4036) 2024-03-07 19:33:12 +00:00
Jamil
6419b1d096 chore(portal): Fix static files (#3974)
Fixes issues with static files returning 404s
2024-03-05 17:43:14 +00:00
Jamil
6b04fdf045 chore(portal): add assert_receive to wait until pid is started (#3973)
Should fix
https://github.com/firezone/firezone/actions/runs/8159796064/job/22304910482#step:12:20
2024-03-05 17:39:31 +00:00
dependabot[bot]
1f2b5e2b3d build(deps): Bump logger_json from 5.1.3 to 5.1.4 in /elixir (#3949)
Bumps [logger_json](https://github.com/Nebo15/logger_json) from 5.1.3 to
5.1.4.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="456b81ad64"><code>456b81a</code></a>
Bump version</li>
<li><a
href="41270ea932"><code>41270ea</code></a>
Translate warn to warning for Elixir &gt;= 1.11.0 (<a
href="https://redirect.github.com/Nebo15/logger_json/issues/113">#113</a>)</li>
<li><a
href="de7e7a49dd"><code>de7e7a4</code></a>
Remove broken image from readme</li>
<li>See full diff in <a
href="https://github.com/Nebo15/logger_json/compare/5.1.3...5.1.4">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=5.1.3&new-version=5.1.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>
2024-03-05 15:11:43 +00:00
dependabot[bot]
4664f05cb2 build(deps): Bump @fontsource/source-sans-3 from 5.0.18 to 5.0.19 in /elixir/apps/web/assets (#3947)
Bumps
[@fontsource/source-sans-3](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/source-sans-3)
from 5.0.18 to 5.0.19.
<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.0.18&new-version=5.0.19)](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>
2024-03-05 15:03:28 +00:00
Jamil
8c59ff7aa1 refactor: Reduce log levels for production releases to avoid filling customer's… (#3899)
Tuning the logging down a bit on our production releases. Prevents
gathering data we don't need to be gathering and prevents filling up
drive space with debug logs.

refs #3618
2024-03-03 17:42:09 -08:00
dependabot[bot]
0ac98ce1ff build(deps-dev): Bump floki from 0.35.3 to 0.35.4 in /elixir (#3842)
Bumps [floki](https://github.com/philss/floki) from 0.35.3 to 0.35.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/philss/floki/releases">floki's
releases</a>.</em></p>
<blockquote>
<h2>v0.35.4</h2>
<h2>Fixed</h2>
<ul>
<li>Fix regression in the order of elements in
<code>Floki.find/2</code></li>
</ul>
<h2>Pull requests</h2>
<ul>
<li>Polymorphism on Finder.find by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/522">philss/floki#522</a></li>
<li>Run all selector test with tuple list and html tree by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/523">philss/floki#523</a></li>
<li>Bump fast_html from 2.2.0 to 2.3.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/530">philss/floki#530</a></li>
<li>Reduce number of function call on traverse by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/531">philss/floki#531</a></li>
<li>Optimize Floki.children by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/533">philss/floki#533</a></li>
<li>Find without build html tree by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/534">philss/floki#534</a></li>
<li>Bump credo from 1.7.3 to 1.7.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/535">philss/floki#535</a></li>
<li>Optimize type selector by using pattern match by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/536">philss/floki#536</a></li>
<li>Raw HTML code clean up by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/538">philss/floki#538</a></li>
<li>Always return find elements in the correct order by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/540">philss/floki#540</a></li>
<li>Find using descendant selector without html tree by <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a> in
<a
href="https://redirect.github.com/philss/floki/pull/537">philss/floki#537</a></li>
<li>Release v0.35.4 by <a
href="https://github.com/philss"><code>@​philss</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/543">philss/floki#543</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/philss/floki/compare/v0.35.3...v0.35.4">https://github.com/philss/floki/compare/v0.35.3...v0.35.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/philss/floki/blob/main/CHANGELOG.md">floki's
changelog</a>.</em></p>
<blockquote>
<h2>[0.35.4] - 2024-02-19</h2>
<p>Besides the fix described below, this release also contains more
performance
improvements, thanks to <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a>.</p>
<h3>Fixed</h3>
<ul>
<li>Fix order of results for <code>Floki.find/2</code>. This was a
regression from the
previous version - thanks <a
href="https://github.com/ypconstante"><code>@​ypconstante</code></a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b66034f873"><code>b66034f</code></a>
Release v0.35.4 (<a
href="https://redirect.github.com/philss/floki/issues/543">#543</a>)</li>
<li><a
href="0840a05de8"><code>0840a05</code></a>
Find with descendant selector without html tree (<a
href="https://redirect.github.com/philss/floki/issues/537">#537</a>)</li>
<li><a
href="5e7ec166bb"><code>5e7ec16</code></a>
Always return find elements in the correct order (<a
href="https://redirect.github.com/philss/floki/issues/540">#540</a>)</li>
<li><a
href="dc9544e0d6"><code>dc9544e</code></a>
Raw HTML code clean up (<a
href="https://redirect.github.com/philss/floki/issues/538">#538</a>)</li>
<li><a
href="c6f28ebe6c"><code>c6f28eb</code></a>
Optimize namespace and type selector by using pattern match (<a
href="https://redirect.github.com/philss/floki/issues/536">#536</a>)</li>
<li><a
href="b7bc3776bf"><code>b7bc377</code></a>
Bump credo from 1.7.3 to 1.7.4 (<a
href="https://redirect.github.com/philss/floki/issues/535">#535</a>)</li>
<li><a
href="c688e2ae92"><code>c688e2a</code></a>
Find without build html tree (<a
href="https://redirect.github.com/philss/floki/issues/534">#534</a>)</li>
<li><a
href="712c08a5b8"><code>712c08a</code></a>
Optimize Floki.children (<a
href="https://redirect.github.com/philss/floki/issues/533">#533</a>)</li>
<li><a
href="c2c1a25cd3"><code>c2c1a25</code></a>
Reduce number of function call on traverse (<a
href="https://redirect.github.com/philss/floki/issues/531">#531</a>)</li>
<li><a
href="693e27b29b"><code>693e27b</code></a>
Bump fast_html from 2.2.0 to 2.3.0 (<a
href="https://redirect.github.com/philss/floki/issues/530">#530</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/philss/floki/compare/v0.35.3...v0.35.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=floki&package-manager=hex&previous-version=0.35.3&new-version=0.35.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>
2024-03-02 19:28:53 +00:00
dependabot[bot]
67cf605d3d build(deps): Bump flowbite from 2.2.1 to 2.3.0 in /elixir/apps/web/assets (#3846)
Bumps [flowbite](https://github.com/themesberg/flowbite) from 2.2.1 to
2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/themesberg/flowbite/releases">flowbite's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<ul>
<li>added new <a
href="https://flowbite.com/docs/components/clipboard/">copy to
clipboard</a> component and examples</li>
<li>added new JavaScript tab to the documentation examples</li>
<li>update dependency to Tailwind CSS v3.4.1</li>
<li>fixed carousel component behavior when there’s only one image</li>
<li>added new data attribute to set active and inactive classes for
tabs</li>
<li>Ruby on Rails integration fix for turbo load</li>
<li>minor bug fixes and improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7941f8bb79"><code>7941f8b</code></a>
docs(README): add new clipboard component to readme</li>
<li><a
href="e4f9f16aae"><code>e4f9f16</code></a>
fix(clipboard): target element can be input element too</li>
<li><a
href="5cd600a348"><code>5cd600a</code></a>
feat(changelog): add Ruby on Rails fix mention</li>
<li><a
href="fdf9bfe52a"><code>fdf9bfe</code></a>
chore(versioning): bump all version instances to
<code>v2.3.0</code></li>
<li><a
href="bfbf97db7b"><code>bfbf97d</code></a>
chore(package): update keywords and name</li>
<li><a
href="52ed4101a0"><code>52ed410</code></a>
Merge pull request <a
href="https://redirect.github.com/themesberg/flowbite/issues/804">#804</a>
from themesberg/fix-inconsistencies</li>
<li><a
href="06778c3906"><code>06778c3</code></a>
fix(modals): replace old alternative buttons with the new ones to have
consis...</li>
<li><a
href="bcb1dbf990"><code>bcb1dbf</code></a>
refactor(input fields): add maximum width to search and select
inputs</li>
<li><a
href="03667ef73a"><code>03667ef</code></a>
fix(input-forms): fix bg-color &amp; text-color on:dark for &quot;Form
validation&quot; inp...</li>
<li><a
href="3179d1ffa8"><code>3179d1f</code></a>
fix(forms): toggle switch typo</li>
<li>Additional commits viewable in <a
href="https://github.com/themesberg/flowbite/compare/v2.2.1...v2.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=flowbite&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=2.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>
2024-03-01 15:37:24 +00:00
Andrew Dryga
7e9a824870 Fix preloads after token is revoked 2024-03-01 10:07:51 -06:00
Jamil
6d32e30133 fix(docs): Add DNS docs for Linux (#3810)
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-29 21:12:24 +00:00
Andrew Dryga
3c04025be1 fix(portal): Fix IdP syncs (#3816) 2024-02-29 15:19:53 -06:00
Jamil
b9ad2d9c83 fix(portal): Use local image for logo path (#3814)
I saw the link fix, but it might be better to have the image served
locally from the product to keep the website and product decoupled.
2024-02-29 20:22:06 +00:00
Andrew Dryga
f429fd673b Fix GCP logo URL 2024-02-29 10:16:28 -06:00
Andrew Dryga
bfe1fb0ff4 refactor(portal): unify format of error payloads in websocket connection (#3697)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-02-28 23:06:52 +00:00
Jamil
cea7784730 feat: Release 1.0.0-pre.9 (#3579)
This is a staging issue to update docs, website, and perform
infrastructure changes as part of the `1.0.0-pre.9` release.

- [ ]
https://firezonehq.slack.com/archives/C04HRQTFY0Z/p1707763144588859
- [ ] Explain that `Everyone` group is now automatic
- [ ] Migrate existing `sites.routing` data to use managed relays,
explain to customers
- [ ] Manually test gateway upgrade script
- [x] Better client docs

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jason Elie Bou Kheir <5115126+jasonboukheir@users.noreply.github.com>
Co-authored-by: Brian Manifold <bmanifold@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-02-28 22:23:29 +00:00
Jamil
127b97e588 fix(portal|website): Fix static paths for website and elixir (#3802)
Phoenix VerifiedRoutes expects directories for `statics` where we were
passing filenames too.

These are removed since they're not required -- all of the top level
files we need to serve at the root don't need VerifiedRoutes.

For the website, the files were named incorrectly.


The above issues were causing 404s on both the website and portal.
2024-02-28 20:03:42 +00:00
Andrew Dryga
9e11ddb1cd Do not crash on disconnect messages in LV (#3795)
This message is sent by the some of the broadcasters and it was
resulting in a process crash (on a socket that will be disconnected
anyways), but this triggered our logging alerts anyways. So we will
simply ignore them globally to suppres the noise.
2024-02-28 11:42:07 -06:00
Jamil
2ed6b3d07f chore(connlib): Tune log filters to enable debug in dev and info for gateway deployments (#3788)
Refs #3618

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-02-27 23:35:08 +00:00
Jamil
17692ecf4d fix(portal|website): Fix favicons for dark mode (#3785) 2024-02-27 18:57:37 +00:00
Thomas Eizinger
67aeb009e9 chore: move markdown files into docs/ directory (#3773)
Apart from the LICENSE, GitHub supports detecting all of these files
also within a `docs/` directory. This includes the README!
2024-02-27 01:12:57 +00:00
Brian Manifold
088cbbd3c4 Remove assertions in sign-in success acceptance tests (#3733)
Why:

* The extra assertions added to the sign-in success acceptance tests do
not behave as reliably as needed. The assertions being removed were
checking an intermediate step of the sign-in success redirect process,
so the test should not be fundamentally changed by removing them. We'll
just be checking the final state rather than the intermediate state and
the final state. The previous commit removing these assertions was only
done on the email signin tests. This commit updates the userpass and
openid_connect tests
2024-02-22 18:23:23 +00:00
Brian Manifold
3ce4c31dea refactor(portal): Remove assertions in sign-in success acceptance tests (#3730)
Why:

* The extra assertions added to the sign-in success acceptance tests do
not behave as reliably as needed. The assertions being removed were
checking an intermediate step of the sign-in success redirect process,
so the test should not be fundamentally changed by removing them. We'll
just be checking the final state rather than the intermediate state and
the final state.
2024-02-22 02:21:00 +00:00
Jamil
afc753f5df refactor(portal): Add website_link component (#3715)
https://github.com/firezone/firezone/pull/3579#discussion_r1496082754

---------

Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-22 00:45:45 +00:00
Brian Manifold
d135a8b8eb Add sign-in success page for clients (#3714)
Why:

* On some clients, the web view that is opened to sign-in to Firezone is
left open and ends up getting stuck on the Sign In page with the
liveview loader on the top of the page also stuck and appearing as
though it is waiting for another response. This commit adds a sign-in
success page that is displayed upon successful sign-in and shows a
message to the user that lets them know they can close the window if
needed. If the client device is able to close the web view that was
opened, then the page will either very briefly be shown or will not be
visible at all due to how quickly the redirect happens.
2024-02-21 21:31:11 +00:00
Thomas Eizinger
e766407dfb feat!(portal): return relays as plain socket addresses (#3665)
Extracted out of #3391.

We don't actually need this for #3391 though because we've added a
compatibility layer during deserialization. But, it will be good to
remove that compat layer at some point which means we have to return the
addresses as plain socket addresses. Because that is a breaking change,
I decided to extract this into a different PR.

Co-authored-by: conectado <gabrielalejandro7@gmail.com>

---------

Co-authored-by: conectado <gabrielalejandro7@gmail.com>
2024-02-21 01:31:03 +00:00
Jamil
19a7bac4ae chore(ci): enforce shellscript formatting and style (#3679)
Noticed that we all have different styles of writing scripts :-).

This PR adds linting to our shell scripts to standardize on formatting,
catch common issues and/or possible security bugs.

For editor setup:
- Ensure [`shellcheck`](https://github.com/koalaman/shellcheck) and
[`shfmt`](https://github.com/mvdan/sh) are in your `PATH`
- Configure `shfmt` with indentation of `4`, otherwise it uses tabs by
default.
[Here](https://github.com/jamilbk/nvim/blob/master/init.vim#L159) is how
you can do that with Vim and
[here](https://marketplace.visualstudio.com/items?itemName=mkhl.shfmt)
is how for VScode.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Brian Manifold <bmanifold@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
2024-02-21 01:01:32 +00:00
Andrew Dryga
5b1e3ea1d1 feat(portal): Billing system (#3642) 2024-02-20 15:01:17 -06:00
Gabi
3d3e737ba3 refactor(connlib): replace webrtc-rs with snownet (#3391)
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>

Resolves: #3377.

---------

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-02-20 06:56:31 +00:00
Jamil
dc0119c347 Revert "feat(portal): Add sign-in success page for clients" (#3692)
Merged a bit too soon!
2024-02-19 13:53:47 -08:00
Brian Manifold
db399651f2 feat(portal): Add sign-in success page for clients (#3659)
Why:

* On some clients, the web view that is opened to sign-in to Firezone is
left open and ends up getting stuck on the Sign In page with the
liveview loader on the top of the page also stuck and appearing as
though it is waiting for another response. This commit adds a sign-in
success page that is displayed upon successful sign-in and shows a
message to the user that lets them know they can close the window if
needed. If the client device is able to close the web view that was
opened, then the page will either very briefly be shown or will not be
visible at all due to how quickly the redirect happens.

Closes #3608 

<img width="625" alt="Screenshot 2024-02-15 at 4 30 57 PM"
src="https://github.com/firezone/firezone/assets/2646332/eb6a5df6-4a4c-4e54-b57c-5da239069ea9">

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-02-19 21:00:49 +00:00
Andrew Dryga
4dc8cdf908 Revert "fix(gateway): Remove /dev/net/tun requirement and clean up upgrade script (#3691)
This reverts PR #3392.
This reverts commit 16f5401a73.
2024-02-19 20:03:14 +00:00
Jamil
9054f70995 refactor(ci): simplify dns resources in ci (#3653)
Attempt at cleaning a couple things I missed in code review.

The old httpbin resource wasn't being used anyhow, so I just deduped
them and updated things in a couple other places that had drifted.

Hopefully this fixes the [flaky
CI](https://github.com/firezone/firezone/actions/runs/7918422653/job/21616835910)
2024-02-15 23:50:12 +00:00
Brian Manifold
1939b9c3f9 Update Okta IDP adapter in portal (#3647)
Why:

* After reviewing the Okta docs closer, in order for an OAuth token to
have Okta API scopes attached to it, the Okta org authorization server
must be used, not a custom authorization server (which includes the
'default' authorization server). This means that the OAuth Authorization
URI that was previously being asked for in the Okta Adapter form won't
work for IDP sync to Firezone. This commit updates the form to accept
the Okta Account Domain (i.e. `<company>.okta.com`)
2024-02-14 18:42:39 +00:00
Brian Manifold
f18ec6e4d5 Add Okta directory sync (#3614)
Why:

* To allow syncing of users/groups/memberships from an IDP to Firezone,
a custom identify provider adapter needs to be created in the portal
codebase at this time. The custom IDP adapter created in this commit is
for Okta.

* This commit also includes some additional tests for the Microsoft
Entra IDP adapter. These tests were mistakenly overlooked when finishing
the Entra adapter.
2024-02-13 02:12:54 +00:00
Reactor Scram
830302af43 test(linux): Low-risk changes to prepare for Linux DNS support (#3625)
This splits off the easy parts from #3605.

- Add quotes around `PHOENIX_SECURE_COOKIES` because my local
`docker-compose` considers unquoted 'false' to be a schema error - Env
vars are strings or numbers, not bools, it says
- Create `test.httpbin.docker.local` container in a new subnet so it can
be used as a DNS resource without the existing CIDR resource picking it
up
- Add resources and policies to `seeds.exs` per #3342
- Fix warning about `CONNLIB_LOG_UPLOAD_INTERVAL_SECS` not being set
- Add `resolv-conf` dep and unit tests to `firezone-tunnel` and
`firezone-linux-client`
- Impl `on_disconnect` in the Linux client with `tracing::error!`
- Add comments

```[tasklist]
- [x] (failed) Confirm that the client container actually does stop faster this way
- [x] Wait for tests to pass
- [x] Mark as ready for review
```
2024-02-12 19:04:51 +00:00
Andrew Dryga
beee8bd52e Add dynamic/managed groups and default Everyone one (#3346)
After this PR is merged a manual migration will be needed to upsert
Everyone group to existing accounts.

Closes #2588 

*This PR also improves UX around groups:*

1. Group selection now shows their source in dropdowns: 
<img width="669" alt="Screenshot 2024-02-08 at 18 30 25"
src="https://github.com/firezone/firezone/assets/1877644/accb5cf9-1c16-429b-a16f-e63bb0c7930f">

2. The same is done across other pages which will help in case there is
a duplicate group name (eg. manual and synced one):
<img width="766" alt="Screenshot 2024-02-08 at 18 31 59"
src="https://github.com/firezone/firezone/assets/1877644/f3133ceb-fc9d-4f7a-bfe2-63f81f379c9a">
<img width="1728" alt="Screenshot 2024-02-08 at 18 34 04"
src="https://github.com/firezone/firezone/assets/1877644/daa86c7e-8401-418d-b8e5-ddaff31a1834">
<img width="1728" alt="Screenshot 2024-02-08 at 18 34 22"
src="https://github.com/firezone/firezone/assets/1877644/5c885d06-0b0d-4385-a06e-8e9c09b85535">
<img width="576" alt="Screenshot 2024-02-08 at 18 34 31"
src="https://github.com/firezone/firezone/assets/1877644/86b2020e-7159-4800-a08e-cecf7b0b1798">


3. A bug was fixed and now we don't show synced groups whenever an actor
is created:
<img width="662" alt="Screenshot 2024-02-08 at 18 32 22"
src="https://github.com/firezone/firezone/assets/1877644/f69efe85-d7ac-412a-b267-9094a8dd9426">

4. We provide reason why groups are not editable:
<img width="591" alt="Screenshot 2024-02-08 at 18 33 29"
src="https://github.com/firezone/firezone/assets/1877644/1525d876-1aad-4a17-be38-6a39c4bc7908">
<img width="558" alt="Screenshot 2024-02-08 at 18 33 50"
src="https://github.com/firezone/firezone/assets/1877644/92615b97-19a6-4bf9-804d-d0d16c6c2dfe">
2024-02-09 22:07:42 +00:00
Andrew Dryga
980246ae3b feat(portal): Broadcast resource sites (#3466)
Adds `client_address` field which should be passed down to clients to
nicely render copy-pasteable address. Client address MUST contain full
`address` field to prevent users from shooting themselves in the foot by
creating broken resources.

We also now broadcast a list of connected sites (gateway_groups) to the
client. When a `connection_request` response is sent a new field
`gateway_group_id` is added, this way the client can know which site
it's using, and if a resource is updated and `gateway_group_id` is
removed - it should restart the connection. The portal can not make such
a decision as it doesn't track active connections.

<img width="739" alt="Screenshot 2024-01-31 at 16 26 50"
src="https://github.com/firezone/firezone/assets/1877644/799bd354-40d5-4cc3-8ae9-9d228c5e466a">
<img width="678" alt="Screenshot 2024-01-31 at 16 27 01"
src="https://github.com/firezone/firezone/assets/1877644/782e47a5-43a8-4ba7-9245-61efbbe41f7f">
<img width="738" alt="Screenshot 2024-01-31 at 16 27 27"
src="https://github.com/firezone/firezone/assets/1877644/8c7a4edd-98d8-4e09-9e4f-09c2e5a890d0">
<img width="1728" alt="Screenshot 2024-01-31 at 16 27 49"
src="https://github.com/firezone/firezone/assets/1877644/ed8f7251-fb82-47df-9878-f7e7ae8cbcba">

This PR will be reabsed on `main` once #2240 is merged.
2024-02-09 08:36:37 -06:00
Jamil
232b3874f9 fix(ci): wait for Vault to load sign in form before filling it out (#3585)
Fixes flaky tests:


https://github.com/firezone/firezone/actions/runs/7803717485/job/21284091520#step:21:1357
2024-02-06 19:10:31 +00:00
Jamil
af69e841bc refactor(portal): log in -> sign in (#3577)
Just making naming a little more consistent
2024-02-06 15:26:09 +00:00
Jamil
fcbf6a68bc chore(portal): Misc sign in UX fixes (#3564)
Fixes #3389 
Fixes #3331 


Will need #3433 to merge for the entra logo to show up, but this will
fail gracefully if it lands before then.

<img width="537" alt="Screenshot 2024-02-05 at 5 36 17 AM"
src="https://github.com/firezone/firezone/assets/167144/90967150-e048-47ef-99cd-2f758021d017">
<img width="543" alt="Screenshot 2024-02-05 at 5 33 30 AM"
src="https://github.com/firezone/firezone/assets/167144/9683488a-ec4e-47dd-bdbc-e95fcf0bc08c">
<img width="528" alt="Screenshot 2024-02-05 at 5 33 13 AM"
src="https://github.com/firezone/firezone/assets/167144/fce5487d-3dd5-4b21-bb20-5097ba7055be">
2024-02-05 21:45:00 +00:00
Andrew Dryga
a969e7b555 Do not show deleted resources in the client and cleanup connections table 2024-02-05 10:28:05 -06:00
Brian Manifold
ed1ceb7e6e feat(portal): Add Microsoft Entra IDP sync to portal (#3433)
Why:

* To allow syncing of users/groups/memberships from an IDP to Firezone,
a custom identify provider adapter needs to be created in the portal
codebase at this time. The custom IDP adapter created in this commit is
for Microsoft Entra.
2024-02-05 15:32:06 +00:00
Jamil
6e6c32a29f chore(portal): Add helptext explaning auth identities/tokens (#3515)
Fixes #3333
2024-02-02 19:37:54 +00:00
Andrew Dryga
a5bd96901a feat(portal): Sync transitive memberships for Google Workspace (#3524)
Simple flag flattens groups for us, the response goes from this:
```
{
  "kind": "admin#directory#members",
  "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/imfnHDtNRUYTX-TXo9Wx-Vkties\"",
  "members": [
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/MPY45KYgoPIU6Hg4EKDnN37iS_0\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "GROUP",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/OMG8U2W2iFiQQxRb_og9WlQgmFc\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "GROUP",
      "status": "ACTIVE"
    }
  ]
}
```
to this:
```
{
  "kind": "admin#directory#members",
  "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/c7FOY_1zR63uMaLyM2_y9Y86cTA\"",
  "members": [
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/ensFY6DvZ10v87OlK6VjWqBWlb0\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "USER",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/0zfy-53NUSeG8H9ZByTOVM29Djs\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "USER",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/nJga9tGb4YjfHKeVSwV2a3PYu4Y\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "USER",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/YUAlMAD1lcOVfs56U-8lm6G4Lr8\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "USER",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/2nmJRU48HjxV9CC85ZKJ2kq80Ow\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "USER",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/aTk1AuuEGTZFbVzVvbC7438M65Y\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "GROUP",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/4nBIP5jw6Kxn54pjS1tjrQHtuNA\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "USER",
      "status": "ACTIVE"
    },
    {
      "kind": "admin#directory#member",
      "etag": "\"WAJlQ2CAtCOLo0U_9sYFBfdkZrUK9X-qYRarohkyMdU/luCHBeG7WcB54TUHTLr2Xy7he8s\"",
      "id": "XXXXXXX",
      "email": "XXXXXXXX@firezone.dev",
      "role": "MEMBER",
      "type": "GROUP",
      "status": "ACTIVE"
    }
  ]
}
```
and we already ignore groups in the response so no other changes are
needed.
2024-02-02 06:26:29 +00:00
Andrew Dryga
d406f603f4 Fix bug with restoring deleted identities and actors (#3523) 2024-02-01 22:11:16 +00:00
Andrew Dryga
a211f96109 feat(portal): Broadcast state changes to connected clients and gateways (#2240)
# Gateways
- [x] When Gateway Group is deleted all gateways should be disconnected
- [x] When Gateway Group is updated (eg. routing) broadcast to all
affected gateway to disconnect all the clients
- [x] When Gateway is deleted it should be disconnected
- [x] When Gateway Token is revoked all gateways that use it should be
disconnected

# Relays
- [x] When Relay Group is deleted all relays should be disconnected
- [x] When Relay is deleted it should be disconnected
- [x] When Relay Token is revoked all gateways that use it should be
disconnected

# Clients
- [x] Remove Delete Client button, show clients using the token on the
Actors page (#2669)
- [x] When client is deleted disconnect it
- [ ] ~When Gateway is offline broadcast to the Clients connected to it
it's status~
- [x] Persist `last_used_token_id` in Clients and show it in tokens UI

# Resources
- [x] When Resource is deleted it should be removed from all gateways
and clients
- [x] When Resource connection is removed it should be deleted from
removed gateway groups
- [x] When Resource is updated (eg. traffic filters) all it's
authorizations should removed

# Authentication
- [x] When Token is deleted related sessions are terminated
- [x] When an Actor is deleted or disabled it should be disconnected
from browser and client
- [x] When Identity is deleted it's sessions should be disconnected from
browser and client
- [x] ^ Ensure the same happens for identities during IdP sync
- [x] When IdP is disabled act like all actors for it are disabled?
- [x] When IdP is deleted act like all actors for it are deleted?

# Authorization
- [x] When Policy is created clients that gain access to a resource
should get an update
- [x] When Policy is deleted we need to all authorizations it's made
- [x] When Policy is disabled we need to all authorizations it's made
- [x] When Actor Group adds or removes a user, related policies should
be re-evaluated
- [x] ^ Ensure the same happens for identities during IdP sync

# Settings
- [x] Re-send init message to Client when DNS settings change

# Code
- [x] Crear way to see all available topics and messages, do not use
binary topics any more

---------

Co-authored-by: conectado <gabrielalejandro7@gmail.com>
2024-02-01 11:02:13 -06:00
Jamil
52971cdce3 refactor: Remove user-facing parts of STUN-only feature (#3453)
Fixes #3353
2024-01-31 23:09:45 +00:00
Jamil
d043f81e95 fix(ci): Increase test nonce length to reduce collisions (#3373)
Looks like there's a small chance for collision with our test string and
the base64-encoded token (what are the odds):
https://github.com/firezone/firezone/actions/runs/7633757802/job/20796573898
2024-01-29 18:50:33 +00:00
Jamil
7f88b7ce70 feat(ops): Add support provisioning helper (#3422)
Helpful when debugging Enterprise customer's accounts. Use with caution.
2024-01-29 18:47:56 +00:00
dependabot[bot]
d616fa8879 build(deps): Bump telemetry_metrics from 0.6.1 to 0.6.2 in /elixir (#3362)
Bumps
[telemetry_metrics](https://github.com/beam-telemetry/telemetry_metrics)
from 0.6.1 to 0.6.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/beam-telemetry/telemetry_metrics/blob/main/CHANGELOG.md">telemetry_metrics's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>The format is based on <a
href="https://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>,
and this project adheres to <a
href="https://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0c55984c99"><code>0c55984</code></a>
Release v0.6.2</li>
<li><a
href="7a52d58afb"><code>7a52d58</code></a>
Update console_reporter.ex</li>
<li><a
href="b869701dc0"><code>b869701</code></a>
Use function capture for attaching <code>handle_event/4</code> (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/107">#107</a>)</li>
<li><a
href="084a430b85"><code>084a430</code></a>
Remove duplicated words in the module doc (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/106">#106</a>)</li>
<li><a
href="61ee7ef630"><code>61ee7ef</code></a>
Fix incompatibility Elixir/Erlang OTP error in GitHub CI (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/104">#104</a>)</li>
<li><a
href="27a73a6c49"><code>27a73a6</code></a>
Make validate_recording_rule_fun_options!/2 private (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/103">#103</a>)</li>
<li><a
href="2c298dcacc"><code>2c298dc</code></a>
Make keep_fun/2 private (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/102">#102</a>)</li>
<li><a
href="578be9cd64"><code>578be9c</code></a>
Fix tag example with duration instead of count (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/101">#101</a>)</li>
<li><a
href="c1cb90ef28"><code>c1cb90e</code></a>
Migrate GitHub Actions to erlef/setup-beam (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/99">#99</a>)</li>
<li><a
href="6c376985dc"><code>6c37698</code></a>
Fix grammar in Metrics moduledoc (<a
href="https://redirect.github.com/beam-telemetry/telemetry_metrics/issues/98">#98</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/beam-telemetry/telemetry_metrics/compare/v0.6.1...v0.6.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=telemetry_metrics&package-manager=hex&previous-version=0.6.1&new-version=0.6.2)](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>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-01-29 16:33:25 +00:00