27 Commits
Author SHA1 Message Date
Grant Limberg fcb016b9c1 standardize log formatting across the controller 2026-06-17 16:20:17 -07:00
Grant Limberg 75b51ec229 Ensure everything in nonfree/controller has the proper header comment
pointing to LICENSE.TXT
2026-06-17 13:50:44 -07:00
Grant Limberg 8271fcadf2 Pubsub devlivery reliability updates 2026-06-17 09:12:15 -07:00
Grant Limberg 346dc907a1 remove noisy log 2026-05-28 08:03:07 -07:00
Grant Limberg ac20c320cf update network.proto in line with CV1 and CV2 2026-05-14 13:07:13 -07:00
Grant Limberg 1c755845f0 align JSON keys between CentralDB and PubSub listener/writer
- Default enableBroadcast to true on load (initializeNetworks and _getNetwork) to match DB::initNetwork. Networks whose JSONB lacks the field now get broadcast on instead of off, which is the documented ZeroTier default.

- Stop overwriting networks_ctl.frontend on every UPDATE. It should remain whatever was set at INSERT. The early-exit guard already prevents cross-frontend writes from applying, so dropping the SET preserves correctness. Members are unaffected — they source frontend from the network row, not the change payload.

- Add enableBroadcast, creationTime, and revision to PubSubListener's network toJson. The protobuf carries them, but the listener was dropping them on inbound, which caused revision to reset on every PubSub-delivered network update.

- Rename member version keys to vMajor/vMinor/vRev/vProto in both PubSubListener (incoming) and PubSubWriter (outgoing). CentralDB, EmbeddedNetworkController, and the rest of the codebase already use these names; the listener/writer were the only sites using versionMajor/Minor/Rev/Protocol, so member version info was being silently dropped through PubSub in both directions.

- Pass newMember by const reference in ControllerChangeNotifier::notifyMemberChange to match notifyNetworkChange. Avoids a full JSON copy on every member notify.

- Remove duplicate nlohmann::json::parse call in RedisNetworkListener.
2026-05-13 11:01:39 -07:00
Grant Limberg 7b44e0a3a5 Fix json key inconsistency in pubsub writer 2026-05-13 10:40:02 -07:00
Grant Limberg f0522a7cdb fix a typo in some json handling that could be affecting an issue I'm tracking down 2026-05-08 10:58:05 -07:00
Grant Limberg 895b06033d temporary logging 2026-03-31 10:56:04 -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 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 30c4484731 Set ordering key on pubsub message publishing. 2025-10-27 11:01:36 +01:00
Grant Limberg a75d06ad64 cleaning up some gross JSON code 2025-10-02 11:35:03 -07:00
Grant Limberg 4861b7df1e one last json parsing fix. but really this time 2025-10-01 17:18:31 -07:00
Grant Limberg 3bbf194594 pubsub writer should work now 2025-10-01 16:25:27 -07:00
Grant Limberg fb75369597 throwing stuff at the wall cuz I can't actually debug this right now 2025-10-01 16:08:06 -07:00
Grant Limberg a8b5c89efa think this is where things are crashing, but I'm not sure why yet. Comment it out to make sure 2025-10-01 15:05:34 -07:00
Grant Limberg 80f82132dd fix tags/capabilities? 2025-10-01 14:00:17 -07:00
Grant Limberg 7faf705e10 make the default an empty array here 2025-10-01 13:33:02 -07:00
Grant Limberg 1f557b516f more debug output 2025-10-01 13:30:25 -07:00
Grant Limberg 97d20a1155 more logging for errors on pubsub listener 2025-09-30 10:32:21 -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 012443acfa wire up pubsub notifications from controller to frontend 2025-09-08 16:01:50 -07:00
Grant Limberg 190d836b42 alloc meatadata with new so pubsub can delete it 2025-09-08 09:49:26 -07:00