Commit Graph

37 Commits

Author SHA1 Message Date
Grant Limberg
17f6b3a10b
central controller metrics & request path updates (#2012)
* internal db metrics

* use shared mutexes for read/write locks

* remove this lock. only used for a metric

* more metrics

* remove exploratory metrics

place controller request benchmarks behind ifdef
2023-05-23 12:11:26 -07:00
Grant Limberg
8e6e4ede6d
Add prometheus metrics for Central controllers (#1969)
* add header-only prometheus lib to ext

* rename folder

* Undo rename directory

* prometheus simpleapi included on mac & linux

* wip

* wire up some controller stats

* Get windows building with prometheus

* bsd build flags for prometheus

* Fix multiple network join from environment entrypoint.sh.release (#1961)

* _bond_m guards _bond, not _paths_m (#1965)

* Fix: warning: mutex '_aqm_m' is not held on every path through here [-Wthread-safety-analysis] (#1964)

* Serve prom metrics from /metrics endpoint

* Add prom metrics for Central controller specific things

* reorganize metric initialization

* testing out a labled gauge on Networks

* increment error counter on throw

* Consolidate metrics definitions

Put all metric definitions into node/Metrics.hpp.  Accessed as needed
from there.

* Revert "testing out a labled gauge on Networks"

This reverts commit 499ed6d95e.

* still blows up but adding to the record for completeness right now

* Fix runtime issues with metrics

* Add metrics files to visual studio project

* Missed an "extern"

* add copyright headers to new files

* Add metrics for sent/received bytes (total)

* put /metrics endpoint behind auth

* sendto returns int on Win32

---------

Co-authored-by: Leonardo Amaral <leleobhz@users.noreply.github.com>
Co-authored-by: Brenton Bostick <bostick@gmail.com>
2023-04-21 12:12:43 -07:00
Grant Limberg
0ae09577f6
Client & Central Controller updates to support additonal OIDC features (#1848)
Client side:
* Fix compatibility with OneLogin
* Requested scopes vary by OIDC provider. Different providers have different

Controller side:
*Update Postgres queries to latest Central schema
* Added Central Controller support for the different providers
* Base OIDC provider details are still attached to an org. Client ID & group/email lists are now associated with individual networks.
2023-01-19 15:39:15 -08:00
Grant Limberg
b65c1ed3a0
Add inja
Requries update to C++17 standard
2022-05-13 09:34:15 -07:00
Adam Ierymenko
cb086ff97f
Simplify SSO logic. SSO should just normally expire when it expires. No full deauth needed. Deauth is for really giving someone the boot. 2022-04-18 16:32:05 -04:00
Grant Limberg
fa21fdc1cc
rename stuff for clarity
authenticationURL will still be used by the client for v1 and v2 of sso
2021-11-11 16:19:26 -08:00
Grant Limberg
8d39c9a861
plumbing full flow from controller -> client network 2021-11-04 15:40:08 -07:00
Adam Ierymenko
576b4f03a5
Adjust deauth time window and send revocation when SSO members expire. 2021-08-18 12:17:40 -04:00
Adam Ierymenko
c101d71d7c
Tweak auth timeout notify. 2021-07-30 18:44:34 -04:00
Adam Ierymenko
efe0e8aa7b
Notification of about-to-expire status... almost there. 2021-07-23 19:05:59 -04:00
Adam Ierymenko
34de579c91
Handling of soon-to-expire members 2021-07-23 18:49:00 -04:00
Grant Limberg
e6b4fb5af7
add "ssoRedirectURL" to local.conf
plumbed it through to the central controller code
2021-06-04 16:29:03 -07:00
Grant Limberg
4f521baafd
Big SSO update
make things hopefully work
2021-06-03 14:38:26 -07:00
Grant Limberg
19f4146aca
make DB::_memberChanged and _networkChanged virtual 2021-06-02 13:46:11 -07:00
Adam Ierymenko
c470c6255e
Postgres code for SSO (almost certainly needs work) 2021-05-28 17:08:24 -04:00
Adam Ierymenko
06730c7d1d BSL date bump 2020-08-20 12:51:39 -07:00
Adam Ierymenko
52a166a71f
Relicense: GPLv3 -> ZeroTier BSL 1.1 2019-08-23 09:23:39 -07:00
Adam Ierymenko
55087521f6
Add periodic sync check when syncing LF<>another DB 2019-08-08 17:20:50 -05:00
Adam Ierymenko
28d0070ce2
Fix race in multiple DB mirroring configurations. 2019-08-08 15:29:13 -05:00
Adam Ierymenko
9cc76d1115
Remove debug line 2019-08-06 11:01:08 -05:00
Adam Ierymenko
00fb9c475e
More work on DB mirroring. 2019-08-06 10:42:54 -05:00
Adam Ierymenko
3c776675b3
Cruftectomy, work in progress on mirrorring 2019-08-06 08:51:23 -05:00
Adam Ierymenko
37d508ab96
Refactoring in prep for mirroring 2019-08-06 07:51:50 -05:00
Adam Ierymenko
a77b4ecddb Add optional function in DB change listener for member online events. 2019-08-04 19:55:52 -07:00
Adam Ierymenko
f6b080b8a2 Abstract out change listener from controller itself to permit DBs to shadow changes from other DBs. 2019-07-26 17:39:00 -07:00
Adam Ierymenko
bdc2ec1f5e Track online status in FileDB 2019-07-15 15:27:53 -05:00
Joseph Henry
0e597191b8 Updated licenses for 2019 2019-01-14 10:25:53 -08:00
Grant Limberg
1c86f25fab update # of threads for Postgres 2018-12-06 13:08:31 -08:00
Adam Ierymenko
f94aea8119 Return error 503 if RethinkDB is down when built as RethinkDB-based controller. 2018-07-11 10:42:31 -07:00
Adam Ierymenko
574b24c082 docs 2018-03-08 22:41:42 -08:00
Adam Ierymenko
57b96af2c4 Fix for FileDB _networkChanged / _memberChanged problem. 2018-03-08 22:33:08 -08:00
Adam Ierymenko
9bab49d2f9 Move DB stuff into Db. 2018-01-09 12:39:25 -08:00
Adam Ierymenko
8d9464c414 docs, and make RethinkDB controller DB driver upsert into the Controller DB and also update the hostname field. 2017-12-07 13:39:25 -08:00
Adam Ierymenko
f7f658605d Move more ephemeral stuff to a tiny MemberLastRequest table instead of the main Member table. 2017-11-08 20:19:46 -05:00
Adam Ierymenko
c12b68a6b2 More Central work. 2017-11-08 11:32:01 -08:00
Adam Ierymenko
4166d8ca35 Fix a deadlock and some more work on RethinkDB (for central) integration. 2017-11-08 11:06:14 -08:00
Adam Ierymenko
1613f42d00 Re-integrate in-filesystem DB into new controller DB structure. 2017-11-07 14:44:46 -08:00