Commit Graph

136 Commits

Author SHA1 Message Date
Brian Manifold
e5af828982 fix(portal): Add page_title to all portal pages (#3154)
Why:

* When navigating around the portal, the title in the browser tab would
      not show the accurate title of the current page.  This commit adds
      `page_title` to all pages.  The value of the page title has been
      choosen to correspond with the portal's left hand nav menu.


Additional:
* Along with the page titles, the `vertical_table` component was updated
to make the left hand headers use a class of `w-1/5` for consistency
across pages and to move the info a little further left on each page to
try and align it closer with other info on the page.

Here's an example of before and after:

<img width="1060" alt="before"
src="https://github.com/firezone/firezone/assets/2646332/6c56b550-98a5-4331-b1d3-c65ed9e24330">

<img width="1058" alt="after"
src="https://github.com/firezone/firezone/assets/2646332/c4753fee-ddea-4c67-9d5e-5b924260ea20">
2024-01-11 06:14:34 +00:00
Andrew Dryga
396f2ef584 Redirect to deep link when user is already signed in (#3156)
Closes #2032
2024-01-10 19:52:03 +00:00
Andrew Dryga
ce932ffd90 fix(portal): Remove token provider and implement separate flow for service accounts (#3146)
Closes #2501
2024-01-10 10:33:10 -06:00
Jamil
6c8e44b3de fix(gateway): Fix masquerading iptables command (#3151) 2024-01-09 21:17:24 -08:00
Jamil
2a2cfd93f0 fix(gateway): Use sudo to write files (#3143)
Found a couple small issues with the systemd gateway when copy-pasting
onto my rpi not as a root user.
2024-01-09 13:07:17 -08:00
Andrew Dryga
ed5437c881 security(portal): Rework auth tokens (#2696)
- [x] make sure that session cookie for client is stored separately from
session cookie for the portal (will close #2647 and #2032)
- [x] #2622
- [ ] #2501
- [ ] show identity tokens and allow rotating/deleting them (#2138)
- [ ] #2042
- [ ] use Tokens context for Relays and Gateways to remove duplication
- [x] #2823
- [ ] Expire LiveView sockets when subject is expired
- [ ] Service Accounts UI is ambiguous now because of token identity and
actual token shown
- [ ] Limit subject permissions based on token type

Closes #2924. Now we extend the lifetime for client tokens, but not for
browsers.
2024-01-09 13:36:21 -06:00
Jamil
bc93762c16 fix(gateway): Fix systemd gateways on SELinux-enabled distros and improve systemd gateway UX (#3127)
- Fix permissions and caps on each start
- Fixes incompatibility with some systemd versions that barf at the
inline `ExecStartPre`
- Fixes erroneous error printed by iptables
- Fixes masquerading not working for wireless interfaces
- Single-step systemd copy-paste command
- Fixes #2944 
- Fixes #3124 
- Fixes #3112 


Tested on CentOS 7 and Ubuntu 22.04
2024-01-08 17:56:54 +00:00
Brian Manifold
c02e7ed332 fix(portal): Update portal font to source sans 3 (#3106)
Why:

* The previous font being used in the portal (Source Sans Pro) did not
have multiple weights available, which meant that the `font-*` classes
      on all html tags were not being used.  Switching to Source Sans 3
allows all but 1 (`font-thin` or `100` is not present) of the Tailwind
      font sizes to be used.

Closes #2893
2024-01-08 17:56:43 +00:00
Jamil
408961917e fix(portal): Add help text for DNS resources (#3130)
Clarifies confusion I'm seeing on demos and will suffice until we have
in-depth docs.
2024-01-06 05:04:15 +00:00
Jamil
7b26aed586 fix(portal): Add plan badge to edit Site (#3129)
Fixes #3125
2024-01-05 19:42:22 +00:00
Jamil
859c6c1f59 Add more in-portal documentation and empty table state context (#2984)
Refs
https://github.com/firezone/firezone/pull/2979#discussion_r1434273368

Fixes #2597
2024-01-02 19:54:48 +00:00
Jamil
05774a39fc fix(portal): Improve OIDC usability and fix unexpected Mint.TransportError causing crash (#3049)
Fixes #3044

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Brian Manifold <bmanifold@users.noreply.github.com>
2024-01-02 19:18:48 +00:00
Jamil
2a9d48fd0a fix(gateway): Fallback to get_hostname() for systemd deployments (#3029)
Fixes #3025
2024-01-02 19:01:57 +00:00
Brian Manifold
479e2c9036 Add ability to email new user after creation (#2957)
Why:

* When a new user and/or identity is created using the Email provider,
there is currently no way to notify the new user/identity automatically.
With this commit an email will now be sent to the newly added
user/identity upon successful creation. This will only be done for
identities created with the 'Email' provider.


<img width="621" alt="new_user_email"
src="https://github.com/firezone/firezone/assets/2646332/2e50baf0-34cf-4615-b7f9-30500aa58920">

---------

Signed-off-by: Brian Manifold <bmanifold@users.noreply.github.com>
Co-authored-by: Andrew Dryga <andrew@dryga.com>
2023-12-21 18:36:08 +00:00
Jamil
34ab093dbc security(gateway): Don't run systemd gateways as root (#2943)
Docker-based gateways won't have working IPv6 (good point @AndrewDryga),
so I started testing the systemd gateways more and found some issues I
fixed.

* Update default tab order for Deploy gateways page to prefer systemd
* Update unit file to run gateway as unprivileged user
* Remove dependency on `wget` in unit file
* Fix iptables logic so rules as re-created on reboot
* Use `/var/lib/firezone` instead of `/etc/firezone` for writing runtime
files (`/etc/` is often mounted read-only on hardened systems)

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Andrew Dryga <andrew@dryga.com>
2023-12-21 18:29:10 +00:00
Jamil
d3f45b5285 Rename Authorizations -> Activity (#2979)
Authorizations creates confusion with Authentication. What this is
referring to most closely resembles "Network Activity", so renaming to
Activity.

Fixes
https://firezonehq.slack.com/archives/C04HRQTFY0Z/p1703141913585009?thread_ts=1703105862.234659&cid=C04HRQTFY0Z

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Andrew Dryga <andrew@dryga.com>
2023-12-21 18:25:35 +00:00
Jamil
0c25ad57cb Add link to status on website (#2974)
Fixes #2953
2023-12-20 22:56:40 +00:00
Andrew Dryga
ded5feee9e Fix user-reported errors (#2954) 2023-12-18 16:15:49 -06:00
bmanifold
751df8b3f3 Update styling for Sign In/Up emails (#2907)
Updated the styling for the outbound emails from the portal.

## Preview of the Sign Up Email
<img width="589" alt="sign_up_email"
src="https://github.com/firezone/firezone/assets/2646332/4fdc04de-bc49-4d31-b818-ec5eb546d4b8">

## Preview of the Sign In Email
<img width="592" alt="sign_in_email"
src="https://github.com/firezone/firezone/assets/2646332/c3a21424-0de2-404a-a8e2-f2ae926ddeaf">

This will close #2132
2023-12-15 17:04:13 +00:00
Jamil
de71e7060f Reduce webrtc log level to error (#2911) 2023-12-15 01:07:48 +00:00
Jamil
de0a0b911b Use more informative log filepath (#2910)
* Sort clients list by `last_seen_at` desc. This handles the `online?`
case too. Before, they were sorted by `asc` which made it hard to see
which recent clients were connected
* Scope the client log filename by account slug and actor name so it's
easier to find.
2023-12-14 19:45:50 +00:00
Andrew Dryga
82c013a1eb Replace eth+ with e+ in the unitfile 2023-12-13 15:19:31 -06:00
Andrew Dryga
af7730337c Fix service account tokens and unifile deployment scripts (#2900) 2023-12-13 14:45:59 -06:00
Jamil
33bcbbee45 Add a detailed Google Workspace setup guide and other docs (#2876)
- Added google workspace docs at `/kb/authenticate/google`
- Updated in-product Provider creation form with more details and a link
to docs
- Fixed bg-color for unauthenticated layouts

---------

Co-authored-by: Brian Manifold <bmanifold@gmail.com>
2023-12-13 07:16:11 +00:00
Andrew Dryga
52b284abd9 Terraform improvements for production (#2873) 2023-12-11 19:41:01 -06:00
Jamil
ba44b2cbad Usability iteration 1 (#2869)
* Fix numerous typos and grammar
* Align all next/continue action buttons to the right side of the form
* Rework the Gateway deploy page to be more readable and use consistent
colors
* Link to `Troubleshooting` guide for gateway deployments
* Add spacing between `:sections` so they stand out more
* Move help paragraphs into `:help`s
* Make links consistent to `text-accent-500` to match website/docs
(buttons unchanged)
* Add `warning` style button

More to come in further PRs

---------

Co-authored-by: Brian Manifold <bmanifold@gmail.com>
2023-12-11 21:12:53 +00:00
Gabi
8e34457340 Add support for DNS sudomains (#2735)
This PR changes the protocol and adds support for DNS subdomains, now
when a DNS resource is added all its subdomains are automatically
tunneled too. Later we will add support for `*.domain` or `?.domain` but
currently there is an Apple split tunnel implementation limitation which
is too labor-intensive to fix right away.

Fixes #2661 

Co-authored-by: Andrew Dryga <andrew@dryga.com>
2023-12-08 00:16:42 -05:00
bmanifold
6ab445555a Update synced group badge color on actor pages (#2827) 2023-12-08 00:00:10 -05:00
Andrew Dryga
00380cc59e Fix small bugs with colors (#2828) 2023-12-07 23:59:55 -05:00
Andrew Dryga
3280827a18 Do not show danger zone when group is synced 2023-12-07 22:49:53 -05:00
Andrew Dryga
0eee8a7c26 Show error when policy is created with no groups available (#2825) 2023-12-07 22:25:44 -05:00
Andrew Dryga
8312779813 Do not crash when request did not container user-agent 2023-12-07 19:06:41 -05:00
bmanifold
acbb8bcf44 Update all tailwind classes to use primary/accent/neutral (#2805)
Updated portal to make sure we use primary/accent/neutral in as many
places as possible.

Updated our neutral color palette to only have grayscale colors.

Also aliased the main colors (i.e. red/green/blue/yellow/orange) to use
an `fz_` prefix to allow for easier find/replace if needed, as well as
allowing easy customization of the colors later if needed.
2023-12-07 20:31:38 +00:00
Jamil
abc5f43c97 Source Code 3 for website, logo, and helptext updates (#2799)
* Use Source Sans 3 as font
* Add `:help` slot to sections
* Fix other minor grammar / typos
2023-12-06 11:32:29 +00:00
bmanifold
3d43b33105 Add email confirmation field in portal (#2759)
Why:

* When using the Email Auth Provider (a.k.a. Magic Link), a mistyped
email address when adding a new identity or signing up could allow an
unauthorized person access to your Firezone account. To help prevent
this, an email confirmation field has been added during signup and
during identity creation in the portal.
2023-12-05 13:00:36 +00:00
Jamil
8e3d9f1501 Add plan badges to enterprise features (#2756)
Fixes #2287 

<img width="754" alt="Screenshot 2023-11-30 at 2 40 28 PM"
src="https://github.com/firezone/firezone/assets/167144/9c7df48c-9fae-4758-9a2e-4ba76bc21eb4">
<img width="760" alt="Screenshot 2023-11-30 at 2 40 16 PM"
src="https://github.com/firezone/firezone/assets/167144/25845dc2-9824-4ecf-851e-7289a19d90ab">
2023-12-05 03:49:45 +00:00
Andrew Dryga
4fb101ed9f UX cleanup pt 3 (#2789)
Closes https://github.com/firezone/firezone/issues/2601
Also addresses a lot of TODOs from
https://github.com/firezone/firezone/issues/2788
<img width="1728" alt="Screenshot 2023-12-01 at 18 25 11"
src="https://github.com/firezone/firezone/assets/1877644/95137fca-15ab-4b8c-9598-16d92a7951c7">
<img width="1728" alt="Screenshot 2023-12-01 at 18 25 16"
src="https://github.com/firezone/firezone/assets/1877644/9315b754-c3de-4336-8b59-c1d87ac83f69">
<img width="1728" alt="Screenshot 2023-12-01 at 18 25 33"
src="https://github.com/firezone/firezone/assets/1877644/65245194-c922-401e-bbc4-ff4a378520d2">
<img width="1728" alt="Screenshot 2023-12-01 at 18 25 39"
src="https://github.com/firezone/firezone/assets/1877644/3ac8c2c8-c0a8-4074-9cb1-123bc2c21e71">
<img width="1728" alt="Screenshot 2023-12-01 at 18 25 59"
src="https://github.com/firezone/firezone/assets/1877644/7a96cf74-3a9a-4215-9b22-871dee335b30">
2023-12-04 13:56:31 -05:00
Andrew Dryga
55e8d3407f Render deleted entities on fetch (#2692)
Since we have flows we should either delete the flow when the related
entity is deleted (making them not very useful) or allow viewing deleted
entities properly marking them and removing all action buttons in the
UI:

<img width="1728" alt="Screenshot 2023-11-22 at 13 41 51"
src="https://github.com/firezone/firezone/assets/1877644/ae7f14b9-9607-4de0-a90f-049faf7e4374">
<img width="1728" alt="Screenshot 2023-11-22 at 13 41 54"
src="https://github.com/firezone/firezone/assets/1877644/491f8e1f-6aad-459b-b038-6100c25b3bf4">
<img width="1728" alt="Screenshot 2023-11-22 at 13 41 48"
src="https://github.com/firezone/firezone/assets/1877644/9200e521-0d92-41b5-9197-355353f09a50">

<img width="1728" alt="Screenshot 2023-11-22 at 13 07 47"
src="https://github.com/firezone/firezone/assets/1877644/dca59bbd-9771-4b06-b32b-f17cf0047520">

This change only affects fetching relation by ID (eg. `actors/:id`),
rest of pages (index, edit) will not show deleted entities unless they
are a critical relation (eg. for Policy to work both actor group and
resource are needed):

<img width="1728" alt="Screenshot 2023-11-22 at 13 42 23"
src="https://github.com/firezone/firezone/assets/1877644/d8b15011-838a-477d-97c8-5c7109299cb9">

Closes #2681

Signed-off-by: Andrew Dryga <andrew@dryga.com>
2023-11-30 13:55:07 -06:00
Jamil
79aa4cfb8e 1.x docs first iteration (#2688)
Doing a first pass over documentation and minor UI cleanup. This PR
isn't meant to represent the final state of launch docs, but instead
something that will unblock #2685 and #2675

Fixes #2729
2023-11-30 04:04:54 +00:00
bmanifold
67c14c02ed Add Relay admin feature flag (#2736)
Why:

* Self-hosted Relays are not going to be apart of the beta release, so
hiding the functionality in the portal will allow the user not to get
confused about a feature they aren't able to use.

Closes #2178
2023-11-29 22:02:50 +00:00
Jamil
8ad82b515e "Magic Link" -> "Email" (#2731)
Updates user-facing terminology to `One-Time Password` to more
accurately reflect this sign in method and match docs more consistently

Refs #2688 
Refs #2021
2023-11-28 23:58:50 +00:00
bmanifold
29709fd239 Update portal button colors, button sizing, and sign-in page spacing (#2693)
Closes #2682 #2640 #2639 

This screenshot should demonstrate all 3 issues

<img width="670" alt="Screenshot 2023-11-22 at 3 02 13 PM"
src="https://github.com/firezone/firezone/assets/2646332/d564c6ac-2482-40b1-92c8-0ee961b0ec78">

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2023-11-27 21:04:45 +00:00
Andrew Dryga
b9cd94ec82 Show online clients first on the page (#2698) 2023-11-24 12:02:43 -06:00
Andrew Dryga
c6b64403db Fix unit file (#2684)
Keep in mind it will not work until we release a binary on the GitHub.
2023-11-24 15:01:57 +00:00
Andrew Dryga
484b5a49ce Fix OIDC form and redirect urls (#2695)
Closes #2674
2023-11-24 15:01:10 +00:00
bmanifold
ef480e1acd Add routing option for sites (#2610)
Why:

* As sites are created, the default behavior right now is to route
traffic through whichever path is easiest/fastest. This commit adds the
ability to allow the admin to choose a routing policy for a given site.
2023-11-22 19:59:54 +00:00
Jamil
a5b6929fbf Capitalize logo (#2666)
Forgot to make this consistent. Alternatively we could use a text logo
with the text in-place.
2023-11-18 16:50:29 +00:00
Andrew Dryga
c9f062c7c7 Remove flow logs from gateway page and some of TODOs (#2662) 2023-11-17 12:10:54 -06:00
Andrew Dryga
1ab3fdd3b5 Ephemeral gateways (#2656)
- [x] Fixed docker run command to mount a volume at `/etc/firezone`
- [x] Fixed systemd unit file to prope setcap, create writeable
`/etc/firezone` directory, use non-root user, etc
- [x] Removed `FIREZONE_ID` from our terraform scripts

Now on Sites index we only show online gateways:
<img width="1728" alt="Screenshot 2023-11-15 at 18 04 12"
src="https://github.com/firezone/firezone/assets/1877644/b532f200-0420-4427-acff-a3b8623560c5">

On the Site view we also show only online ones with a link to see all:
<img width="1728" alt="Screenshot 2023-11-15 at 18 02 33"
src="https://github.com/firezone/firezone/assets/1877644/9774dfac-4340-41d4-8404-586e081505f5">

All can be seen on a separate page:
<img width="1728" alt="Screenshot 2023-11-15 at 18 02 27"
src="https://github.com/firezone/firezone/assets/1877644/5d135f60-c7af-4e48-9ebb-626ff7461316">

Some of the functions I've added are pretty dirty hacks, we really need
to implement filters from #2029 to properly implement those and remove
code duplicates.
2023-11-16 11:17:22 -06:00
bmanifold
141d4c801e Update resource index to link to individual site (#2648)
Small bug fix in the Resource index view. All the entries in the `SITES`
column were linking to the sites index, rather than an individual site
show page.

Closes: #2624
2023-11-15 14:44:36 +00:00