Commit graph

44 commits

Author SHA1 Message Date
Grant Limberg
af7eae5d9e
Added a little bit more logging for the node checkin/bigtable write process 2026-04-03 09:52:55 -07:00
Grant Limberg
ea5c91b0e9
Remove smee from CentralDB.
Now handled in CV1 on new member join via pubsub integration when a new member comes through
2026-04-02 10:04:23 -07:00
Grant Limberg
20f7311622
Skip redundant nonce sending with an expiry time of 0 2026-04-01 09:48:05 -07:00
Grant Limberg
dd6e69f530
sso query fix in controller 2026-03-31 14:04:30 -07:00
Grant Limberg
b047038ca1
print a message when the SSO PSK is configured 2026-03-31 08:48:00 -07:00
Grant Limberg
2c57f85e25 add assigned_central_version column to controllers_ctl
Allow controllers to advertise which central version (cv1, cv2, or all)
they are assigned to handle via a new configurable field. The value is
persisted to the database on each heartbeat and validated at startup
against the DB CHECK constraint.
2026-03-17 16:30:25 -07:00
Grant Limberg
a840b94e0d add SSO nonce/auth PubSub messaging with frontend routing
Publish CTL_NONCE_UPDATE to PubSub when nonces are created or reused in
getSSOAuthInfo(), with the network's frontend as a message attribute so
only the correct CV frontend receives it. Listen for ZT1_AUTH_UPDATE
messages and update sso_expiry.authentication_expiry_time accordingly,
with a network existence check before applying.

- Add sso_send_topic/sso_recv_topic to PubSubConfig
- Add PubSubWriter::publishSSONonceUpdate() with frontend param
- Add PubSubSSOListener class for inbound auth updates
- Rename CV1_AUTH_UPDATE to ZT1_AUTH_UPDATE in sso.proto
- Fix pre-existing connection pool leak in getSSOAuthInfo() catch block
2026-03-17 14:42:49 -07:00
Grant Limberg
03aa33bba7 set network member frontend based on the network its a member of 2026-03-12 09:20:05 -07:00
Grant Limberg
c653e764b8
WIP: Update sso info retrieval method 2026-02-24 14:01:33 -08:00
Grant Limberg
ccb9a45d21
Remove extra verbose logging from controller 2026-01-23 11:53:06 -08:00
Grant Limberg
5c27068b80
Enable cross-service propagation of otel trace metadata 2025-10-30 13:47:50 +01:00
Grant Limberg
76ba89060b
ensure change source is controller if otherwise unset 2025-10-09 16:29:43 -07:00
Grant Limberg
fe221b9359
debug output for IP addressing & fixing order of operations in a couple of places. Only send notification of a change to pubsub after it's been written to the DB 2025-10-06 14:24:57 -07:00
Grant Limberg
1ef7ea0fe6
Fixing more JSON issues 2025-10-02 15:04:57 -07:00
Grant Limberg
0d21250b62
one last json parsing fix 2025-10-01 16:33:17 -07:00
Grant Limberg
1f557b516f
more debug output 2025-10-01 13:30:25 -07:00
Grant Limberg
aecd7fdace
more logging 2025-10-01 13:13:58 -07:00
Grant Limberg
dad1a1eda6
more logging 2025-10-01 13:12:45 -07:00
Grant Limberg
f028213c7f
debug output 2025-10-01 12:40:50 -07:00
Grant Limberg
20a67ab1de
fix attempted null -> string conversion 2025-10-01 08:06:40 -07:00
Grant Limberg
315bf240fc json field fix 2025-09-25 16:34:08 -07:00
Grant Limberg
c6b7c263d2 query fix for new networks 2025-09-25 16:09:57 -07:00
Grant Limberg
069d7c1862 set objtype on messages received via PubSub 2025-09-25 15:14:30 -07:00
Grant Limberg
6113bad61e make pubsub topics configurable
Also for pubsub trips back to CV1/CV2, rather than having 2 queues for each service (networks & members), theres now only a single queue for each change type, and `frontend = (cv1|cv2)` attribute is set on the message for filtering.
2025-09-18 09:33:04 -07:00
Grant Limberg
493cc4fe4f fix version string 2025-09-10 08:13:56 -07:00
Grant Limberg
7aa451bec1 clean up deprecation warnings in pqxx 2025-09-10 07:43:21 -07:00
Grant Limberg
012443acfa wire up pubsub notifications from controller to frontend 2025-09-08 16:01:50 -07:00
Grant Limberg
ee87eb3101 removing some log output 2025-09-08 11:34:03 -07:00
Grant Limberg
1ba4ccd98d pass version info to status writer 2025-09-08 10:46:01 -07:00
Grant Limberg
3d72a43a19
misc bugfixes 2025-09-06 12:37:28 -07:00
Grant Limberg
024824c2fe wire up pubsub outgoing status changes from controller -> CV2 2025-09-05 14:52:16 -07:00
Grant Limberg
74f0525470 Add frontend column to networks & network_memberships tables so the controller knows which system owns the networks & members 2025-09-05 08:43:06 -07:00
Grant Limberg
282d7c7f9d another fix 2025-09-04 17:45:38 -07:00
Grant Limberg
48ff61b392 fix 2025-09-04 17:28:14 -07:00
Grant Limberg
a061c86594 fix 2025-09-04 17:00:15 -07:00
Grant Limberg
a18e370d48 another query fix 2025-09-04 16:31:16 -07:00
Grant Limberg
e9565cf97c another query fix 2025-09-04 16:12:21 -07:00
Grant Limberg
3b7958aec1 another query fix 2025-09-04 16:07:28 -07:00
Grant Limberg
20746b2754 query fix 2025-09-04 15:41:33 -07:00
Grant Limberg
f33e706887 get a running controller in docker 2025-09-04 11:42:53 -07:00
Grant Limberg
686653509a debug printf 2025-09-04 11:27:59 -07:00
Grant Limberg
0753556aa3 wire up configuration.
New config block in local.conf for controllers:

```
{
  "settings": {
    ...standard zt1 local.conf settings...
  },
  "controller": {
    "listenMode": (pgsql|redis|pubsub),
    "statusMode": (pgsql|redis|bigtable),
    "redis": {
      "hostname": ...,
      "port": 6379,
      "clusterMode": true
    },
    "pubsub": {
      "project_id": <gcp-project-id>
    },
    "bigtable": {
      "project_id": <gcp-project-id>,
      "instance_id": <bigtable-instance-id>,
      "table_id": <bigtable-table-id>
    }
  }
}
```
2025-09-02 14:06:24 -07:00
Grant Limberg
a5bd262b3a Wiring through initialization of the CentralDB version of the controller
Still need to do the actual configuration from local.conf
2025-09-02 13:30:08 -07:00
Grant Limberg
195d5b47f0 Merge branch 'adam/1.16' into gl/ctl-pubsub 2025-09-01 16:47:55 -07:00