Commit Graph

62 Commits

Author SHA1 Message Date
Chris Guida
502b179eef add .embassy domains to system-generated ssl certs (#1052) 2022-01-21 20:35:52 -07:00
Keagan McClelland
da9fa31cff destroy all warnings
make idiomatic binding elision

remove unused struct line item

put back warning about not handling mdns errors T.T
2022-01-21 20:35:52 -07:00
Keagan McClelland
adeaabfa5f fixes an issue where if a package had multiple port mappings, only the last one would get an nginx config
include the nginx paths when *removing* a package
2022-01-21 20:35:52 -07:00
J M
1086ce13d2 feature: Swapping to use nmcli (#1015)
The reason is that we get better errors and that we get signal strength.
Reworking all the commands to use nmcli instead.
Feat: Wifi List Available
Feat: strength sort for available
fix: Backend to match the frontend asking
feat: New get with all information
chore: Make backend changing country not for NonWire

Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>

Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
2022-01-21 20:35:52 -07:00
Keagan McClelland
c38d6083aa remove unnecessarily revealing information in log messages that may be exported to the log server 2022-01-21 20:35:52 -07:00
Aiden McClelland
dbc159c82e use ipv4 for mdns lookups 2022-01-21 20:35:52 -07:00
J M
fb8c5edc13 fix: Sorta crash found in synapse
Fixes: https://github.com/Start9Labs/synapse-wrapper/issues/18

So the issue found was that we where during a startup it "crashes", but not really.
2022-01-21 20:35:52 -07:00
Aiden McClelland
60a48d7af2 allow mdns cifs shares (#933)
* allow mdns cifs shares

* regex and messaging for cifs

* Update install-wizard.component.ts

* refactor

* always include leading slash when saving path

* add avahi-utils

Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
2022-01-21 20:35:52 -07:00
Aiden McClelland
e6fb74a800 Feature/cloud backups (#889)
* cifs for cloud backups on lan

* password spelling fix

* fix spelling and fix rpc method

* fix other methods

* remove old code and rename method

* add support for cifs backup targets

wip

cifs api

simplify idiom

add doc comment

wip

wip

should work™

* add password hash to server info

* fix type

* fix types for cifs

* minor fixes for cifs feature

* fix rpc structure

* fix copy, address some TODOs

* add subcommand

* backup path and navigation

* wizard edits

* rebased success page

* wiz conflicts resolved

* current change actually

* only unsub if done

* no fileter if necessary

* fix copy for cifs old password

* setup complete (#913)

* setup complete

* minor fixes

* setup.complete

* complete bool

* setup-wizard: complete boolean

Co-authored-by: Matt Hill <matthewonthemoon@gmail.com>
Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com>
2022-01-21 20:35:52 -07:00
Keagan McClelland
13c227399b Bugfix/wifi race conditions (#831)
* puts wifi manager behind mutex

* remove commented code

* use rwlocks instead of mutexes to allow for better interlocking
2022-01-21 20:35:52 -07:00
Aiden McClelland
071f6cec03 stability fixes 2022-01-21 20:35:52 -07:00
Keagan McClelland
c2513f0dba implement cert download endpoint (#794)
* implement cert download endpoint

* Apply suggestions from code review

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
2022-01-21 20:35:52 -07:00
Keagan McClelland
c723ee6a15 Feature/always gen certs (#784)
* move SslManager to NetController and out of NginxController

* always generate the certs, move that functionality to the net controller before any nginx configs are written

* add info log

* refactor to make net controller not responsible for nginx stuff

* diff minimization

* diff minimization

* diff minimization

* diff minimization

* use net controller cert path instead of nginx controller cert path

* remove unused imports

* move location of cert mounts
2022-01-21 20:35:52 -07:00
Keagan McClelland
9f3909188a fixes leaf certs to use leaf cert extensions (#776)
* fixes leaf certs to use leaf cert extensions

* adds CN to SAN because Firefox is a fussbucket
2022-01-21 20:35:52 -07:00
Keagan McClelland
2660437e78 start dhclient 2022-01-21 20:35:52 -07:00
Keagan McClelland
87c10b7fbe sub ifupdown for ifconfig to save cpu power 2022-01-21 20:35:52 -07:00
Aiden McClelland
8056285a7f Backups Rework (#698)
* wip: Backup al

* wip: Backup

* backup code complete

* wip

* wip

* update types

* wip

* fix errors

* Backups wizard (#699)

* backup adjustments

* fix endpoint arg

* Update prod-key-modal.page.ts

Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>

* build errs addressed

* working

* update backup command input, nix, and apk add

* add ecryptfs-utils

* fix build

* wip

* fixes for macos

* more mac magic

* fix typo

* working

* fixes after rebase

* chore: remove unused imports

Co-authored-by: Justin Miller <dragondef@gmail.com>
Co-authored-by: Drew Ansbacher <drew.ansbacher@gmail.com>
Co-authored-by: Drew Ansbacher <drew.ansbacher@spiredigital.com>
Co-authored-by: Lucy Cifferello <12953208+elvece@users.noreply.github.com>
2022-01-21 20:35:52 -07:00
Keagan McClelland
9c1d2ed96d Bugfix/service misdirection (#711) 2022-01-21 20:35:52 -07:00
Keagan McClelland
f7465da797 Certificate Imports/Exports (#687)
* allows for root/int certificate imports, certain invariants are not checked at this time

* refactor ssl module to only import root certificate

* implements certificate export, propagates import functionality all the way to NetController::init
2022-01-21 20:35:52 -07:00
Keagan McClelland
c88bb11107 fix issue where we would attempt to remove ssl directory regardless of whether or not we created it (#664) 2022-01-21 20:35:52 -07:00
Lucy Cifferello
7adb66cf4c add spantrace debug logs 2022-01-21 20:35:52 -07:00
Keagan McClelland
0a4f60ae26 actually update ssl certificate in persistence when we are within the expiration window. 2022-01-21 20:35:52 -07:00
Aiden McClelland
69382f788d instrument all the things 2022-01-21 20:35:52 -07:00
Keagan McClelland
3f30905786 Bugfix/wifi init (#619)
* initializes wifi system correctly

* add packages to initialization

* restart wpa_supplicant after conf file is sync'ed

* fix cli rendering for set_network

* debug statements

* more debug stuff, trim network id on return

* possibly solves all dhcp problems on startup, I wish I understood better why it starts by default for eth0 but not wlan0

* make consistent with new logging
2022-01-21 20:35:52 -07:00
Justin Miller
c3ac27865d chore: Get the tracing in 2022-01-21 20:35:52 -07:00
Justin Miller
81164f974f chore: moving to color_eyre 2022-01-21 20:35:52 -07:00
Keagan McClelland
e9e1f1608f fixes certificate directory mount 2022-01-21 20:35:52 -07:00
Keagan McClelland
ec47437a07 isolates ssl directories 2022-01-21 20:35:52 -07:00
Keagan McClelland
f9e0fe8fc8 write nginx conf that uses ssl information, add main ui config to Ngi… (#591)
* write nginx conf that uses ssl information, add main ui config to Nginx init method

* fix nginx config for main service

* add ssl to ipv6 config
2022-01-21 20:35:52 -07:00
Keagan McClelland
953e22080f adds debug statement 2022-01-21 20:35:52 -07:00
Keagan McClelland
fb83a3ebe6 change proxy method for tor health check 2022-01-21 20:35:52 -07:00
Keagan McClelland
255daf01b7 fixes log statement for mdns 2022-01-21 20:35:52 -07:00
Keagan McClelland
7f107efbf3 Bugfix/mdns sync semantics (#550)
* fixes issue where mdns.sync would reset the entry group without readding the original A record, causing CNAME's to point to nothing

* make analyzer mad to make cargo happy

* please both analyzer and cargo

* debug logs

* demote successful healthcheck logs to trace since they happen once every second

* I have no words for this commit message

* 2 is 3
2022-01-21 20:35:52 -07:00
Aiden McClelland
7622616856 prefer btreemap over hashmap 2022-01-21 20:35:52 -07:00
Aiden McClelland
1a86f393d6 use btreemap instead of indexmap
to establish canonical lock ordering
2022-01-21 20:35:52 -07:00
Keagan McClelland
f9d91b3cfb adds context to filesystem calls for nginx 2022-01-21 20:35:52 -07:00
Keagan McClelland
68fbc34bce Feature/nginx management (#483)
* Implements nginx controller and initialization

* adds nginx controller add to netmod add

* adds nginx remove to netmod remove

* fix code review issues
2022-01-21 20:35:52 -07:00
Keagan McClelland
561e09016d Feature/wifi sync (#446)
* Synchronizes Wifi config during the 'embassy-init' startup sequence

* Apply suggestions from code review

make directories polymorphic over AsRef

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>

* make resilient to existing symlink

* make this more idiomatic

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
Co-authored-by: Aiden McClelland <me@drbonez.dev>
2022-01-21 20:35:52 -07:00
Keagan McClelland
c91790d1eb Feature/ssl cert management (#442)
* Adds core logic API for SSL Certificate Management

* Update appmgr/src/net/ssl.rs

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
2022-01-21 20:35:52 -07:00
Aiden McClelland
0847389cd1 purge the word app 2022-01-21 20:35:52 -07:00
Aiden McClelland
45d945db2e fix tor addressing for realzies 2022-01-21 20:35:52 -07:00
Aiden McClelland
296c2a98c3 fix tor address field on update 2022-01-21 20:35:52 -07:00
Aiden McClelland
ccf505d0d3 misc fixes 2022-01-21 20:35:52 -07:00
Aiden McClelland
3877e43b84 configure datadir on context 2022-01-21 20:35:52 -07:00
Aiden McClelland
5d44519d0d fix warnings 2022-01-21 20:35:52 -07:00
Aiden McClelland
e9faf1f74d misc fixes 2022-01-21 20:35:52 -07:00
Aiden McClelland
9fb02c6a1e overhaul context 2022-01-21 20:35:52 -07:00
Aiden McClelland
6093518e46 load os tor key from db 2022-01-21 20:35:52 -07:00
Keagan McClelland
982ebc01a4 Feature/tor health checks (#426)
* wip

* wraps up core tor health check feature, still need to fix the boundaries with the rest of embassyd

* need to please borrow checker

* please the borrow checker

* wire it in

* finishes the feature

* Apply suggestions from code review

* fixes tor restart functionality

* makes tor replacement more resilient, adds embassyd service in init and replace
2022-01-21 20:35:52 -07:00
Keagan McClelland
6c7dc71ed4 Feature/wifi (#409)
* initial commit for wifi feature

* implements wifi.get

* implements signal strength, removes macro system, makes compatible with rust stable

* remove selected row from wifi info

* refactor to correctly use rpc-toolkit

* remove redundant line from invoke error rendering

* Apply suggestions from code review

* adds display for wifi.get

* use invoke

* use remove

* use tokio native timeout

* use correct null output

* Apply suggestions from code review

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>

* fix borrowing issues

Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
2022-01-21 20:35:52 -07:00