Commit Graph

366 Commits

Author SHA1 Message Date
Po Chen
765e5782b6 Speed up admin ui (#623)
* speed up admin ui

* sync master

* implement live update of active sessions
2022-05-18 15:38:03 -07:00
Jamil
911dfd1f64 Fix table overflow (#626) 2022-05-18 12:12:09 -07:00
Jamil
8da17b6a6f Use Athentication.sign_out/0 to clear session (#624) 2022-05-18 09:29:13 -07:00
Jamil
7679d66efe Fix failing tests after switching to textarea (#622) 2022-05-17 22:36:16 -07:00
Po Chen
c5a4fa7768 change allowed ips to textarea (#618) 2022-05-17 22:08:08 -07:00
Po Chen
4922ff143c Show user on admin devices table (#598)
* Show user on admin devices table

* add link and test
2022-05-17 20:04:33 -07:00
Andrew Rousset
9d60f8b218 Make Set-Cookie secure attribute false in dev environments (#363 product) (#610)
Co-authored-by: Andrew Rousset <akr@valkyrie.local>
2022-05-17 15:16:40 -07:00
Jamil
11a2045b18 Increase QR code area by 2.25x (#608) 2022-05-17 13:01:31 -07:00
Po Chen
c161407a06 Migrate allowed ips on devices to text (#602)
* migrate allowed ips on devices

* migrate allowed ips on sites

also split into up and down
because modify field cannot rollback automatically
2022-05-17 12:39:59 -07:00
Po Chen
4598a4e213 replace moment with Intl.DateTimeFormat (#597) 2022-05-15 19:54:54 -07:00
Po Chen
2139762bca fix mobile modal (#596) 2022-05-15 17:49:00 -07:00
Po Chen
1454c32a5a fix mock (#592) 2022-05-12 23:03:18 -07:00
Po Chen
c7e003353b Password reset (#584)
* send reset email

* migrate password reset to magic link

* finish up magic link

* add module doc for AuthEmail

* allow changing email and password

* update wording

* make credo happy

* add tests

* unwrap early

* add one more test

* renames

* add text alternative

* rename

* use bulma level

* disallow changing own email

* always pass down current user

* fix text email

cannot be heex

* Add brace back
2022-05-12 21:40:38 -07:00
Jamil
c990ea8691 Get OIDC working with Okta, Azure (#590) 2022-05-12 21:37:33 -07:00
Jamil
81da9ce893 Fix unprivileged device access (#589) 2022-05-12 17:01:26 -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
Po Chen
298b353ebe Implemet Outbound emails (#576)
* add mailer

* setup configs

* only setup mailer if from_email is present

* Do not assume OUTBOUND_EMAIL_FROM exists

* update docs

* add usage of mailer as tests

* address comments
2022-05-09 14:50:22 -10:00
Po Chen
85ec3defe3 Implement promote/demote feature (#569)
* Implement promote/demote feature

force reconnect

* improve user fixture creation

* add tests

* format

* refactor

* alias
2022-05-07 07:21:30 -07:00
Jamil
8293d41db7 Display latest_handshakes in device views (#572)
* Display latest_handshakes in device views

* Display latest handshake timestamp

* Move text check outside loop
2022-05-05 16:52:41 -07:00
Jamil
53d8f0803a Don't remove cookies twice (#571) 2022-05-03 15:57:10 -07:00
Jamil
cb93ec0312 Fix VPN session duration options for select (#568)
* Fix VPN session duration of Once

* Fix expected durations
2022-05-02 06:48:34 -07:00
Po Chen
64eaa40781 select correct initial value (#566)
* select correct initial value

* Add test

* Update security_test.exs

* Update security_test.exs

* Update security_test.exs

* cleanup
2022-05-02 05:26:09 -07:00
Jamil
4acd54b050 Fixes for local development (#562)
* Fixes for local development

A few issues that I ran into getting this up on my local machine.
I also made sure it works now properly on Github Codespaces which
will hopefully make it easier for devs to get started.

- Username/Pass docs updated to correct values
- Add runtime.exs and migrate releases.exs over to it as recommended by
Elixir 1.11 release notes
- Update Endpoint to allow for proxy passed headers if enabled with
PROXY_FORWARDED
- Add missing .env file section to CONTRIBUTION
- Add a sample .env file (.env.sample) to help getting started
- Update docs to show how to use Github Codespaces with an external
URL.
- Remove unused alias from dev (which I think doesn't work anyway due to
compile time restrictions, only in runtime or releases.exs)
- Ensure pre-commit is in path and available on devcontainer
- Simplify some docker commands, remove unneeded ports.

* Update runtime.exs with resolved conflicts

Co-authored-by: Mark Percival <m@mdp.im>
2022-04-29 08:23:20 -07:00
Jamil
908cfc7dff 522/allow disabling of config creation (#559)
* Checkpoint

* Optionally hide device mgmt buttons
2022-04-27 15:20:33 -07:00
Jamil
2eb5a24a13 Add device descriptions (#557)
* Add device descriptions

Fixes #484

* Remove inaccurate test description
2022-04-27 09:34:07 -07:00
Jamil
0d3afc09a4 Process wg show ... dump (#546)
* Process wg show ... dump

* Add byte to human functions

* Passing tests

* Update stats

* drop session when signing out

* Start stats push service

* Sandbox config bool

* conver to int
2022-04-20 16:29:26 -07:00
Jamil
1740481055 Update public-facing links to firezone.dev (#548)
* Update public-facing links to firezone.dev

* Fix docs lint error

* Update docs Gemfile to latest gems

* Update npm packages
2022-04-20 06:43:55 -07:00
Jamil
2c5078e63f Add WireGuard preshared-keys to devices (#542)
* Add PSK support

* Add HTTP registered application name

* Better kernel check message

* Does order matter\?
2022-04-15 09:56:56 -07:00
Jamil
90521ccf02 Renew session before authenticating (#518)
* session fixes

* Build callback_url using Phoenix helpers

* Add email to unpriv device page
2022-04-06 14:29:52 -07:00
Jamil
4fa5bedf1b 500/fix redirect local auth (#509)
* Allow config of ext url; show this after create-admin

* Use opts for ueberauth

* weird nil error

* get_env vs fetch_env

* Use integer

* Try new external_url thingo

* Fix callback_url

* Fix path suffix

* Fix markdownlint hiccup

* fix create admin

* Differentiate phoenix_port

* cron note; installscript fix; minor fqdn fixes

* Send full node obj to app_env

* Add db pass to config file
2022-04-05 14:43:00 -07:00
Jamil
973d025b97 Fix vpn session screen (#496) 2022-03-04 16:24:12 -08:00
Jamil
4c3956b57e Rename config file to device name (#495)
* Rename config file to device name

* Add client instructions link

* Fix syntax error

* Remove extraneous sentence
2022-03-04 14:33:51 -08:00
Jamil
a91c2db887 0.3.0 (#465)
* Found endpoint empty bug

* Fix use_site_ bugs

* Generate private keys client-side instead of on the Firezone server (#451)

* Rename events; add crypto lib

* seemingly working keygen

* Checkpoint

* Remove private key from devices; make tests pass

* Refactor auth to use simplified new router helper

* Fix js bundle

* Refactor event listeners into their own file

* Refactor settings

* Fix JS

* Working live views in unprivileged sections

* Rough draft working

* Checkpoint before fixing tests

* Tests passing

* Max devices per user configuration option (#471)

* Max tunnels per user configuration option

* Clean up remaining tunnel references

* Replace local auth system with Ueberauth / Guardian (#475)

* Checkpoint working authentication

* Working admin and unprivileged auth using Guardian

* Remove Sessions cruft

* More cleanup

* load new secrets

* Remove firezone tmp dirs

* Okta and Google Oauth (#485)

* working oauth!

* Remove keycloak; working google

* Ensure nil to_s

* Passing tests

* Add compile-time prod config

* Fix live_view typo

* Revert key_ttl to vpn_session_duration

* print logs after first configure

* Use get_env/1 for fetching optional config vars

* Disable telemetry from config

* miss the to_s

* Fix sign in page

* add tunnel admin guide

* auth path

* Fix tests

* Device editing no more (#491)
2022-03-04 09:32:13 -08:00
Jamil
91d2c294dc Instruct user to reauthenticate (#487)
* Instruct user to reauthenticate

* Fix renamed routes
2022-03-02 13:37:02 -08:00
Jamil
ff15d491b8 Do conn check on boot (#464)
* Do conn check on boot

* Fix connectivity checks initialization
2022-02-20 09:58:16 -08:00
Jamil Bou Kheir
238d8da9e1 Increase password length requirements to 12 2022-02-07 16:21:23 -08:00
Jamil Bou Kheir
de0d10ed01 Update npm 2022-02-05 12:15:51 -08:00
Jamil Bou Kheir
a2bc25359a Rate limiting 2022-02-03 14:48:45 -08:00
Jamil Bou Kheir
986c310cdd Fix shareable links
Fixes #431
2022-02-02 17:07:25 -08:00
Jamil Bou Kheir
3cf9587334 disable connectivity checks for real 2022-02-01 09:14:35 -08:00
Jamil Bou Kheir
432c204280 Add telemetry fixes 2022-01-31 16:08:41 -08:00
Jamil Bou Kheir
cbb7667fce precommit run 2022-01-29 16:35:27 -08:00
Jamil
bfa02f1ca2 Merge pull request #422 from firezone/391/device_default_config
Expose more device defaults in config file
2022-01-27 15:51:10 -08:00
Jamil
ad9c7ff793 Merge pull request #421 from firezone/backlog/379/expose_db_connect_options
Expose more database connect options
2022-01-27 15:49:48 -08:00
Jamil Bou Kheir
7101503f4d Expose device defaults in config file 2022-01-27 15:10:20 -08:00
Jamil Bou Kheir
7026dd72c0 Add device default configs to config file 2022-01-26 18:42:31 -08:00
Jamil Bou Kheir
d181105f6c Ensure ssl app is started in migration 2022-01-26 13:42:04 -08:00
Jamil Bou Kheir
0e6b6f2ee1 Lead gen link 2022-01-26 11:22:53 -08:00
Jamil Bou Kheir
57d92f2fd1 SSO lead gen 2022-01-26 08:46:53 -08:00
Jamil Bou Kheir
053fe7661e Fix remote ip function match 2022-01-25 15:17:41 -08:00