1035 Commits

Author SHA1 Message Date
Andrew Dryga
677b1b1f40 Do not try to join to a cluster of older versions (#2493) 2023-10-24 17:04:56 +00:00
bmanifold
043cd555aa Update DNS portal config (#2432)
Why:

* After further discussion around the Client DNS settings, it was
decided that keeping both `type` and `address` would be easier to help
with validation and parsing. At the moment, only IP DNS servers are
accepted, but placeholders for `DNS over TLS` and `DNS over HTTPS` have
been created.
2023-10-20 21:16:45 +00:00
Andrew Dryga
8090df3624 Add requires step to Google Workspace provisioning guide 2023-10-19 23:49:15 -06:00
Andrew Dryga
6bfab7e376 Fix outdated examples in elixir's README.md 2023-10-19 23:14:16 -06:00
Andrew Dryga
b84786546b Bump Elixir and Terraform deps (#2431) 2023-10-18 10:27:10 -07:00
dependabot[bot]
d5f76ee63b build(deps): Bump @fontsource/source-sans-pro from 4.5.11 to 5.0.8 in /elixir/apps/web/assets (#2376)
Bumps
[@fontsource/source-sans-pro](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/source-sans-pro)
from 4.5.11 to 5.0.8.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/fontsource/font-files/commits/HEAD/fonts/google/source-sans-pro">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@fontsource/source-sans-pro&package-manager=npm_and_yarn&previous-version=4.5.11&new-version=5.0.8)](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 <jamilbk@users.noreply.github.com>
2023-10-18 00:19:17 +00:00
bmanifold
c4c1a67d12 DRY up heex templates (#2238)
This PR lays the ground work for making all the liveview pages more
uniform in how they are laid out by creating and updating some of the
liveview components.
2023-10-12 22:17:05 +00:00
Andrew Dryga
0aab4077f8 Fix auth flow state, bump COS to 109, enable fluentbit logging, auto-remove docker registry artifacts (#2315) 2023-10-11 16:19:47 -06:00
bmanifold
8dc869909a Update web signup page and add tests (#2305)
Why:

* The signup page was failing to allow signups due to a change in one of
the domain functions. This happened due to the UI not having tests for
the sign up page. The sign up page has been updated to use the new
domain function signature and has also had some tests added to hopefully
prevent regressions.

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-10-11 15:16:35 -07:00
Jamil
44d14823e5 Use cached compiled deps for Elixir (#2272)
- Remove unused deps from lockfile with `mix deps.clean --unused
--unlock`
- Conditionally run `mix deps.compile` since it takes around a minute even cached
(~20s on my M1) 
- Add `mix deps.unlock --check-unused` to check for unused deps


### With `mix deps.compile`

<img width="1059" alt="Screenshot 2023-10-07 at 12 46 14 PM"
src="https://github.com/firezone/firezone/assets/167144/7a075d20-4fce-4545-b4a1-b8d57f5af06a">


```
mix deps.compile --skip-umbrella-children  2.98s user 1.83s system 27% cpu 17.252 total
```

### Without `mix deps.compile`

<img width="1046" alt="Screenshot 2023-10-07 at 3 09 23 PM"
src="https://github.com/firezone/firezone/assets/167144/060eb9d1-0e4c-42cc-9379-985a86ce383e">

---------

Co-authored-by: Andrew Dryga <andrew@dryga.com>
2023-10-10 04:17:24 +00:00
Jamil
d0d1c095c3 Fix spelling typos (#2289)
Fixes failing checks in #2284
2023-10-09 18:32:24 -07:00
Andrew Dryga
a61560701c Show flow actors (#2268)
It was hard to tell who exactly was authorized during a flow without
clicking around:
<img width="1465" alt="Screenshot 2023-10-06 at 15 53 43"
src="https://github.com/firezone/firezone/assets/1877644/26f7c865-714e-40fc-95d5-1b67e2de16cf">

Now it's possible:
<img width="1462" alt="Screenshot 2023-10-06 at 15 53 38"
src="https://github.com/firezone/firezone/assets/1877644/d4ddfd95-fa94-47a0-a73b-b3cdd31994a7">
2023-10-09 22:57:09 +00:00
Andrew Dryga
42bbafc04d Merge firezone/containers into elixir/Dockerfile for better reuse and maintainability (#2267)
Upsides:
1. We don't need to maintain a separate repo and Dockerfile just for
Elixir image (permissions, runner labels, etc)
2. No need to push intermediate images to the container registry
3. No need to copy-paste alpine/erlang/elixir version and hashes from
`firezone/containers` to `elixir/dockerfile` every time they change
4. No need to cross-compile for local dev environments, better
experience building with slow internet connection
5. One command to test if our code works on our containers but a
different alpine/erlang/elixir version

Downsides:
1. Locally devs will need to compile Erlang at least once per version,
but the whole build takes ~6 minutes on my M1 Max. It also takes only 8
minutes on the free GitHub Actions runner without any cache.
2. Worse experience on slow machines

FYI: there is no performance penalty once we have cache layers, still
takes 30 seconds on CI.
2023-10-06 15:34:47 -06:00
Andrew Dryga
c5ccef88f7 Copy entire project sooner 2023-10-06 14:17:17 -06:00
Andrew Dryga
5cd1465f85 Copy web/lib for the assets pipeline 2023-10-06 14:08:40 -06:00
Andrew Dryga
8c219c64c9 Add curl to the runtime image 2023-10-06 08:35:03 -06:00
Andrew Dryga
205f95bcfb Allow default user to write to /var/firezone 2023-10-06 08:21:36 -06:00
Andrew Dryga
e5fff809c0 Streamline apps versioning for Elixir and Terraform (#2257) 2023-10-05 20:29:25 -07:00
Jamil
80234f9c71 Github Actions cache on main and scope caches for all languages/runtimes (#2233) 2023-10-04 17:29:04 -07:00
Jamil
ff1c0b950a Add make version command to set version in components (#2215)
Fixes #2213 

This will allow us to fetch the actual Firezone version that's in use
from within the language runtimes themselves without resorting to an
external mechanism to do so. This is useful in connlib for example when
selecting the Portal API to use with `X-Firezone-API-Version`, and
useful in log printing.

Since platforms enforce semantic version, I propose the convention:

`1.20231001.34` where MAJOR is `1` for Firezone 1.0, MINOR is our API
version, and PATCH is the release of that API version that is published
on the repo.

Given this system, publishing a release would consist of:

1. Edit `Makefile` to set the patch and minor versions appropriately
depending on whether there are breaking portal API changes.
2. `make version`
3. `git add .; git commit; git push` -- this opens a PR with the new
version numbers. In this PR we can discuss whether to stop-ship or go.
4. PR merged, release is drafted and deployed to staging with the new
tag and version numbers
5. build artifacts are uploaded to drafted release, everything is tagged
and versioned appropriately without having to introduce another commit
6. If all looks good, publish release
2023-10-03 15:22:02 +11:00
bmanifold
c8090f8017 Update Account DNS settings UI (#2120)
Why:

* The previous Account DNS Settings page was only a static page. This
commit enables the form on the page to actually save and update the DNS
settings for a given account.
2023-10-02 14:19:48 -06:00
Andrew Dryga
2f78be155f Flows activity/metrics (#2176)
Charts library could be better, I did not find a way to configure
time-series min/max value or step, formatting Y axis is not trivial too,
but for an early feature this should do the job:

<img width="1728" alt="Screenshot 2023-09-27 at 20 00 10"
src="https://github.com/firezone/firezone/assets/1877644/8e4bef6b-2937-4dc2-ac31-3c61e31bffc6">
2023-09-30 16:04:33 +00:00
Jamil
64d9d0421a fix(portal): Increase assert_receive timeouts because GH is slow (#2197)
Fixes
https://github.com/firezone/firezone/actions/runs/6363610658/job/17279335896
and
https://github.com/firezone/firezone/actions/runs/6363673302/job/17279439543
2023-09-30 15:40:44 +00:00
Andrew Dryga
884022410f Fix lost client_* state on magic link resend (#2196)
Closes https://github.com/firezone/firezone/issues/2012
2023-09-30 15:11:31 +00:00
Jamil
c4c6f3e4ca refactor(portal): Don't pin session token to user_agent or remote_ip (#2195)
Removing the check to get Rust PRs to pass.

**Note**: #2182 was dependent on this one, and has since merged into
this one.
2023-09-30 07:40:57 -07:00
Andrew Dryga
38f017cdae Test a different strategy to check for ws origin 2023-09-29 16:54:58 -06:00
Jamil
72044cc065 refactor(android): Make app links more robust in the emulator (#2188)
Getting some weird behavior with AppLinks. They don't seem to work upon
first use and require a few tries to function correctly.

Edit: Found the issue: Android Studio doesn't like when the Manifest
contains variables for AppLinks. I added a note in the Manifest.

@conectado To test Applinks are working correctly, you can use the App
Link Assistant:

<img width="930" alt="Screenshot 2023-09-28 at 11 15 11 PM"
src="https://github.com/firezone/firezone/assets/167144/e4bd4674-d562-44ec-bdb8-3a5f97250b84">

Then from there you can click "Test App Links":

<img width="683" alt="Screenshot 2023-09-28 at 11 15 30 PM"
src="https://github.com/firezone/firezone/assets/167144/f3dc8e0d-f58a-4a4b-9855-62472096dc9e">
2023-09-29 18:09:04 +00:00
Andrew Dryga
37fc412ff3 Check websocket origin (#2192) 2023-09-29 12:02:54 -06:00
Andrew Dryga
3d143680b8 Show client/gateway Remote IP instead of internal IPs
Closes https://github.com/firezone/firezone/issues/2059
2023-09-29 09:25:48 -06:00
Jamil
d2c5968217 refactor(portal): Remove Dashboard, Landing pages and use sign_in for unauthenticated landing (#2175)
Fixes #2062
Fixes #2064 
Fixes #2063 


<img width="573" alt="Screenshot 2023-09-27 at 1 53 15 PM"
src="https://github.com/firezone/firezone/assets/167144/3e487475-4e63-4aa0-8614-57579bb4aa95">
2023-09-29 02:28:59 +00:00
Gabi
e446138150 add gabi key to assertlinks.json (#2183)
Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
2023-09-28 13:59:19 -07:00
Andrew Dryga
5dddc1205e Change naming convention for spans for better integration with Cloud Trace 2023-09-27 15:46:00 -06:00
Andrew Dryga
1dac7d87a0 Do not show resources to clients that are not authorized to access them 2023-09-27 13:48:14 -06:00
Andrew Dryga
e92752a974 Prefix span names by socket type 2023-09-27 13:31:24 -06:00
Andrew Dryga
4f46cfd25f Remove required attribute on policy description textareas 2023-09-27 13:21:34 -06:00
Andrew Dryga
0b9dd334b4 Network flows (logs, auth) (#2166)
Closes https://github.com/firezone/firezone/issues/2095
Partially implements #949

<img width="1728" alt="Screenshot 2023-09-26 at 19 25 54"
src="https://github.com/firezone/firezone/assets/1877644/dffa8ae5-3095-4188-a1d2-3e8382e61628">
<img width="1728" alt="Screenshot 2023-09-26 at 19 26 03"
src="https://github.com/firezone/firezone/assets/1877644/853e8c90-eaae-4754-aea3-c58aba7cc97c">
<img width="1728" alt="Screenshot 2023-09-26 at 19 26 10"
src="https://github.com/firezone/firezone/assets/1877644/68aa9556-db11-4512-929a-45d1e4c3b258">
<img width="1728" alt="Screenshot 2023-09-26 at 19 26 17"
src="https://github.com/firezone/firezone/assets/1877644/020e0e98-142b-4b3b-aebf-789f2ad4e3c7">
2023-09-27 11:50:39 -06:00
Jamil
3d1921da7a feat(portal): Scrollbar improvements (#2160)
Thanks to @devsnaked for the fix. Opening this to get the changes merged
more quickly.

Supersedes #2072

---------

Signed-off-by: Maximilly Moreira Gonçalves <max.ocw@gmail.com>
Co-authored-by: Maximilly Moreira <max.ocw@gmail.com>
2023-09-27 15:24:26 +00:00
Andrew Dryga
58e9c42bb6 Broadcast new ICE candidates (#2149)
Closes #2118
2023-09-25 16:40:26 -06:00
Jamil
41bbf7e541 fix(portal): sidebar active item state (#2119)
Adds `active_path` to determine whether or not to highlight a sidebar
item.

~~Leaving as draft for now to allow @devsnaked to contribute. Edit: Will
use this PR as the base for @devsnaked's upcoming changes~~

Edit: fixes #2065
2023-09-25 21:29:56 +00:00
Jamil
0d7ff13fe3 fix(docs): Prevent adding typo single-quote to JSON examples (#2131)
Fixes #1968
2023-09-25 20:05:09 +00:00
Jamil
0342d37ef7 fix(portal): Fix sidebar item spacing (#2114)
# Before:
<img width="256" alt="Screenshot 2023-09-21 at 12 21 51 PM"
src="https://github.com/firezone/firezone/assets/167144/b39d4488-5116-46db-9a10-30fdc5ce10ca">

# After:
<img width="258" alt="Screenshot 2023-09-21 at 12 28 50 PM"
src="https://github.com/firezone/firezone/assets/167144/b8e0063e-b355-4e55-b1d3-45c553dd27fd">

Sidebar active state and collapsible will be fixed in another PR.
Fixes #2065
2023-09-22 15:50:47 +00:00
Andrew Dryga
93cb8a0699 Replace trace events with spans (#2112) 2023-09-21 11:48:01 -06:00
Andrew Dryga
e635ee3774 Properly set parent span ids for phoenix channels (#2101) 2023-09-20 22:21:34 -06:00
bmanifold
3e60079bf8 Update Account Settings page (#2092)
Why:

* The current account settings page shows the user profile info and
billing information. The billing system is not currently implemented and
can be hidden for the time being. As for the user profile information,
it was decided that it would probably be better to send the user to the
'Actors' show page for the currently logged in user.

<img width="1148" alt="new-account-settings-page"
src="https://github.com/firezone/firezone/assets/2646332/6aaabad0-038e-4b4c-8cfb-e2d669b54b53">
2023-09-20 10:22:39 -06:00
bmanifold
7608151f75 Enable Resource New/Edit forms (#1989)
Why:

* Previously the New/Edit forms for Resources were not able to actually
create or update Resources. This commit enables those forms to create
and update a Resource.

---------

Co-authored-by: Andrew Dryga <andrew@dryga.com>
2023-09-20 10:19:49 -06:00
Andrew Dryga
9281b7fede Allow client logs and messages instrumentation (#2086)
Closes #2019
2023-09-18 15:03:51 -06:00
Andrew Dryga
db7df665c4 Fix span name for background jobs 2023-09-14 01:00:51 -06:00
Andrew Dryga
86f04bff63 Trace api app and finish file renames (#2069) 2023-09-14 00:24:40 -06:00
Andrew Dryga
85b4aba9bc Rename Devices to Clients in Elixir app (#2008)
Renaming it back to clients to reflect service accounts and headless
clients use cases in the terminology. Such a rename will be very painful
on live data so better if we do it early on.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2023-09-13 12:37:27 +00:00
Andrew Dryga
7f7b214a8e Include OTEL to Elixir releases 2023-09-12 22:00:12 -06:00