Commit Graph

543 Commits

Author SHA1 Message Date
Thomas Eizinger
94527f9fa1 fix(gateway): always masquerade for docker-deployed gateways (#6169)
Without masquerading, packets sent by the gateway through the TUN
interface use the wrong source address (the TUN device's address)
instead of the gateway's actual network interface.

We set this env variable in all our uses of the gateway, thus we might
as well remove it and always perform unconditionally.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-07 03:00:50 +00:00
Brian Manifold
6ed5fa3c33 fix(portal): Temporarily revert verified routes for API UI (#6185)
This temporarily reverts commit
d1703d2849.

The long term fix will be to have the API URL be set by environment
variables, but in the interest of time it will be hardcoded for now.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-06 10:00:48 -07:00
Brian Manifold
023d05ece1 feat(portal): Add 'temp account' feature for launch HN (#6153)
Why:

* As part of our Launch HN, it was recommended to have a way to allow
people to try Firezone without needing to sign up. This commit adds the
changes need to create temporary accounts that are intended to be
deleted after the Launch HN is complete.

## Screenshots

#### Start Page
<img width="1459" alt="Screenshot 2024-08-02 at 11 00 15 AM"
src="https://github.com/user-attachments/assets/9b4c5dd4-52ee-43dc-8b4f-d3cc6389b698">

#### Temp Account Info Page
<img width="1461" alt="Screenshot 2024-08-02 at 11 00 28 AM"
src="https://github.com/user-attachments/assets/7e96360d-a878-4e63-b3f6-cca29d0bd79f">

#### Temp Account Sign In
<img width="1461" alt="Screenshot 2024-08-02 at 11 00 44 AM"
src="https://github.com/user-attachments/assets/f812e72a-7030-4b35-9ac3-3816a056ef55">

#### Bottom Banner
<img width="1462" alt="Screenshot 2024-08-02 at 11 01 02 AM"
src="https://github.com/user-attachments/assets/b5e9d90f-e888-46f1-9bb6-bcc59fe2c6e6">

#### Temp Account Identity Provider
<img width="1461" alt="Screenshot 2024-08-02 at 11 01 35 AM"
src="https://github.com/user-attachments/assets/79b3d7c4-fe3a-45a6-b4de-56d4f2c70f8e">
2024-08-05 15:45:22 +00:00
Jamil
83033d91ed fix(ux): Mention (Sites) on Gateway Groups section of REST API docs (#6161)
I'm thinking if we can just add `(Sites)` next the Gateway Groups title,
that will be enough for users to make the connection.
2024-08-02 19:50:30 +00:00
Jamil
d1703d2849 fix(portal): Use verified routes for OpenAPI docs (#6160)
Removes the hardcoded API link for an VerifiedRoutes version instead.
2024-08-02 19:40:10 +00:00
Jamil
c18d641991 fix(ux): Make all fields live-updated in clients/relays/gateways details pane (#6103)
Updates `Last connected` to `Last started` and makes sure the details
fields are reloaded when presence comes online.
2024-08-02 19:37:52 +00:00
Andrew Dryga
bf06534caf fix(portal): Prevent races during relay selection by only using the ones connected for more than 5 seconds ago (#6111)
Closes #6099
Should push #6109 to not being needed short term.
2024-08-02 11:10:40 -06:00
Andrew Dryga
63de0efb73 feat(portal): Time based policies (#6115)
Flows authorized by time-based policies will now expire at the latest
time permitted by the policy.
2024-08-02 01:49:44 -06:00
Andrew Dryga
8e1eb2429d fix(portal): Decrease WS timeouts for relays and gateways (#6112)
Related to #6095
2024-07-31 16:34:52 -06:00
Brian Manifold
3edbbfc8a2 fix(portal): Fix placement of 'sign-in w/ providers' heading (#6106)
Small UI/UX change. The 'Sign in with a configured provider' header was
always being shown, even if the account didn't have an OIDC provider
configured (i.e. all new accounts)

### Before
<img width="607" alt="Screenshot 2024-07-31 at 11 17 29 AM"
src="https://github.com/user-attachments/assets/e6d6d79d-509d-4d29-a051-7d836aa5b720">

### After
<img width="593" alt="Screenshot 2024-07-31 at 12 21 58 PM"
src="https://github.com/user-attachments/assets/db02979a-12b6-4620-b84c-0309931a6b52">

<img width="696" alt="Screenshot 2024-07-31 at 12 18 35 PM"
src="https://github.com/user-attachments/assets/db2b94b1-05e1-4f81-a2c5-e2befb19957e">
2024-07-31 16:42:40 +00:00
Brian Manifold
edc80129c8 feat(portal): Add REST API closed beta page (#6027)
Why:

* Before the REST API is release to all Firezone users a closed beta
program will be run. Rather than blurring out the API Clients page for
users that are not apart of the closed beta program, a 'beta' page will
be shown that will allow users to request access to the closed beta.
Once the REST API is released to all accounts, all of this can be
removed.

Closes: #5920 

### Screenshot
<img width="1445" alt="Screenshot 2024-07-24 at 6 55 36 PM"
src="https://github.com/user-attachments/assets/a09591bc-190c-4bd4-9716-9a74a0f09e0a">
2024-07-29 22:06:59 +00:00
Jamil
ff88bffc03 fix(ux): Trim whitespace from address before validation (#6061)
When a user copy-pastes an address into the `address` field that
contains a leading or trailing whitespace, it's not apparent why the
address is invalid. This is common when copy-pasting DNS names from
cloud consoles that have poor UIs, such as Azure.

Fixes #6059
2024-07-27 17:49:27 +00:00
Jamil
2b8ec89ec5 fix(ui): Center account name (#6053) 2024-07-25 13:23:52 -07:00
Jamil
6bed7ed4c1 fix(ux): Improve styling of sign in / sign up pages (#6036)
- Use consistently-sized titles and spacing for form sections
- Use larger and centered hero logo to match Welcome screen in client
apps
- If more than one action exists, use `style=info` instead of showing
multiple primary CTA buttons

Fixes #5730 
Fixes a regression that was originally fixed in #3390 
refs #5032 

## Before

<img width="1159" alt="Screenshot 2024-07-24 at 11 38 29 PM"
src="https://github.com/user-attachments/assets/a5261982-4975-4a8c-a30b-4d136a3b9b0f">
<img width="1159" alt="Screenshot 2024-07-24 at 11 38 21 PM"
src="https://github.com/user-attachments/assets/49a8d0c0-0753-4bfb-98db-c0654a3e4805">
<img width="1159" alt="Screenshot 2024-07-24 at 11 38 17 PM"
src="https://github.com/user-attachments/assets/9ef8f105-d3f6-4b36-8e9f-d05296c5b3e1">


## After

<img width="1159" alt="Screenshot 2024-07-24 at 11 32 19 PM"
src="https://github.com/user-attachments/assets/85535cdb-a2d2-4002-a742-8a99f24cd465">
<img width="1159" alt="Screenshot 2024-07-24 at 11 32 15 PM"
src="https://github.com/user-attachments/assets/3bf7bc55-fb8e-45c4-88aa-03a22f999426">
<img width="1159" alt="Screenshot 2024-07-24 at 11 32 10 PM"
src="https://github.com/user-attachments/assets/535de033-02ab-45c1-906e-180fdeabf03d">
2024-07-25 19:40:10 +00:00
Brian Manifold
97df661626 fix(api): add missing path parameter (#6039) (#6041)
Looks like I forgot one:

https://validator.swagger.io/validator/debug?url=https%3A%2F%2Fapi.firez.one%2Fopenapi

Co-authored-by: Antoine <antoinelabarussias@gmail.com>
2024-07-25 15:23:20 +00:00
Jamil
4839d8821c fix(ux): Make 'New' page title consistent (#6040)
Fixes a couple items missed from #5938
2024-07-25 08:03:03 -07:00
Jamil
881377cbe2 fix(ux): Redirect to policies/new after creating Resource (#5938)
Fixes a UX issue somewhat introduced by
https://github.com/firezone/firezone/pull/5870 where we changed behavior
to make the redirect consistent with other CRUD operations.

The behavior we had prior to
https://github.com/firezone/firezone/pull/5870 was to redirect to
Resource show, but feedback from customer (which makes sense) is that
you almost _always_ create a Policy after creating a Resource, so this
PR streamlines the hot path flow there.

This has occurred to a couple users in Discord as well, so by taking
them directly to policies/new it hopefully make clear the user needs to
create a Policy after creating a Resource.

This papercut occurred while customer was demo'ing Firezone to another
potential customer.

Fixes #5929 

cc @jameswinegar
2024-07-24 15:43:31 -07:00
Andrew Dryga
40748306ca fix(portal): Use modal for confirmation dialogs (#5833)
Still need to replace a few more `data-confirm` actions (have an issue
with HTML <dialog> positioning when it's defined inside Tailwind
tables.)

Closes https://github.com/firezone/firezone/issues/5794
Closes #5766
Closes #5887

---------

Signed-off-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-07-24 16:29:53 -06:00
Jamil
bfa410f7df docs: Make it more clear that synced users have User role (#5934)
Fixes #5906
2024-07-24 17:21:46 +00:00
Brian Manifold
bdc4d85afa fix(api): fix generated openapi spec (#6008)
(External contribution)

Hi, first thanks to @bmanifold for his awesome work! I've not yet tested
the API but here is a first PR fixing various small mistakes in the
generated openapi spec:

Schema names cannot contain spaces
Add missing path parameters in the spec
Remove duplicated endpoint for creating an identity (not sure about
that, I'll let you check)
If you want to validate the generated spec you can paste it here:
https://editor.swagger.io/ (or at the bottow of your swagger ui)

Please review commit by commit

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Antoine Labarussias <antoinelabarussias@gmail.com>
2024-07-24 15:59:15 +00:00
Jamil
b9af724944 fix(ux): Improve resource creation form and traffic filters (#5983)
- Adds `radio_button_group` to style radio buttons as big buttons
- Tweaks `inline_errors` so that `w-full` doesn't apply; this fixes the
input width from jumping when errors pop up
- Fixes #4979 
- Fixes #5239 


<img width="1616" alt="Screenshot 2024-07-23 at 5 45 12 PM"
src="https://github.com/user-attachments/assets/847c7a80-4cb6-4c4b-9095-1e7a08be479f">
2024-07-24 05:19:33 +00:00
Brian Manifold
2b93361719 refactor(portal): Temporarily remove time based policy conditions (#5981)
This PR temporarily removes the time based policy conditions. This is
only until #5861 is finished.

Closes #5979
2024-07-24 05:09:59 +00:00
Jamil
2f016a84d6 feat: add platform status link to 500 page (#5937)
Fixes #5933
2024-07-24 04:52:56 +00:00
Jamil
cf7ee18fb7 fix(portal): fix removeEventListener function call (#5942)
<img width="809" alt="Screenshot 2024-07-21 at 10 39 37 PM"
src="https://github.com/user-attachments/assets/43238940-22a6-459c-8bb6-a173352af31e">
2024-07-23 14:13:21 +00:00
Jamil
6ae494904e docs: Update 'user guides' -> 'client apps' (#5940)
- This terminology / naming makes things more clear for most
admins/users.
- Fixes layout of /kb/client-apps to align better

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-07-23 14:04:07 +00:00
Jamil
286ca77725 fix(ux): Rename Magic Link to Email (OTP) (#5939)
Fixes #5927 

See https://www.firezone.dev/kb/authenticate/email


<img width="1258" alt="Screenshot 2024-07-21 at 11 29 59 AM"
src="https://github.com/user-attachments/assets/07d5596f-b74c-4bc7-91df-3565ae552f15">
2024-07-22 02:42:58 +00:00
Brian Manifold
79c815fbbc feat(portal): Add REST API (#5579)
Why:

* In order to manage a large number of Firezone Sites, Resources,
Policies, etc... a REST API is needed as clicking through the UI is too
time consuming, as well as prone to error. By providing a REST API
Firezone customers will be able to manage things within their Firezone
accounts with code.
2024-07-20 04:20:43 +00:00
Jamil
f0b4ce45a2 fix(portal): Disable submit button for synchronous forms upon submit (#5882)
https://github.com/user-attachments/assets/3b7153c5-4c08-470b-9258-fadc08a12be8


The `cursor-wait` graphic is corrupted due to a Quicktime recording bug,
but it's working live.

Fixes #5881
2024-07-18 18:19:20 +00:00
Jamil
0e2a13148f fix(portal): redirect back to resources / sites after edit (#5870)
- Updates `new` and `edit` flows to redirect back to sites or resources
after save
- Adds flash message pertaining to the above

Fixes #5776
2024-07-16 16:10:21 +00:00
Jamil
2c1e6f12ef fix(portal): Restrict creating Resources with addresses in our reserved ranges (#5844)
In the Clients, we need to prioritize DNS Resource traffic before CIDR
traffic in order to ensure DNS resources take priority over full-route
ones.

Because of this, any CIDR Resources defined within our reserved DNS
range will never be routable. This PR updates the portal validations to
reflect that.

refs #5840 
refs #2667
2024-07-12 03:57:50 +00:00
Jamil
f6b6055f65 fix(website): use 256x256 icon size (#5838) 2024-07-10 19:39:33 -07:00
Jamil
a91d49b1ff fix: update favicon with bg and border (#5826)
Fixes #5822
2024-07-10 18:55:14 +00:00
Jamil
6003f2b424 fix(portal): Clarify label (#5774)
Label isn't quite accurate
2024-07-07 23:02:04 +00:00
Andrew Dryga
8e4e7253e0 chore(portal): Split domains and set separate CAAs records (#5434) 2024-07-06 09:19:38 -07:00
Jamil
c3e6ab02e6 fix(portal): hover state titles (#5715)
Fixes #5236 
Fixes #5243 
Fixes #5240 
Fixes #5234
2024-07-04 18:11:07 +00:00
Jamil
ad1e4e188f fix(portal): add @class to input and use disabled cursor (#5713)
Fixes #5238
2024-07-04 16:37:49 +00:00
Jamil
140a2979da refactor(portal): Use popover with UTC timestamp for datetime fields (#5712)
Fixes #5249 to allow copy-pasting the timestamp
Fixes #5635 by virtue of using a relative datetime there.
Fixes #5225 

<img width="579" alt="Screenshot 2024-07-03 at 10 58 11 PM"
src="https://github.com/firezone/firezone/assets/167144/261a5f58-ab9c-40b3-a26f-3adcff228aa9">
2024-07-04 16:37:33 +00:00
Andrew Dryga
c9a9c1864a fix(portal): Update client identity on every connection (#5697)
This identity must track the last sign in method used by the client

Closes #5633
2024-07-03 13:17:06 -06:00
Jamil
c0f98ea896 fix(portal): bump auth constant time to 2s (#5668)
Fixes
https://console.cloud.google.com/monitoring/alerting/incidents/0.nes28ktmvdk8?channelType=slack&project=firezone-prod

```
elapsed_time: 1300
```
2024-07-02 21:40:44 +00:00
Jamil
1edc827bca feat(portal): enable welcome email sending on manually provisionned o… (#5679)
…idc users (#5127)

Currently we can only send a welcome email to oidc users who have
already logged in once. For manually provisionned oidc users, we can't.
This PR aims to solve this issue

---------

Co-authored-by: Antoine <antoinelabarussias@gmail.com>
2024-07-02 19:59:23 +00:00
Jamil
33dff8af96 docs: Add more Gateway deploy examples (#5646)
- ~~Adds `fontawesome` icons to the portal and integrates them into the
existing `icon` component. Use just like the heroicons except prefixed
`fa-`.~~ Edit: removed these because I don't think it's worth the
increased bundle size. Just going to inline the icons we need instead.
- Fixes #3041
- Fixes #5072
2024-07-02 19:59:04 +00:00
dependabot[bot]
e046987a69 build(deps): Bump flowbite from 2.3.0 to 2.4.1 in /elixir/apps/web/assets (#5653)
Bumps [flowbite](https://github.com/themesberg/flowbite) from 2.3.0 to
2.4.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>v2.4.1</h2>
<ul>
<li>fix datepicker module declaration naming for TypeScript</li>
</ul>
<h2>v2.4.0</h2>
<ul>
<li>the datepicker is now a core component of Flowbite and has API
methods, events, and options</li>
<li>updated the documentation for the datepicker component and related
integration guides</li>
<li>minor visual bug fixes and improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8c8d65e489"><code>8c8d65e</code></a>
fix(typescript): datepicker naming and version bump to v2.4.1</li>
<li><a
href="2a8c18eed9"><code>2a8c18e</code></a>
Merge branch 'datepicker-instance'</li>
<li><a
href="6b160cc82d"><code>6b160cc</code></a>
chore(version): bump to v2.4.0</li>
<li><a
href="e9b8ae3715"><code>e9b8ae3</code></a>
Merge pull request <a
href="https://redirect.github.com/themesberg/flowbite/issues/907">#907</a>
from themesberg/datepicker-instance</li>
<li><a
href="1d76b8ffc1"><code>1d76b8f</code></a>
docs(changelog): add changelog</li>
<li><a
href="213577a394"><code>213577a</code></a>
docs(datepicker): update Phoenix and Rails docs for new datepicker
update</li>
<li><a
href="6a16510f28"><code>6a16510</code></a>
docs(datepicker): fix TypeScript example from docs</li>
<li><a
href="1e0d112435"><code>1e0d112</code></a>
fix(typescript): fix fucking typescript config for cross npm
declarations</li>
<li><a
href="6d1fbf3285"><code>6d1fbf3</code></a>
docs(nuxt): update Nuxt docs for Flowbite via composables</li>
<li><a
href="36eeab7fb9"><code>36eeab7</code></a>
docs(datepicker): update import statements for parent plugin</li>
<li>Additional commits viewable in <a
href="https://github.com/themesberg/flowbite/compare/v2.3.0...v2.4.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.3.0&new-version=2.4.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>
2024-07-01 22:35:32 +00:00
Jamil
eaf981597b fix(gateway): Add default RUST_LOG level to Docker-deployed Gateways (#5639)
This has been an issue for some time(!)

Fixes #5141
2024-06-30 00:41:19 +00:00
Andrew Dryga
cfe777f389 fix(portal): Do not crash WebSocket when client version is invalid (#5525) 2024-06-26 18:50:43 -06:00
Andrew
a5a60d253e Bump constant time for welcome emails 2024-06-26 12:54:17 -06:00
Andrew
ccf18cb9ad Add ops script to provision account users 2024-06-26 12:46:32 -06:00
Andrew Dryga
66e0ee17e6 fix(portal): Prevent double-subscribing to various presence events (#5554)
Closes #5531
2024-06-25 19:36:27 -06:00
Andrew Dryga
40d7889dd1 fix(portal): Adopt LiveView 1.0 breaking changes (#5549)
Closes https://github.com/firezone/firezone/issues/5545
2024-06-25 13:30:46 -06:00
Jamil
a0bfe9070c fix(portal): fix search box width (#5518)
I was taking screenshots and needed to fix this text.

## before
<img width="257" alt="Screenshot 2024-06-24 at 1 00 07 PM"
src="https://github.com/firezone/firezone/assets/167144/a6ed1603-2f77-4469-abfa-4b8c17d09863">

## after

<img width="274" alt="Screenshot 2024-06-24 at 12 59 55 PM"
src="https://github.com/firezone/firezone/assets/167144/95fbafc6-085c-45ad-9f7a-f5a2c9b57430">
2024-06-24 20:22:28 +00:00
Andrew Dryga
52d1b07a2a chore(portal): Bump Alpine to 3.20, Erlang/OTP to 27 and Elixir to 1.17 (#5349)
Two blocking issues:
-
57470a1229
to be released (its used by WorkOS package; I think in future we should
contribute to them replacing that with Finch or Req);
- https://github.com/elixir-cldr/cldr_calendars/issues/19
2024-06-24 12:27:19 -06:00