Commit Graph

201 Commits

Author SHA1 Message Date
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
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
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
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
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
Andrew Dryga
14544b27cc feat(portal): Allow connection-time conditions for internet resources (#6899)
Closes #6848
2024-10-01 16:10:17 -06:00
Andrew Dryga
c2b8633914 feat(portal): Allow searching for resources and groups while creating and editing policies (#6840)
Closes #4186

Video: 

![demo](https://github.com/user-attachments/assets/c11870f5-b512-4ee1-8c48-ab292f1ff8ea)
2024-09-27 13:54:42 -06:00
Andrew Dryga
3652839b1a feat(portal): Allow updating policies and resources (#6690)
Now you can "edit" any fields on the policy, when one of fields that
govern the access is changed (resource, actor group or conditions) a new
policy will be created and an old one is deleted. This will be
broadcasted to the clients right away to minimize downtime. New policy
will have it's own flows to prevent confusion while auditing. To make
experience better for external systems we added `persistent_id` that
will be the same across all versions of a given policy.

Resources work in a similar fashion but when they are replaced we will
also replace all corresponding policies.

An additional nice effect of this approach is that we also got
configuration audit log for resources and policies.

Fixes #2504
2024-09-18 13:06:05 -06:00
Jamil
06e9be62f5 fix(ci): Wait for Sign out link to appear in Elixir acceptance test (#6753)
Maybe this will fix?


https://github.com/firezone/firezone/actions/runs/10923163418/job/30319126211?pr=6750
2024-09-18 10:02:48 -06:00
Brian Manifold
716623a993 feat(portal): Add IDP sync error email notifications (#6483)
This adds a feature that will email all admins in a Firezone Account
when sync errors occur with their Identity Provider.

In order to avoid spamming admins with sync error emails, the error
emails are only sent once every 24 hours. One exception to that is when
there is a successful sync the `sync_error_emailed_at` field is reset,
which means in theory if an identity provider was flip flopping between
successful and unsuccessful syncs the admins would be emailed more than
once in a 24 hours period.

### Sample Email Message
<img width="589" alt="idp-sync-error-message"
src="https://github.com/user-attachments/assets/d7128c7c-c10d-4d02-8283-059e2f1f5db5">
2024-09-18 15:29:50 +00:00
Andrew Dryga
6c811796f7 fix(portal): Do not save new condition with an empty value and handle it properly if it's saved like that (#6624) 2024-09-06 10:43:21 -07:00
Andrew Dryga
da81fb7f41 feat(portal): Allow client verification and add a policy condition to enforce it (#6604)
<img width="1414" alt="Screenshot 2024-09-05 at 1 17 08 PM"
src="https://github.com/user-attachments/assets/f50816e5-1e16-413c-be35-15ef9153a95d">
<img width="1404" alt="Screenshot 2024-09-05 at 1 17 13 PM"
src="https://github.com/user-attachments/assets/a5e055d0-321d-417e-9fd8-78e9643498cd">
<img width="1178" alt="Screenshot 2024-09-05 at 1 17 23 PM"
src="https://github.com/user-attachments/assets/6ea45486-98fb-495f-96d9-a96eb01925dd">
<img width="678" alt="Screenshot 2024-09-05 at 1 17 31 PM"
src="https://github.com/user-attachments/assets/45b4e798-d1b8-4574-97b3-a41dec1619fd">
<img width="632" alt="Screenshot 2024-09-05 at 1 17 46 PM"
src="https://github.com/user-attachments/assets/3c7c02e0-fc78-442e-86d3-fa711c9bb77c">
2024-09-05 14:35:38 -07:00
Andrew Dryga
4e08e69c84 fix(portal): Reset the rate limit when user signed in (#6582) 2024-09-04 04:42:08 +00:00
Jamil
5acea60dc6 fix(portal): Fix flash width and hero logo on auth pages (#6482)
# Before

<img width="1131" alt="Screenshot 2024-08-29 at 8 54 21 AM"
src="https://github.com/user-attachments/assets/65aadaaa-dc92-4b2d-8fd4-a8ec776bc697">
<img width="3120" alt="Screenshot 2024-08-29 at 9 00 38 AM"
src="https://github.com/user-attachments/assets/aa9846dc-9a01-4282-b9eb-539b38e7f67d">

<img width="702" alt="Screenshot 2024-08-29 at 9 03 26 AM"
src="https://github.com/user-attachments/assets/39e30430-ed0a-46c6-84a1-f4edecacbdb3">


# After

<img width="1100" alt="Screenshot 2024-08-29 at 8 54 30 AM"
src="https://github.com/user-attachments/assets/9b5ee17a-e95f-4195-8439-f94298d6ecf9">
<img width="3120" alt="Screenshot 2024-08-29 at 9 00 54 AM"
src="https://github.com/user-attachments/assets/be962785-684f-4de1-bf60-31e3567440ca">
<img width="621" alt="Screenshot 2024-08-29 at 9 09 54 AM"
src="https://github.com/user-attachments/assets/33b6d501-b5ad-494d-8c75-faf6bf63068f">
<img width="572" alt="Screenshot 2024-08-29 at 9 14 52 AM"
src="https://github.com/user-attachments/assets/c72cfc5a-8824-49e2-9ba2-984ebd490251">
2024-08-30 16:01:22 +00:00
Andrew Dryga
2a808292d0 feat(portal): Add blocked_tx_bytes to flow activity metrics (#6487)
Closes #4787
2024-08-29 14:21:51 -06:00
Andrew Dryga
3139651db4 feat(portal): Create default site for new accounts (#6488)
Closes #5012
2024-08-29 14:21:39 -06:00
Andrew Dryga
572c5671d0 feat(portal): Use Service Accounts to sync Google Workspace directory (#6390)
We will need to update the docs for the website, some screens to show
where the settings are:
<img width="1728" alt="Screenshot 2024-08-19 at 1 04 23 PM"
src="https://github.com/user-attachments/assets/88ebb06f-241d-44c8-90fa-258d0b78905e">
<img width="1436" alt="Screenshot 2024-08-19 at 1 04 02 PM"
src="https://github.com/user-attachments/assets/5f7a1011-5a53-4348-81cb-da804ee18bed">

Related [#5959](https://github.com/firezone/firezone/issues/5959)

---------

Signed-off-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-29 13:30:34 -06:00
Andrew Dryga
4973ac9d4c fix(portal): Replace missed data-confirms with modals (#6485)
Closes #6147
2024-08-29 13:28:55 -06:00
Andrew Dryga
835fc4c8eb chore(portal): Bump all deps related to portal (#6445) 2024-08-28 10:40:02 -06:00
Andrew Dryga
a5342256c3 feat(portal): Allow bulk-deleting synced actors (#6352)
Closes #6301
Closes #6217

<img width="1728" alt="Screenshot 2024-08-19 at 12 19 16 PM"
src="https://github.com/user-attachments/assets/0c1b570d-9ea9-413a-a8b5-febcd6d37072">
2024-08-20 13:05:19 -06:00
Brian Manifold
4e9bd7334a fix(portal): Fix Resource show error on API created Resource (#6284)
Viewing a Resource created by an API client was crashing the view due to
the function creating the link to the actor not accounting for the API
client case.

Closes #6267
2024-08-13 22:07:00 +00:00
Andrew Dryga
13c23d3b78 fix(portal): Do not fail when email identity is not found (#6187)
We were generating fake tokens when identity was not found but those had
empty ids so the code crashed. Now we fake the entire token and make
sure it's length is stable.
2024-08-07 10:25:08 -06: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
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
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
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
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
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
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
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
c3e6ab02e6 fix(portal): hover state titles (#5715)
Fixes #5236 
Fixes #5243 
Fixes #5240 
Fixes #5234
2024-07-04 18:11:07 +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
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
Andrew Dryga
ecf3944848 fix(portal): Rate limit outbount emails (#5455) 2024-06-19 20:23:37 -06:00
Andrew Dryga
37f078c379 fix(portal): Verify email in constant time and sign it's value to prevent text injection (#5418)
You still can generate a link that will inject a text as long as it has
`@` in it - there is no good ways to validate emails other than just
check for that. The only *reliable* ways to fix that is to either remove
that text (making users more confused) or only show it if identity was
found (leaking the fact of it's existence).
2024-06-18 13:42:52 -06:00
Jamil
e2d5ae5cac fix(portal): Fix nil error for address_description (#5346)
We try to parse `address_description` as a link on the resources/show
page, but it can be nil.
2024-06-12 18:54:48 -07:00
Jamil
fd3d66293c feat(portal): Enable address_description field to provide hint for accessing Resources in Clients (#5273)
Fixes #5270 

- Relaxes the `NOT NULL` constraint because in Clients we already
account for empty address descriptions (by showing the address in its
place if missing). We may want to simply hide the Resource altogether if
the description is missing (based on user feedback). With a blank field,
we can differentiate between not entered vs entered an address.
- Updates help text a bit

```[tasklist]
- [x] Update docs with examples
```

<img width="772" alt="Screenshot 2024-06-06 at 12 01 48 PM"
src="https://github.com/firezone/firezone/assets/167144/523aa0ff-f30d-44cb-bb3c-5d5cda7236e6">

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-06-12 16:21:56 +00:00
Jamil
77d979e67b fix(portal): fix email sent flash when using oidc (#5128) (#5267)
For oidc users, `provider_identifier` is an id and not the email of the
user.

Contributed by @Intuinewin

---------

Co-authored-by: Antoine <antoinelabarussias@gmail.com>
2024-06-12 16:21:30 +00:00
Brian Manifold
26d8f7eab3 feat(portal): Add WorkOS/JumpCloud integration (#5269)
Why:

* JumpCloud directory sync was requested from customers. JumpCloud only
offers the ability to use it's API with an admin level access token that
is tied to a specific user within a given JumpCloud account. This would
require Firezone customers to give an access token with much more
permissions that needed for our directory sync. To avoid this, we've
decide to use WorkOS to provide SCIM support between JumpCloud and
WorkOS, which will allow Firezone to then easily and safely retrieve
JumpCloud directory info from WorkOS.

---------

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-06-12 15:45:33 +00:00
Jamil
2e436f7f77 chore(portal): Fix policy creation for conditions disabled; tweak design (#5301)
- Fixes policy creation when `policy_conditions` is disabled
- Updates design so that items are a little more aligned and text has
more / consistent spacing around.



https://github.com/firezone/firezone/assets/167144/b9c29110-ae1c-4841-b999-a0da022f4a38



Test is failing though. Before sinking more time into this I wanted to
open this PR to get @AndrewDryga's input.
2024-06-11 11:41:06 -07:00
Andrew Dryga
650d7d7998 feat(portal): Add Policy conditions (#5144)
Now policies can have additional conditions based on Client location
(country or IP range), IdP provider used for sign in or the current time
of the day at a given timezone. This covers use cases where employees
can access the production system only from certain countries (states can
be added later) or when contractors can only access internal tools
during working hours.

Closes https://github.com/firezone/firezone/issues/4743
Closes #4742
Closes #4741
Closes #4740


<img width="1728" alt="Screenshot 2024-05-31 at 13 50 53"
src="https://github.com/firezone/firezone/assets/1877644/55f509f2-0f49-4edb-8c03-7a5a6d884ccc">
<img width="1728" alt="Screenshot 2024-05-31 at 13 50 56"
src="https://github.com/firezone/firezone/assets/1877644/756bb03f-4024-4978-ac85-6daa918ae037">
<img width="1728" alt="Screenshot 2024-05-31 at 13 51 01"
src="https://github.com/firezone/firezone/assets/1877644/cf159a86-077f-4ada-9952-9e8d399d0dc1">
<img width="1728" alt="Screenshot 2024-05-31 at 13 51 03"
src="https://github.com/firezone/firezone/assets/1877644/c070719e-2d4b-41bd-ad03-430baf2dbe9b">
<img width="676" alt="Screenshot 2024-05-31 at 14 56 06"
src="https://github.com/firezone/firezone/assets/1877644/435a4951-479d-4371-99c4-29a055348175">
2024-06-09 12:46:35 -06:00
Jamil
c26869cf34 fix(ux): Use icon sizes consistent with text size (#5256)
Fixes #5229 

<img width="303" alt="Screenshot 2024-06-05 at 9 54 29 AM"
src="https://github.com/firezone/firezone/assets/167144/b234ba01-b0e2-4d6b-ab49-48f90933f4de">
<img width="282" alt="Screenshot 2024-06-05 at 9 54 24 AM"
src="https://github.com/firezone/firezone/assets/167144/126b35d6-ba39-45a0-b828-48ea50f450f5">
2024-06-06 13:12:15 +00:00