Commit Graph

2248 Commits

Author SHA1 Message Date
Andrew Dryga
a845c2999d Fix github branch name 2023-06-12 15:03:17 -06:00
Andrew Dryga
571e861f62 Try pushing update using GH API 2023-06-12 14:52:50 -06:00
Andrew Dryga
54d19f50a9 Bump checkout action vsn in rust workflow 2023-06-12 14:29:00 -06:00
Andrew Dryga
c7f0a463ae Rename pre-commit step 2023-06-12 14:26:28 -06:00
Andrew Dryga
9b3468d4f7 Fix path to versions file 2023-06-12 14:26:12 -06:00
Andrew Dryga
01f428fd35 Inherit secrets to child workflows 2023-06-12 14:13:30 -06:00
Andrew Dryga
d8c9cf1a89 Fix races for concurrency control 2023-06-12 14:11:15 -06:00
Andrew Dryga
7c883a0ba0 Remove copy-pasted required inputs 2023-06-12 14:08:41 -06:00
Andrew Dryga
bf61b7964a Add missing on_workflow call 2023-06-12 14:03:42 -06:00
Andrew Dryga
32ebd7cae3 Try a different CI setup 2023-06-12 14:00:47 -06:00
Andrew Dryga
9dbffee560 Experiment with condition
Workflow is not picked up by GitHub for some reason
2023-06-12 12:42:04 -06:00
Andrew Dryga
ecb016f03c Lave a note on workflow_run feature and fix checkout feature 2023-06-12 12:33:31 -06:00
Andrew Dryga
aa4ed0efe1 Add terraform code owners 2023-06-12 12:29:35 -06:00
Andrew Dryga
a7274fa671 Continuous delivery to staging (#1655) 2023-06-12 12:15:55 -06:00
Thomas Eizinger
ec453a2d9c feat(rust): bump to new stable release 1.70.0 (#1648) 2023-06-09 14:32:52 -07:00
Andrew Dryga
8761ca3760 Remove outdated TODO 2023-06-07 18:51:55 -06:00
Andrew Dryga
80ed59c022 Normalize CIDR resource addresses 2023-06-07 18:27:45 -06:00
Andrew Dryga
79a44ad0e8 Add resource type and expose it in WS API along with name (#1649)
Additionally:
1. Fixed ipv6 formatting for stun/turn addresses
2. Fixed a tests that check for race conditions concurrently
2023-06-07 15:48:00 -06:00
Andrew Dryga
d0febefeb9 Add newlines in the end of files 2023-06-07 09:16:32 -06:00
Andrew Dryga
7dd512e372 Run pre-commit CI step on all PRs 2023-06-07 09:12:53 -06:00
Andrew Dryga
81c5fe9aef Fix typos 2023-06-07 09:11:51 -06:00
Andrew Dryga
27febb0775 Always run Elixir CI checks when code in main branch changed 2023-06-07 09:08:40 -06:00
Andrew Dryga
7498271ba3 Remove Elixir checks from pre-commit hook and rename CI step that runs it 2023-06-07 09:08:40 -06:00
Thomas Eizinger
16156a6448 relay: implement authentication (#1641) 2023-06-07 06:17:20 -07:00
Andrew Dryga
7857369614 Try to fix CI step 2023-06-06 17:18:45 -06:00
Andrew Dryga
9083ab79aa Set correct outbound email in local env 2023-06-06 17:13:54 -06:00
Andrew Dryga
d9eb2d18df Deployment for the cloud version (#1638)
TODO:
- [x] Cluster formation for all API and web nodes
- [x] Injest Docker logs to Stackdriver
- [x] Fix assets building for prod

To finish later:
- [ ] Structured logging:
https://issuetracker.google.com/issues/285950891
- [ ] Better networking policy (eg. use public postmark ranges and deny
all unwanted egress)
- [ ] OpenTelemetry collector for Google Stackdriver
- [ ] LoggerJSON.Plug integration

---------

Signed-off-by: Andrew Dryga <andrew@dryga.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-06-06 15:03:26 -06:00
Thomas Eizinger
d27856a8f1 refactor(relay): introduce type-safe Server APIs (#1630)
We introduce dedicated types for each message that the `Server` can
handle. This allows us to make the functions public because the
type-system now guarantees that those are either parsed from bytes or
constructed with the correct data.

The latter will be useful to write tests against a richer API.
2023-05-31 15:18:20 +01:00
Andrew Dryga
37a2d7b7f5 Move elixir code to a subfolder (#1631) 2023-05-24 15:46:51 -06:00
Andrew Dryga
9e1669c333 Fix some of TODOs left from IAM PR (#1627) 2023-05-24 12:18:52 -06:00
Jamil
c30f571d73 Fix minor bugs and tidy up existing work on new views (#1628)
Just fixing some bugs and inconsistencies I found while going through
the new views.
2023-05-23 09:10:28 -07:00
Andrew Dryga
70a03d39e6 Implementing channels logic (#1619) 2023-05-22 19:49:50 -06:00
Thomas Eizinger
f5fdd56812 relay: create channel bindings and relay data (#1618)
Here is a short demo:


[Relay](https://github.com/firezone/firezone/assets/5486389/c0199294-70ca-47b4-90ae-2c96428bdb56)

You can run this locally using the `./run_smoke_test.sh` shell-script.
It is not reliable enough yet to be used in CI but I used one if its
outputs to make a regression test.

---------

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-05-22 17:25:16 -07:00
Jamil
0647eeebca 1.0 views (part 1) (#1599)
# Todo
- [x] Users
- [x] Groups
- [x] Devices
- [x] Gateways
2023-05-22 17:09:41 -07:00
Thomas Eizinger
9c120fb35a fix(relay): use correct variable (#1617)
We had a semantic conflict here that resulted in a broken build. This PR
fixes that.

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-05-17 09:36:32 -07:00
Jamil
5be87b97c2 Fix PR-labeler config (#1623)
Fix PR labeler config 🤞
2023-05-17 09:11:54 -07:00
Andrew Dryga
e992863ae5 IAM context (#1577)
Things I've left for later to IAM:
1. Subject session expiration (to prevent session extension attacks);
2. UserPass adapter;
3. Token adapter and removal of APITokens in favor of `api_client` actor
with a Token provider;
4. Cleanup of Configurations schema and table
5. SCIM
6. Groups and Actor Profile (name, email) Sync
7. Email delivery once Web app is done with the templates
8. We might also want to persist sessions to database, to then show list
of active sessions to the user and allow to terminate some of them from
UI
9. SAML?
10. Rename `unprivileged` role name to `end_user`
11. Add `first_` and `last_name`, and sync/edit blocking logic around
it.
12. Rename Clients to Devices?
2023-05-16 19:42:36 -06:00
Jamil
d5cfd6365d Update workflows for cloud chaos (#1615)
Updating workflows to skip on PR and run on merges to `cloud`.
2023-05-16 13:50:17 -07:00
Thomas Eizinger
0d6e5986ae ci: remove broken workflows (#1614)
These workflows are all red which is expected as far as I understand.
I'd suggest we remove them to reduce the noise when reviewing PRs.

In case we ever wanted to bring parts of it back, Git is our best
friend.

Feel free to close if you think differently.
2023-05-16 13:35:39 -07:00
Thomas Eizinger
52df0cbfb4 relay: remember allocations by port (#1613)
Instead of remembering the used ports separately, we store a reference
to each allocation by port.
2023-05-16 09:05:51 +02:00
Thomas Eizinger
5e74143ede relay: don't repeat magic numbers througout the code (#1612)
A small refactoring to keep magic numbers only in one place.
2023-05-16 09:05:13 +02:00
Thomas Eizinger
675cb2dd54 relay: refresh allocations (#1610) 2023-05-16 07:21:02 +10:00
Thomas Eizinger
01f33ed4a0 relay: add basic README (#1611) 2023-05-16 05:39:28 +10:00
Thomas Eizinger
c0774523a8 relay: Parse and respond to allocation requests (#1604)
With this patch, the relay can parse and respond to allocation requests. I
ran some basics tests against https://icetest.info/ and implemented a
regression test as a result of the logged data.

In writing this, I also had to slightly change the design of `Server`
(as expected). Event handlers for incoming data now do not return a
message directly. Instead, the caller is responsible to drain `Command`s
from it.

When creating an allocation, we need to start listening on a new port.
This needs to happen outside the `Server` as I am going for a sans-IO
style. We emit a `Command` that instructs the main event loop to listen
on a new port. Any incoming data on that port will be forwarded to the
`Server`.

At the moment, this incoming data is just dropped. This is actually
standards-compliant because we cannot handle binding requests yet which
would allow this data to be forwarded to the client.

In some areas, the code is still a bit rough but I expect to iron those
things out as we go along.
2023-05-16 04:58:33 +10:00
Thomas Eizinger
24e4a1c052 Enforce no warnings in docs (#1605) 2023-05-12 11:28:21 -07:00
Thomas Eizinger
b090557e3d Install Rust before computing cache keys (#1606) 2023-05-12 11:27:49 -07:00
Thomas Eizinger
70e6982e45 Implement basic STUN server (#1603)
This is an alternative to https://github.com/firezone/firezone/pull/1602
that implements the server using a library I've found called
`stun_codec`.

It already has support for parsing a variety of attributes.

The following is a nice website to test some of the functionality:
https://icetest.info/

The server is still listening on:
`ec2-3-89-112-240.compute-1.amazonaws.com:3478`.
2023-05-10 07:58:32 -07:00
Thomas Eizinger
0be094124b Update .github/workflows/rust.yml
Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2023-05-08 19:06:34 -03:00
Thomas Eizinger
d7fab6b803 Add caching to CI 2023-05-08 19:06:34 -03:00
Thomas Eizinger
718e4da41a Move rust-toolchain to workspace root 2023-05-08 19:06:34 -03:00