Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Dryga
a9b6b28804 Make sure we can't commit gha credentials by accident 2023-10-06 09:43:54 -06: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
Andrew Dryga
c5615060b4 Remove fz_vpn, fz_wall, Omnibus and start restructuring apps 2023-03-31 09:51:40 -06:00
Andrew Dryga
af431c0a6f Rework configurations (#1352)
- [x] All configs should support ENV variable overrides over DB values
- [ ] ~Adding a new field to DB value should automatically write ENV
config to DB on app boot (so that we don't need migrations)~
- [x] Validate configs and report human-readable errors when something
is wrong, telling where it's invalid (eg. env key X) and what's wrong
with it
- [x] Reuse Changeset validations (we still have a DB schema and UI
form, and want to make sure it's valid)
- [x] Auto-generate docs
- [x] Merge `Config` and `Configurations` into one `Config` context
- [x] Lock out UI fields for configurations when there is an ENV
override
- [x] Lock out corresponding REST API configuration field if overridden
via ENV var
- [x] Log a warning when deprecated legacy var is used
- [x] Document precedence: ENV -> Legacy ENV -> File -> DB
- [x] Change type to `inet[]` for `configurations.{default_client_dns,
default_client_allowed_ips}`, `devices.{dns, allowed_ips}`,
- [x] Drop `EctoNetwork` dep
- [x] `s/phoenix_port/phoenix_http_port` because it doesn't configure
HTTPS server
- [x] Do not load DB configs when config can be resolved from other
sources

Maybe:
- [ ] ~Auto-generate Ecto types to automatically cast/dump values
to/from DB~
- [ ] Allow JSON file config source
- [x] DB-related configs will not be validated?

Closes #1162
Closes #1313
Closes #1374
Closes #1432
2023-02-21 10:38:53 -06:00
Andrew Dryga
28fe571543 Small improvements to make setup process easier for OS contributors (#1171)
* Remove _build folders for umbrella apps

For umbrella apps everything goes into /_build directory so there no need to ignore directories that should never be created

* Change mix aliases to be more aligned with what OS community would expect

1. We want ecto.create and ecto.migrate to be run on each tests, this will simplify setup steps (no need to run migrations manually)

2. ecto.remigrate is not needed because now you can just run ecto.drop and on tests migrations would be executed anyways.

* Rename docker-compose step name in CONTRIBUTING.md

The step was renamed here: dd67baf629 (diff-67a4805fdcc6145d7b3ada2a6099a9b2e91c9d0fd108c22f95d2f01d219793d1R10)

* Remove .devcontainer

This an is opinionated change. Right now devcontainer doesn't work but should be easy to fix (with renaming step name), but at the same time it forces developers that use VS code to have unified development environment (including plugins for the editor itself).

I feel like it's not a good path to go for OS and for small team - everyone should be allowed to use setup they like. Especially for people like me that tend to recompile ls-elixir for Elixir plugin from master branch.

Plus it's yet another thing to maintain while nobody on the team is using it, which means it will be always causing issues.

* Make fz_http mix.exs aliases aligned with umbrella app ones

* Redirect stderr to stdout in a command called from dev.exs

Otherwise I'm getting this on my MacOS (that has a `route` implementation that doesn't show interfaces) when `mix phx.server` is executed:
```
usage: route [-dnqtv] command [[modifiers] args]
```

* Fix race condition due to static device field values

Both public_key and name are unique and we should not use static values for field covered by unique index, otherwise deadlocks and slow tests are expected.

* Remove unwanted transaction block

The changeset code doesn't have any code that accesses the database and individual Ecto.SQL commands are already wrapped in transactions by default, so there is no need to start it manually and hold for longer than expected (while irrelevant Elixir code is running).

* Use netstat to identify egress interface on MacOS

* Rename uninstall.sh to omnibus-uninstall.sh

* Fix uninstall path in omnibus_build.yml
2022-12-06 15:07:45 -08:00
Jamil
dd11c728b0 Better validate OIDC and SAML configs (#1026)
* Bump postgres to release; Note on Caddy cert

* default auto_create_users

* Validate SAML and OIDC configs better

* Fix failing test
2022-10-15 18:33:32 -07:00
Po Chen
2a5466a0fb bumps and dev tweaks (#886) 2022-08-02 18:11:28 -07:00
Po Chen
bfbb671d32 Docker DEV (#737) 2022-07-25 11:47:58 -07:00
Mark Percival
055232ce46 Implement OpenID Connect for authentication (#586)
Implements the OpenID Connect standard for SSO Authentication
which allows users to use any OpenID Connect provider for authentication
not just a predefined list of providers

User can add OIDC config settings to firezone.rb which will then
populate the AUTH_OIDC environment variable as a JSON string.

FZ_HTTP will use this environment variable to create
provider(s) to authenticate against

Additional notes:
- Updates .env.sample to include an example of a 'stringified' JSON
environment variable for setting AUTH_OIDC in development
- Add dep for 'openid_connect' and test dep for 'mox'
2022-05-12 10:37:08 -07:00
Jamil
7a6880117a docker wireguard client (#473) 2022-02-24 15:44:02 -08:00
Jamil Bou Kheir
765976275e Add diagnostic pinger; default settings
Also don't display DNSservers when empty.

Fixes firezone/backlog#135
Fixes firezone/backlog#123
Fixes firezone/backlog#130

Refs #333
2021-12-09 15:24:10 -08:00
Jamil Bou Kheir
0a4bdd9367 D'oh file 2021-07-12 12:05:18 -07:00
Jamil Bou Kheir
3759f6d65d Rename instances 2021-07-10 06:29:16 -07:00
Jamil Bou Kheir
5dcd868cd7 Remove rustler 2021-07-08 09:59:50 -07:00
Jamil Bou Kheir
d69ad11c25 Remove screenshots d'oh 2021-06-28 08:48:53 -07:00
Jamil Bou Kheir
1cbbf49940 Add feature testing 2021-02-24 09:23:34 -06:00
Jamil Bou Kheir
61bdd35d2f Don't add device to config file until user confirms; Add rustler 2021-01-17 10:40:09 -08:00
Jamil Bou Kheir
13f1d22f47 use hostname 2020-11-13 18:19:38 -06:00
Jamil Bou Kheir
7d50a38699 mix release on prod env 2020-11-13 13:52:30 -06:00
Jamil Bou Kheir
eea20634d0 use env files instead of YAML 2020-11-09 10:13:02 -06:00
Rob Ortiz
8bcfa71dc2 installation instructions 2020-07-21 22:57:54 -05:00
Jason Bou Kheir
851a8e172a adding .vscode folder 2020-06-23 21:24:58 -07:00
Jamil Bou Kheir
5f3ee7ba6c Use binary erlang/elixir yay 2020-05-03 17:05:16 -07:00
Jamil Bou Kheir
8502c1b7e1 working Vagrantfile for compiling from source 2020-04-28 23:10:48 -07:00
Jamil Bou Kheir
a76e9f46c3 Rename cloudfire app to cf_phx; Start Dockerfile work 2020-04-22 21:32:31 -07:00
Jason Bou Kheir
6674b693ea update gitignore for ElixirLS 2020-04-22 19:29:24 -07:00
Jamil Bou Kheir
d049b006f6 Initial commit 2020-04-21 20:49:55 -07:00