Commit Graph

434 Commits

Author SHA1 Message Date
Jamil
31111257e1 fix(portal): Fix layout of live_table filters controls (#8256)
Fixes layout of filters controls. A more permanent fix will be
introduced as part of #8255
2025-02-24 18:27:50 -08:00
Jamil
8bd94599a9 chore(portal): Remove dead ScimController (#8253)
This is leftover from a previous prototype and can be removed.
2025-02-24 22:58:38 +00:00
Jamil
c5929d4063 fix(portal): Show reload button when table data is stale (#8143)
Sentry uncovered a bug in the resources index liveview where it looks
like some code copy-pasted from the policies index view wasn't updated
properly to work in the resources live view, causing the view to crash
if an admin was viewing the table while the resources are changed in
another page.

In debugging that, I realized the best UX when viewing these tables is
usually just to show a `Reload` button and not update the data live
while the admin is viewing it, as this can cause missed clicks and other
annoyances.

This PR adds an optional `stale` component attribute that, if true, will
render a `Reload` button in the live table which upon clicking will
reload the live table.

Not all index views are updated with this - in some views there is
already logic to handle making an intelligent update without breaking
the view if the data is updated - for example for the clients table.

Ideally, we live-update things that don't reflow layout inline (such as
`online/offline` presence) and for things that do cause layout reflow
(create/delete), we show the `Reload` button.

However that work is saved for a future PR as this one fixes the
immediate bug and this is not the highest priority.

<img width="1195" alt="Screenshot 2025-02-16 at 8 44 43 AM"
src="https://github.com/user-attachments/assets/114efffa-85ea-490d-9cea-78c607081ce3"
/>
<img width="401" alt="Screenshot 2025-02-16 at 9 59 53 AM"
src="https://github.com/user-attachments/assets/8a570213-d4ec-4b6c-a489-dcd9ad1c351c"
/>
2025-02-24 15:39:16 +00:00
Jamil
29f0ac0a00 fix(portal): Handle missing params in idp callback (#8239)
It's possible for a client or admin to try and load the redirect URL
directly, or a misconfigured IdP may redirect back to us with missing
params. We should redirect with an error flash instead of 500'ing.
2025-02-24 13:38:10 +00:00
Jamil
80210a5093 fix(portal): fix typo on settings -> dns page (#8207) 2025-02-19 15:41:34 -08:00
Jamil
03558a5899 feat(website): Internet resource migration blogpost (#8150)
This is an announcement we will be linking to.
2025-02-19 15:28:52 -08:00
Jamil
28559a317f chore(portal): Optionally drop NotFoundError to sentry (#8183)
By specifying the `before_send` hook, we can easily drop events based on
their data, such as `original_exception` which contains the original
exception instance raised.

Leveraging this, we can add a `report_to_sentry` parameter to
`Web.LiveErrors.NotFound` to optionally ignore certain not found errors
from going to Sentry.
2025-02-18 21:55:23 +00:00
Jamil
9b5a7e5fb3 fix(portal): Fix grammar on account lockout message (#8149) 2025-02-17 06:06:28 +00:00
Jamil
5a3e940334 fix(portal): Fix typo in sites index (#8139)
Fixes a typo introduced in #6905
2025-02-15 07:25:08 -08:00
Andrew Dryga
bacb4596b7 feat(portal): Internet Sites (#6905)
Related #6834

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-02-15 00:34:30 +00:00
oddlama
62ece23968 chore(portal): harden systemd relay example (#8045)
This adds hardening to the relay example systemd service shown in the
admin portal. Instead of running the service as root to download the
relay binary, we can let systemd manage the state directory and run with
lower privileges at all times.

I've also removed a shell injection which would in theory allow a
malicious github api server to run commands as root in the pre start
phase.

That being said I have no idea how this script is intended to function,
since it downloads the relay binary from the latest release on GitHub
which currently is a `gui-client` release without any relay binaries
attached.
2025-02-10 14:04:30 -08:00
Jamil
a93f40befd chore(portal): Bump elixir to 1.18.2 (#8009)
This is mostly to stay up to date with current Elixir and benefit from
the new included [JSON parser](https://hexdocs.pm/elixir/JSON.html).

Removing `Jason` in favor of the embedded `JSON` parser is saved for a
[future PR](https://github.com/firezone/firezone/issues/8011).

It found a couple type violations which were simple to fix, and some
formatting changes.
2025-02-05 23:52:58 +00:00
Jamil
dec2b0ee81 fix(portal): Only configure Sentry.LoggerHandler once (#8025)
The applications within our umbrella are all joined into a single Erlang
cluster, and logger configuration is applied already to the entire
umbrella.

As such, registering the Sentry log handler in each application's
startup routine triggers duplicate handlers to be registered for the
cluster, resulting in warnings like this in GCP:

```
Event dropped due to being a duplicate of a previously-captured event.
```

As such, we can move the log handler configuration to the top-level
`:logger` key, under the `:logger` subkey for configuring a single
handler. We then load this handler config in the `domain` app only and
it applies to the entire cluster.
2025-02-05 13:41:19 +00:00
Jamil
6be7cf6b45 feat(portal): Add Sentry reporting (#8013)
This adds https://github.com/getsentry/sentry-elixir to the portal for
automatic process crash and exception trace reporting.

It also configures Logger reporting for the `warning` level and higher,
and sets the data scrubbing rules to allow all Logger metadata keys
(`logger_metadata.*` in the Sentry project settings).

Lastly, it configures automatic HTTP error reporting by tying into the
`api` and `web` endpoint modules with a custom `plug` middleware so we
get automatic reporting of unsuccessful Phoenix responses.

It is expected this will be noisy when we first deploy and we'll need to
tune it down a bit. This is the same approach used with other Sentry
platforms.
2025-02-04 18:35:52 +00:00
dependabot[bot]
bbbd6eded2 build(deps): bump phoenix_live_view from 1.0.0-rc.6 to 1.0.3 in /elixir (#7983)
Bumps
[phoenix_live_view](https://github.com/phoenixframework/phoenix_live_view)
from 1.0.0-rc.6 to 1.0.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/phoenixframework/phoenix_live_view/blob/v1.0.3/CHANGELOG.md">phoenix_live_view's
changelog</a>.</em></p>
<blockquote>
<h2>1.0.3 (2025-01-28)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Fix regression where browser back/forward buttons used
<code>patch</code> instead of <code>navigate</code>, failing to update
the page (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3529">#3529</a>)</li>
<li>Fix client hooks inside streams that contain nested LiveViews (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3530">#3530</a>)</li>
<li>Fix LiveComponents in nested LiveViews not updating under certain
conditions (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3626">#3626</a>)</li>
<li>Fix client-side hooks not being cleared properly (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3628">#3628</a>)</li>
<li>Fix LiveUpload from client hook not auto uploading when immediately
followed by form event (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3647">#3647</a>)</li>
<li>Fix inputs being cleared in some cases when patching locked trees
(<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3647">#3647</a>)</li>
<li>Fix client hooks with dynamic IDs not being destroyed properly when
parts of the DOM are locked (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3651">#3651</a>)</li>
</ul>
<h3>Enhancements</h3>
<ul>
<li>Allow to configure if duplicate IDs / other detected errors should
warn or raise by passing <code>on_error</code> to
<code>Phoenix.LiveViewTest.live/3</code> /
<code>Phoenix.LiveViewTest.live_isolated/3</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3653">#3653</a>)</li>
<li>Also detect duplicate LiveComponents that are added dynamically to
the page in LiveViewTest (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3653">#3653</a>)</li>
<li>Log an error in the JavaScript console when detecting a stream
container with missing <code>phx-update=&quot;stream&quot;</code>
attribute (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3645">#3645</a>)</li>
<li>Update documentation to mention <code>:fun</code> and <code>{:fun,
arity}</code> as valid attribute types for
<code>Phoenix.Component.attr/3</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3635">#3635</a>)</li>
<li>Update documentation to mention ways for <a
href="https://hexdocs.pm/phoenix_live_view/1.0.3/Phoenix.Component.html#module-dynamic-component-rendering">dynamically
rendering function components</a> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3632">#3632</a>)</li>
<li>Update documentation to mention <code>{:inner, selector}</code> and
<code>{:closest, selector}</code> as <a
href="https://hexdocs.pm/phoenix_live_view/1.0.3/Phoenix.LiveView.JS.html#module-dom-selectors">valid
options for <code>to</code></a> in JS commands (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3638">#3638</a>)</li>
</ul>
<h2>1.0.2 (2025-01-09)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Fix inconsistency between <code>mix format</code> and <code>mix
format --check-formatted</code> with new curly interpolation syntax (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3590">#3590</a>)</li>
<li>Fix unnecessary compile time dependencies when using
<code>attr</code> / <code>on_mount</code> / <code>live</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3592">#3592</a>)</li>
<li>Fix crash when testing LiveViews with embedded XML (e.g. SVGs) (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3594">#3594</a>)</li>
<li>Fix type warning when using <code>follow_redirect</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3581">#3581</a>)</li>
<li>Prevent <code>phx-trigger-action</code> from clashing with locked
forms (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3591">#3591</a>)</li>
<li>Fix form recovery sending wrong event name when using JS commands in
<code>phx-change</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3607">#3607</a>)</li>
</ul>
<h3>Enhancements</h3>
<ul>
<li>Deduplicate items on <code>stream/4</code> /
<code>steam_insert/4</code> (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3599">#3599</a>)</li>
<li>Restore scroll position on initial navigation (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3572">#3572</a>)</li>
<li>Change-track non existing keys in maps (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3584">#3584</a>)</li>
<li>Only warn instead of raising when detecting a duplicate ID in
LiveViewTest (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/pull/3603">#3603</a>)</li>
</ul>
<h2>1.0.1 (2024-12-13)</h2>
<h3>Bug fixes</h3>
<ul>
<li>Raise when duplicate DOM IDs are found when rendering a LiveView
during tests to avoid undefined behaviour</li>
<li>Fix live session verification causing logged errors, push_patch
failures, and failed mounts when a cold deploy occurs</li>
<li>Fix a bug where the <code>live_session</code>'s
<code>on_mount</code> hooks would be called for sticky live views on
connected mount. Now a <code>sticky</code> live view is consistently
marked as <code>:not_mounted_at_router</code></li>
</ul>
<h2>1.0.0 (2024-12-03) 🚀</h2>
<h2>1.0.0-rc.9 (2024-12-03)</h2>
<h3>Enhancements</h3>
<ul>
<li>Support <code>phx-no-curly-interpolation</code> to disable HEEx
curly interpolation in a specific tag body</li>
</ul>
<h2>1.0.0-rc.8 (2024-12-02)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8ea6b487de"><code>8ea6b48</code></a>
Release 1.0.3</li>
<li><a
href="e419029347"><code>e419029</code></a>
mix format</li>
<li><a
href="df82b86f4b"><code>df82b86</code></a>
small refactor of on_error tests</li>
<li><a
href="f1b9d2b492"><code>f1b9d2b</code></a>
only raise by default in later release</li>
<li><a
href="aee1b64972"><code>aee1b64</code></a>
update tests to not use deprecated struct update syntax</li>
<li><a
href="7a69ff77ec"><code>7a69ff7</code></a>
update changelog</li>
<li><a
href="6ca0b8b655"><code>6ca0b8b</code></a>
Update assets</li>
<li><a
href="f100c75de3"><code>f100c75</code></a>
fail early when hook element is not owned by view (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3618">#3618</a>)</li>
<li><a
href="a414c2cdd9"><code>a414c2c</code></a>
Update assets</li>
<li><a
href="07e4340c30"><code>07e4340</code></a>
remove replaceRootHistory (<a
href="https://redirect.github.com/phoenixframework/phoenix_live_view/issues/3625">#3625</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/phoenixframework/phoenix_live_view/compare/v1.0.0-rc.6...v1.0.3">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.0-rc.6&new-version=1.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>
Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-02-04 14:18:00 +00:00
dependabot[bot]
0a8730d797 build(deps): bump flowbite from 2.5.2 to 3.1.1 in /elixir/apps/web/assets (#7991)
Bumps [flowbite](https://github.com/themesberg/flowbite) from 2.5.2 to
3.1.1.
<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>v3.1.1</h2>
<ul>
<li>fixed CSS variables markup in plugin</li>
</ul>
<h2>v3.1.0</h2>
<ul>
<li>use CSS variables instead of hex codes in plugin</li>
<li>remove setting dark mode via class strategy in plugin</li>
</ul>
<h2>v3.0.0</h2>
<ul>
<li>upgrade to Tailwind v4</li>
<li>refactor and adapt the Flowbite plugin and UI components to the new
deprecated changes from Tailwind v4</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4ba07d7173"><code>4ba07d7</code></a>
push fixed 3.1.1</li>
<li><a
href="284eb580e3"><code>284eb58</code></a>
fix(plugin): css variables</li>
<li><a
href="e8d4ec7ba7"><code>e8d4ec7</code></a>
docs(README): update</li>
<li><a
href="19c48c69d6"><code>19c48c6</code></a>
chore(3.1.0): upgrade to 3.1.0 release</li>
<li><a
href="89bba922ca"><code>89bba92</code></a>
docs(v4): fix typo</li>
<li><a
href="bf10fed156"><code>bf10fed</code></a>
docs(optimization): update optimization file</li>
<li><a
href="05b270938a"><code>05b2709</code></a>
docs(config): finish config page docs</li>
<li><a
href="6698d47ee2"><code>6698d47</code></a>
docs(configuration): add custom utilities docs</li>
<li><a
href="1a437a3b9c"><code>1a437a3</code></a>
docs(configuration): update config settings for Tailwind v4</li>
<li><a
href="672a8153fd"><code>672a815</code></a>
refactor(dark mode): set dark mode via CSS</li>
<li>Additional commits viewable in <a
href="https://github.com/themesberg/flowbite/compare/v2.5.2...v3.1.1">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.5.2&new-version=3.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-02-01 16:23:26 +00:00
Brian Manifold
ad9c8a28e5 docs(portal): Update google directory sync docs (#7965)
Add docs related to Google directory sync around why there is a need for
a Google Workspace super admin when setting up directory sync.

---------

Signed-off-by: Brian Manifold <bmanifold@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2025-01-30 19:13:26 +00:00
Jamil
acfecc11ec feat(portal): Sort resources by name ASC by default (#7884)
Updates the Resource's pagination cursor such that the default cursor
(with no HTTP params applied) uses `{:resources, :asc, :name}` as the
default, which correctly updates all Resources live tables to sort by
`name`.

The reason this is updated at the Query layer is because I wanted to
achieve this without populating URL params by default, and still
allowing the sort icon to properly reflect the default sort order upon
page load, which it does.

My initial attempt went down the path of updating `assign_live_table/3`
to take a `default_order_by` option. That didn't work because upon page
load we `handle_params` which resets the ordering immediately based on
the URL params.

Rather than update the UI code to track even more state in order to use
`default_order_by` when the `order_by` param is not specified, I opted
to updated the Query module instead which the UI uses.

Fixes #7842
2025-01-27 17:38:19 +00:00
Jamil
24640cad34 test(portal): Update resource type/address (#7881)
While investigating the cause of #7879, I noticed we don't have tests
specifically for updating a Resource's type or address.

Related: #7879
2025-01-27 16:23:06 +00:00
Jamil
fa19bbf486 refactor(portal): Authorized Sessions -> Recent Connections (#7830)
We've gotten feedback recently that the expiration field causes
confusion among auditors who assume it has actual security relevance.

In reality, this is simply the maximum amount of time a connection
between Client and Gateway will stay alive for, and it has no relation
to "sessions" from a security perspective. As such, it's removed, and
the table renamed "Recent connections" to better name what these are.

The `expiration` column is also removed because this is not actionable
by the admin or end-user. In nearly all cases, the connection will have
been "expired" by some other means naturally, such as toggling Firezone
on/off or a policy or resource change. In other words, we do not rely on
this `expiration` field to enforce any security-related timeout.

Fixes #7712
2025-01-22 16:10:57 +00:00
Jamil
3f3a908bd2 chore(portal): Bump opentelemetry versions (#7794)
Dependabot is having issues figuring out the opentelemetry bumps due to
a [package pull](https://github.com/firezone/firezone/pull/7788), so
this PR aims to alleviate that as a one-off fix.

This bumps a few deps' major versions. Nothing jumped out at first
glance when I reviewed the changelogs, but I figured we'll have a better
idea when this goes out to staging since OTLP is basically disabled in
dev/test.
2025-01-17 01:34:12 +00:00
dependabot[bot]
3bb97c4513 build(deps): Bump floki from 0.36.3 to 0.37.0 in /elixir (#7787)
Bumps [floki](https://github.com/philss/floki) from 0.36.3 to 0.37.0.
<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.37.0</h2>
<h2>Added</h2>
<ul>
<li>Add <a
href="https://hexdocs.pm/floki/0.37.0/Floki.html#css_escape/1"><code>Floki.css_escape/1</code></a>
- thanks <a
href="https://github.com/SteffenDE"><code>@​SteffenDE</code></a>.</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Fix bug propagating identity encoder in <code>raw_html/2</code> -
thanks <a
href="https://github.com/andyleclair"><code>@​andyleclair</code></a>.</li>
</ul>
<h2>Removed</h2>
<ul>
<li>Remove support for Elixir 1.13 and OTP 22.</li>
</ul>
<h2>Pull requests</h2>
<ul>
<li>Drop support for Elixir 1.13 by <a
href="https://github.com/philss"><code>@​philss</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/595">philss/floki#595</a></li>
<li>Bump credo from 1.7.8 to 1.7.9 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/596">philss/floki#596</a></li>
<li>Bump credo from 1.7.9 to 1.7.10 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/597">philss/floki#597</a></li>
<li>Bump fast_html from 2.3.0 to 2.4.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/599">philss/floki#599</a></li>
<li>Bump dialyxir from 1.4.4 to 1.4.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/600">philss/floki#600</a></li>
<li>Bump ex_doc from 0.34.2 to 0.35.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/philss/floki/pull/602">philss/floki#602</a></li>
<li>Fix bug propagating identity encoder in <code>raw_html/2</code> by
<a href="https://github.com/andyleclair"><code>@​andyleclair</code></a>
in <a
href="https://redirect.github.com/philss/floki/pull/603">philss/floki#603</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/andyleclair"><code>@​andyleclair</code></a>
made their first contribution in <a
href="https://redirect.github.com/philss/floki/pull/603">philss/floki#603</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/philss/floki/compare/v0.36.3...v0.37.0">https://github.com/philss/floki/compare/v0.36.3...v0.37.0</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.37.0] - 2024-12-06</h2>
<h3>Added</h3>
<ul>
<li>Add <code>Floki.css_escape/1</code> - thanks <a
href="https://github.com/SteffenDE"><code>@​SteffenDE</code></a>.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix bug propagating identity encoder in <code>raw_html/2</code> -
thanks <a
href="https://github.com/andyleclair"><code>@​andyleclair</code></a>.</li>
</ul>
<h3>Removed</h3>
<ul>
<li>Remove support for Elixir 1.13 and OTP 22.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2c68b0f7f8"><code>2c68b0f</code></a>
Release v0.37.0</li>
<li><a
href="47000382e8"><code>4700038</code></a>
Fix bug propagating identity encoder in <code>raw_html/2</code> (<a
href="https://redirect.github.com/philss/floki/issues/603">#603</a>)</li>
<li><a
href="cabdd7a539"><code>cabdd7a</code></a>
Bump ex_doc from 0.34.2 to 0.35.1 (<a
href="https://redirect.github.com/philss/floki/issues/602">#602</a>)</li>
<li><a
href="eab60f1240"><code>eab60f1</code></a>
Bump dialyxir from 1.4.4 to 1.4.5 (<a
href="https://redirect.github.com/philss/floki/issues/600">#600</a>)</li>
<li><a
href="4eac58a02e"><code>4eac58a</code></a>
Bump fast_html from 2.3.0 to 2.4.0 (<a
href="https://redirect.github.com/philss/floki/issues/599">#599</a>)</li>
<li><a
href="576d356865"><code>576d356</code></a>
Bump credo from 1.7.9 to 1.7.10 (<a
href="https://redirect.github.com/philss/floki/issues/597">#597</a>)</li>
<li><a
href="f5845f936d"><code>f5845f9</code></a>
Bump credo from 1.7.8 to 1.7.9 (<a
href="https://redirect.github.com/philss/floki/issues/596">#596</a>)</li>
<li><a
href="96955f925d"><code>96955f9</code></a>
Add notes to changelog [ciskip]</li>
<li><a
href="17fd1d0b30"><code>17fd1d0</code></a>
Drop support for Elixir 1.13 (<a
href="https://redirect.github.com/philss/floki/issues/595">#595</a>)</li>
<li><a
href="ce33a5539e"><code>ce33a55</code></a>
Reapply &quot;add Floki.css_escape/1 (<a
href="https://redirect.github.com/philss/floki/issues/594">#594</a>)&quot;</li>
<li>See full diff in <a
href="https://github.com/philss/floki/compare/v0.36.3...v0.37.0">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.36.3&new-version=0.37.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-01-16 23:17:39 +00:00
Jamil
603a64435e chore(portal): use appropriate sha in dev (#7782)
Not a huge deal, but this doesn't actually need to be a valid SHA and
this is more clear / has no risk of collision with an actual git sha.
2025-01-16 22:58:12 +00:00
Jamil
53032fcbe1 fix(ci): Populate elixir vsn from env at build time (#7773)
Dependabot's workflow is set up in such a way it seems that it can't
find our `sha.exs` file.

This is a cleaner approach that doesn't rely on using external files for
the application version.

Interesting note: `mix compile` will happily use the cached `version`
even though it's computed from an env var, because `mix compile` uses
file hash and mtime to know when to recompile.

See https://github.com/firezone/firezone/network/updates/942719116
2025-01-16 22:26:22 +00:00
dependabot[bot]
cd2c3433d1 build(deps): Bump @fontsource/source-sans-3 from 5.1.0 to 5.1.1 in /elixir/apps/web/assets (#7623)
Bumps
[@fontsource/source-sans-3](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/source-sans-3)
from 5.1.0 to 5.1.1.
<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.1.0&new-version=5.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-01-01 19:10:42 +00:00
Brian Manifold
f114bc95cd refactor(portal): Add email as separate column on auth_identities table (#7472)
Why:

* Currently, when using the API, a user has no way of easily identifying
what identities they are pulling back as the response only includes the
`provider_identifier` which for most of our AuthProviders is an ID for
the IdP and not an email address. Along with that, when adding users to
an OIDC provider within Firezone, there is no check for whether or not
an identity has already been added with a given email address. By
creating a separate email column on the `auth_identities` table, it will
be very straight forward to know whether an email address exists for a
given identity, return it in an API response and allow the admin of a
Firezone account to track users (Identities) by email rather than IdP
identifier.

Fixes #7392
2024-12-13 17:26:47 +00:00
Brian Manifold
b66a156831 fix(portal): Set Floki dependency back to hex (#7387)
Found a small `TODO` while working on other things and figured I'd
quickly fix it.

Following these 2 github issues indicate the problem has been fixed:
https://github.com/philss/floki/issues/556
https://github.com/hexpm/hex/issues/1019
2024-11-21 02:06:37 +00:00
Brian Manifold
1ef286ac55 fix(portal): API clients 'show' page should always be in settings (#7371)
Why:

* The portal currently shows API clients in the Actors index list. Each
Actor in the list has a link to their own 'show' page. Prior to this
commit, selecting an API client from the list would result an error.
While API clients are technically an Actor, they aren't quite the same
as all other Actors because they are only used to configure the portal
for a given account. Because of this, they don't have the same
information to show as all other Actors. This commit sets the 'show' URL
for API clients to the 'settings' page to show the proper info for the
API client.

Fixes: #7370
2024-11-18 18:52:23 +00:00
Jamil
6f7f6a4f34 style: Enforce code style across all supported languages using Prettier (#7322)
This ensure that we run prettier across all supported filetypes to check
for any formatting / style inconsistencies. Previously, it was only run
for files in the website/ directory using a deprecated pre-commit
plugin.

The benefit to keeping this in our pre-commit config is that devs can
optionally run these checks locally with `pre-commit run --config
.github/pre-commit-config.yaml`.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-11-13 00:19:15 +00:00
Brian Manifold
06791d2d05 refactor(portal): API persistent IDs (#7182)
In order for the firezone terraform provider to work properly, the
Resources and Policies need to be able to be referenced by their
`persistent_id`, specifically in the portal API.
2024-11-07 20:45:56 +00:00
Andrew Dryga
a67c12de7e fix(portal): Polish link in peeks (#7180) 2024-10-29 19:22:20 -06:00
Andrew Dryga
f296dc5ad2 feat(portal): Show clients peek on actors index (#7100)
We will show up to 5 recently started client icons and a status for them
as a green dot badge (no dot when it's offline to keep things simple).
Additional details are available on hover.

<img width="1415" alt="1"
src="https://github.com/user-attachments/assets/1d48d08b-f024-4016-837a-3a2ac9a34718">
<img width="1413" alt="2"
src="https://github.com/user-attachments/assets/101ff122-26e2-4282-ae1d-073b4eba9c56">

I also extended the `Clients` table on "Actor" view page to match the
"Clients" index view.

Also closes #7096
2024-10-28 16:06:22 -06:00
Andrew Dryga
0452273a16 fix(portal): Change groups table column widths (#7089) 2024-10-18 13:29:08 -06:00
Andrew Dryga
5888aa0f49 fix(portal): Only show one icon next to client name and make it match the style of heroicons (#7085)
<img width="1376" alt="Screenshot 2024-10-17 at 2 05 35 PM"
src="https://github.com/user-attachments/assets/4d294e60-35c5-4ebf-b3cc-6bfdbf5230e3">
2024-10-17 16:00:36 -06:00
Andrew Dryga
268825d45b fix(portal): Fix table titles (#7080) 2024-10-16 16:27:09 -06:00
Andrew Dryga
37ef2cb591 feat(portal): Allow filtering clients by presence and deleting them (#7078)
Closes #7073

<img width="1434" alt="Screenshot 2024-10-16 at 12 40 50 PM"
src="https://github.com/user-attachments/assets/2c03f38c-c67e-49db-9453-e23651c8d61c">

<img width="1154" alt="Screenshot 2024-10-16 at 12 47 37 PM"
src="https://github.com/user-attachments/assets/da519458-1447-4dfe-9cef-536bf7760ce2">
2024-10-16 13:29:24 -06:00
Andrew Dryga
3c4db73946 feat(portal): Show client OS and version (#7039)
Closes #6157

<img width="1728" alt="Screenshot 2024-10-14 at 4 37 46 PM"
src="https://github.com/user-attachments/assets/5775f2cd-bf0b-43a3-b994-ad0fcfd24ccc">
<img width="1366" alt="Screenshot 2024-10-14 at 4 38 24 PM"
src="https://github.com/user-attachments/assets/3dc958a7-62d6-45d8-8258-2790c88c97d4">
2024-10-15 14:53:50 -06:00
Andrew Dryga
3567399efe fix(portal): Remove extra space before a link (#7040)
<img width="394" alt="Screenshot 2024-10-14 at 4 49 09 PM"
src="https://github.com/user-attachments/assets/1f1f3eba-96a5-49c6-b05b-d28439041a56">
2024-10-15 12:53:35 -06:00
Andrew Dryga
2ab70c2f27 feat(portal): Add flash asking people to deploy more than 1 gateway to a site (#7034)
This should help with showcasing core features of our product and to
increase their adoption.

Closes #5009
2024-10-14 15:50:19 -06:00
Andrew Dryga
7245652671 fix(portal): Make sure modals start with Confirm.. (#7032)
Closes #6713
2024-10-14 14:05:33 -06:00
Andrew Dryga
f89cc67fda fix(portal): Fix copy-paste buttons (#7033)
- Added semi-transparent shadow to the button so that it's more visible
when text is overlapping it. Padding did not look well because it
required scrollbar to be moved inside the parent container and it looked
very ugly
- Replaced custom phx hook with a new native Tailwind component

Closes #5973
2024-10-14 14:05:14 -06:00
Thomas Eizinger
05e895525b chore: set simpler default log filters (#7028)
Follow-up from #6985 to simplify our log filters everywhere. If any of
this doesn't fit, we should adjust the things here:


17ea827c03/rust/logging/src/lib.rs (L32-L40)
2024-10-14 18:54:36 +00:00
Andrew Dryga
1abfa10fb7 fix(portal): UX improvements (#7013)
This PR accumulates lots of small UX fixes from #6645.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2024-10-14 11:32:44 -06:00
Brian Manifold
7fda4c52c4 feat(portal): Add outdated gateway notifications (#6841)
Why:

* Without some type of notification, users do not realize that new
Gateway versions have been released and thus do not seem to be upgrading
their deployed Gateways.
2024-10-11 12:46:00 +00:00
Brian Manifold
4dde7293d5 fix(portal): Fix show page errors when entity was created by API (#7002)
Why:

* A handful of 'show' pages were throwing errors for entities created
using the API. The reason was due to the fact that the
`created_by_actor` was not being preloaded and when the details on the
show page were being rendered. This commit updates the various pages to
preload the `created_by_actor` to allow for both API created entities
and UI created entities.
2024-10-10 15:44:53 +00:00
Brian Manifold
928fab3878 fix(portal): Fix minor UI issues on API Clients show page (#6955)
- Updated revoke button colors and icons.
- Updated the 'Created By' to use a helper function to get an email
address rather than using the provider_identifier which may be a random
string depending on the type of provider the identity was created under.
- Added a link to the actor that created the API token

### Screenshot of updated view
<img width="1168" alt="Screenshot 2024-10-07 at 1 11 43 PM"
src="https://github.com/user-attachments/assets/80444815-f045-49db-b570-dc9dc58c33d2">

Closes #6269
2024-10-08 14:40:40 +00:00
Andrew Dryga
34f42cb761 feat(portal): Accept hardware identifier fields and reset verification when they are changed (#6914)
If previous value is **null then** a new value is persisted and
verification is **not removed**.
If previous value is **not null** then a new value is persisted and
verification is **removed**.

<img width="957" alt="Screenshot 2024-10-02 at 4 59 58 PM"
src="https://github.com/user-attachments/assets/302208ca-3693-40f7-a08a-4521b7c0df05">

---------

Signed-off-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-10-04 01:02:55 -06:00
dependabot[bot]
27469d17d7 build(deps): Bump flowbite from 2.5.1 to 2.5.2 in /elixir/apps/web/assets (#6885)
Bumps [flowbite](https://github.com/themesberg/flowbite) from 2.5.1 to
2.5.2.
<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.5.2</h2>
<ul>
<li>release new <a
href="https://flowbite.com/docs/plugins/wysiwyg/">WYSIWYG text
editor</a> component</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5c8df35e2b"><code>5c8df35</code></a>
docs(readme): add wysiwyg to readme</li>
<li><a
href="26cb313102"><code>26cb313</code></a>
Merge pull request <a
href="https://redirect.github.com/themesberg/flowbite/issues/971">#971</a>
from themesberg/wysiwyg</li>
<li><a
href="933b112fef"><code>933b112</code></a>
chore(wysiwyg) update to <code>v2.5.2</code></li>
<li><a
href="7aa2a6b366"><code>7aa2a6b</code></a>
feat(wysiwyg): finish the component</li>
<li><a
href="e799dc286e"><code>e799dc2</code></a>
feat(wysiwyg): add toggle buttons</li>
<li><a
href="30f5133ec3"><code>30f5133</code></a>
feat(wysiwyg): add next and prev cell navigation butoons</li>
<li><a
href="6e4cb24cf8"><code>6e4cb24</code></a>
feat(wysiwyg): set styles for currently selected cells</li>
<li><a
href="3d3261d3af"><code>3d3261d</code></a>
feat(wysiwyg): delete table feature and organise buttons</li>
<li><a
href="8270c05898"><code>8270c05</code></a>
feat(wysiwyg): add column and row behaviour actions</li>
<li><a
href="145f5617fb"><code>145f561</code></a>
docs(wysiwyg): write js behaviour docs</li>
<li>Additional commits viewable in <a
href="https://github.com/themesberg/flowbite/compare/v2.5.1...v2.5.2">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.5.1&new-version=2.5.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>
2024-10-02 18:08:53 +00:00
Andrew Dryga
14544b27cc feat(portal): Allow connection-time conditions for internet resources (#6899)
Closes #6848
2024-10-01 16:10:17 -06:00
Jamil
b298e79d06 fix(portal): Minor UI consistency fixes for resource/group select (#6860)
- [x] Spacing consistency
- [x] Border radius consistency
- [x] Minor grammar
- [x] Dismiss select when item is selected
- [x] Add shadow to stand out from rest of form
- [x] Prevent from opening when disabled
- [x] Use `cursor-not-allowed` when disabled for consistency with other
form elements


Before


<img width="670" alt="Screenshot 2024-09-27 at 5 01 38 PM"
src="https://github.com/user-attachments/assets/79e3a4c6-4d23-4edd-93b2-149acc58c37b">



After


<img width="677" alt="Screenshot 2024-09-27 at 5 11 48 PM"
src="https://github.com/user-attachments/assets/e1453c05-fed7-4d87-a176-6f6ce1267488">

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Andrew Dryga <a@firezone.dev>
2024-10-01 16:14:45 +00:00