Commit Graph

522 Commits

Author SHA1 Message Date
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
Jamil
16bc9d943b fix(infra): Bump base images to resolve CVEs (#5515)
Fixes the CVEs here:

https://alpinelinux.org/posts/Alpine-3.17.8-3.18.7-3.19.2-released.html

I discovered while browsing our Google artifact registry.
2024-06-24 16:56:55 +00:00
Jamil
0316f480d6 refactor: Add icons to policy conditions (#5486)
As I was taking screenshots of the new policy conditions feature I
realized it would be quick and easy to add icons corresponding to the
titles to continue the theme of adding visual hints to break up the
text-heavy sections.

It also looks nice in the screenshots for the blog post and newsletter
posts.

<img width="669" alt="Screenshot 2024-06-21 at 10 00 14 AM"
src="https://github.com/firezone/firezone/assets/167144/61d5d61d-4d4c-4f6f-b325-dbcb81c2c9b7">
2024-06-21 21:01:26 +00:00
Andrew Dryga
eb7b3f62ab feat(portal): Select only compatible gateways during candidate selection (#5463) 2024-06-20 20:35:20 -06:00
Andrew Dryga
ecf3944848 fix(portal): Rate limit outbount emails (#5455) 2024-06-19 20:23:37 -06:00
Jamil
8d74f2ae8e fix(portal): Fix Enum.find_value to extract actor name in confirmation dialog (#5430)
Fixes #4884 
Fixes #5425
2024-06-19 16:47:11 +00:00
Jamil
11d76c4941 docs: Add JumpCloud SSO + sync docs (#5390)
Adds a step-by-step guide for setting up the new JumpCloud connector and
optionally directory sync.

Fixes #4950
2024-06-18 19:38:03 +00: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
bfbf570191 ci: Increase default assert_receive timeout to 500ms from 100ms (#5417)
We seem to be hitting `assert_receive`-style much more frequently after
"upgrading" to Enterprise Cloud (our credits expired, I was able to
renew them).

This updates the global timeout to 500ms for `assert_receive` to reduce
the likelihood `assert_push` and friends will time out on slow GH
runners.

E.g.


https://github.com/firezone/firezone/actions/runs/9556532328/job/26341986456

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-06-17 18:35:11 -07:00
Andrew
67c1425917 Try to fix file permissions issues for Tzdata 2024-06-17 18:10:18 -06:00
Jamil
c1d68340a7 fix(portal): Fix all website links in product (#5401)
Adds a dedicated `anchor` attr to the `website_link` component because
the order of components in a URL must be `/path?params#anchor`.
2024-06-17 17:59:43 +00:00
Jamil
27e6672a5d fix(portal): Make Conditions label color match other labels (#5389)
Very minor thing I noticed today.
2024-06-17 14:05:05 +00:00
Jamil
17ea02d1a9 fix(portal): Don't send null address_description (#5365)
In #5273, I assumed that connlib optionally expected
`address_description`, but this is not the case. That feature assumes
the admin will optionally enter `address_description` to **override**
the address shown in Clients. The Clients already expect an optional
type for `address_description` and implement the correct behavior.

This PR is a workaround to prevent breaking existing Clients until we
can be relatively sure most clients have upgraded, in ~2 months.
2024-06-14 01:56:16 +00:00
Andrew Dryga
526f9ca269 fix(portal): Fix various production bugs with IdPs (#5342)
Closes #5335
2024-06-12 20:01:51 -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
8700a680d5 chore: Bump versions to point to new artifacts (#5337)
Currently dl links are broken due to the updated format.
2024-06-12 00:01:59 -07: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
Jamil
7e533c42f8 refactor: Split releases for Clients and Gateways (#5287)
- Removes version numbers from infra components (elixir/relay)
- Removes version bumping from Rust workspace members that don't get
published
- Splits release publishing into `gateway-`, `headless-client-`, and
`gui-client-`
- Removes auto-deploying new infrastructure when a release is published.
Use the Deploy Production workflow instead.

Fixes #4397
2024-06-10 16:47:49 +00: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