Commit Graph

93 Commits

Author SHA1 Message Date
Paul Lorenz 4df6ae564d Update package paths for newly imported storage and ziti-db-explorer packages 2026-04-16 09:18:55 -04:00
Andrew Martinez dbeb5c9f46 fixes openziti/ziti#3673 purge expired revocations, fix revocation bugs (#3679)
- fixes RevokeToken double-write: adds return after JWTID-keyed revocation
    save, preventing fallthrough write with raw JWT string as unreachable key
  - fixes TerminateSession key mismatch: stores revocation by identityId alone,
    matching the Subject-based lookup in ValidateAccessToken
  - fixes RevocationDelete sync action: passes DataState_Delete instead of
    DataState_Create so routers evict the entry from their data model
  - adds RevocationManager.DeleteExpired: batch-deletes expired revocations in
    batches of 500 until none remain
  - adds RevocationEnforcer: periodic policy runner (every 1 minute) that calls
    DeleteExpired and records metrics

before test fixes
2026-03-11 20:33:38 -04:00
Paul Lorenz e1638173cd Fixes for SDK terminator management. Add support for ziti sdk inspection. Fixes #3609
- removes legacy v1 terminator code path; all terminators now use v2 flow
- refactors edgeTerminator.close() to decouple SDK notification from control plane notification
- adds pending SDK close notification queue with retry when channel is busy
- adds post-create inspect mechanism that verifies SDK still holds the bind after terminator creation
- queues second post-create inspect when establishment takes >30s to catch SDK timeout races
- detects and discards stale reordered binds on the same connection by comparing connIds
- re-establishes replacement terminators when a delete/create race is detected
- eliminates IsEntityPresent pre-filter in removeTerminatorsHandler to prevent raft ordering races
- fixes ValidateTerminators to query identities from the correct manager with the correct filter field
- adds postCreate flag to ValidateTerminatorsV2Request so routers skip redundant SDK inspect
- returns retry-later (nil result) from router validation when inspect is temporarily unavailable
- blocks SyncAllSubscribers until completion and guards RouterDataModel replacement with in-progress flag
- fixes InheritLocalData to enable service access tracking for all subscribed identities
- adds Services.Has check in GetServiceAccessPolicies to prevent false policy grants
- validates policy-to-identity associations in ValidateServicePolicies
- adds `ziti agent tunnel dump-sdk` command for SDK context inspection via IPC agent
- adds `ziti fabric inspect sdk` command to query SDK context through routers
- fixes --expected-per-host CLI flag binding in validate terminators command
- changes bind-access-lost retry hint from NotRetriable to RetryStartOver
- moves trace route response and xgress close handling off channel handler goroutine
- fixes listTerminators test helper to URL-encode filter parameter
- improves sdk-hosting-test validation resilience with login and query retries
- adds terminator_create_flow.md documenting the full lifecycle across SDK, router, and controller
- adds detailed logging for data model sync, service access tracking, and subscriber change detection
2026-03-11 13:10:28 -04:00
Paul Lorenz 90112219a3 Support multi-underlay control channels. Fixes #3550 2026-02-11 14:20:29 -05:00
Paul Lorenz 2ffc6e1151 Update ziti version to 2.0 2026-01-28 12:34:10 -05:00
Paul Lorenz c18a594b56 Clustering coordination fixes
* Allow routers to request current cluster membership information. Fixes #3503
* Get cluster membership information from raft directly, rather than trying to cache it in the DB. Fixes #3501
* Set a router data model timeline when initializing a new HA setup, rather than letting it stay blank. Fixes #3500
* Reduce router data model full state updates. Fixes #3504
2026-01-17 02:03:31 -05:00
Paul Lorenz e0315599db Only send model updates on resubscribe if the RDM index has advanced. Fixes #3469 2025-12-19 14:03:09 -05:00
Paul Lorenz a18073160c remove debug output 2025-12-03 16:30:45 -05:00
Paul Lorenz d37c721c83 Optimize router data model subscription code. Add additional events. Fixes #3359 2025-12-02 11:37:38 -05:00
Andrew Martinez bb5cc51a97 adds posture cache, instance, instance data, and event hooks (#3267)
* adds posture cache, instance, instance data, and event hooks

- reworks router security
- abstracts api session and service sessions
- use connection tracker instead of various maps
- doc
- adds service sessions as always JWTs
- addes token logging fields
- removes multiple connection tracking fields
- adds support for router specific posture data/respones
- adds support for router posture check evaluation
- defer dial/bind posture checking for legacy to controller
- fix double session event emitting
- fix session event missing id
2025-10-15 14:01:56 -04:00
Andrew Martinez e01944aba2 fix #3241 fix unsafe nil fingerprint dereference (#3242)
* fix #3241 fix unsafe nil fingerprint dereference

- panic when a router connects and disconnects quickly or fails to
  authenticate
- add safe access
- add an additional safe deref during connect
2025-09-04 14:45:49 -04:00
Paul Lorenz e647d67325 Update to channel/v4 2025-04-02 15:28:59 -04:00
Paul Lorenz f79f777d33 Fix router data model 'create public key' related errors. Fixes #2932 2025-03-28 23:57:39 -04:00
Paul Lorenz ec57c80ff7 ER/T Hosting HA chaos test and fixes (#2806)
* Add ERT hosting chaos test. Also add ert terminator validation utility. Fixes #2288

* Rework ER/T terminator management based on SDK terminator management code

* Update deps

* Make sdk/ert-terminators into a constant
2025-02-25 17:02:21 -05:00
Paul Lorenz 03870760c3 Ensure restores and migrations work properly with RDM. Add restore from db for HA Clusters. Fixes #2549. Fixes #2649. Fixes #2707 2025-01-31 13:57:43 -05:00
Paul Lorenz 5429ce5064 Separate leader updates from controller cluster member updates 2025-01-09 16:18:34 -05:00
Paul Lorenz 84fba8a3e5 Logging tweaks and add missing code in factory_wrapper 2025-01-08 15:48:45 -05:00
Paul Lorenz a4d66f863b Switch router storage to serialized protobuf, rather than json 2025-01-07 19:23:06 -05:00
Paul Lorenz b9ed77e706 Fix concurrency issues. Add posture check verification. 2025-01-07 19:22:47 -05:00
Paul Lorenz c404a3a5bd Add config/config type tests for router data model 2025-01-07 19:22:47 -05:00
Paul Lorenz d84292cfd9 Fix tests 2025-01-07 19:22:47 -05:00
Paul Lorenz 37a80da89b Add RDM config, including a ctrl side disable flag. Fixes #2596 2025-01-07 19:22:47 -05:00
Paul Lorenz a34478bb06 Fix controller endpoint updates and update deps. Test RDM with HA. 2025-01-07 19:22:46 -05:00
Paul Lorenz 6517a7c22f Move routers to a subscription model where they subcribe to model data from one controller for a limited time. Fixes #2599 2025-01-07 19:21:53 -05:00
Paul Lorenz e16f97a7ea Router data model fixes. Add standard error when no leader is present. Fixes #2232 2025-01-07 19:21:53 -05:00
Paul Lorenz e09c56867c Remove HA config from router. Fixes #2566 2025-01-07 19:21:53 -05:00
Paul Lorenz 29a199ce12 Add router data model chaos test. Fixes #2550 2025-01-07 19:21:53 -05:00
Paul Lorenz 16f0a858e6 Add controller connect events. Fixes #1835. Fixes #2234 2024-11-01 15:21:01 -04:00
Paul Lorenz cccf0c06af Update to channel/v3. Fixes #2390 2024-09-09 12:23:25 -04:00
Paul Lorenz f731405ac0 Re-enable xgress MTU, with 0 disabling chunking. Implement frame when chunked. Fixes #2336 2024-08-21 12:24:00 -04:00
Paul Lorenz 0945427320 Migrated edge router tunneler code to use the router data model. Fixes #2121 2024-07-26 17:06:01 -04:00
Paul Lorenz 77d27ca781 Enhance the router data model with config information, fixes #2010 Add subscription model to router data model, fixes #1990 2024-07-17 14:31:39 -04:00
Paul Lorenz c3b43133d1 Merge fabric and controller model code. Fixes #2205 2024-07-09 16:11:01 -04:00
Andrew Martinez 9cb11be544 fixes standalone OIDC where the server JWT signer token was not added 2024-06-11 14:06:06 -04:00
Paul Lorenz 898e41ae2a Implement router data model changesets. Fixes #1966 2024-04-23 11:56:10 -04:00
Paul Lorenz 32d743ff11 Update router data model with: add service policy type, flesh out identity. Fixes #1950 Fixes #1951 2024-04-17 14:57:20 -04:00
Paul Lorenz d62e3cb71f Use cmap IterCB instead of IterBuffered where possible. Fixes #1902 2024-04-04 21:27:38 -04:00
Andrew Martinez e59f9b8d66 fix LoadOneById name change 2024-03-26 11:00:15 -04:00
Andrew Martinez 8c7b3b2e84 reduces prerms from admin to authenticated on list controllers
- updated public key sync to use controller list data instead of mesh peer
- fixes perms on controller list to not be admin only
2024-03-26 10:55:50 -04:00
Paul Lorenz 3cdb009aea Merge pull request #1853 from openziti/fix-db-validation
Fix validation perf. Fixes #1428. Remove duplicate LoadOneById method.
2024-03-21 13:51:02 -04:00
Paul Lorenz 881ec14b63 Fix validation perf. Fixes #1428. Remove duplicate LoadOneById method. 2024-03-21 10:10:07 -04:00
Paul Lorenz 1e17a70d3f Don't allow session sync to block channel. Fixes #1849 2024-03-20 14:02:18 -04:00
Andrew Martinez a3c3da870f pr changes, fixes revocation events 2024-03-05 09:48:13 -05:00
Andrew Martinez 401de61bbc spelling errors 2024-02-29 10:06:22 -05:00
Andrew Martinez 09542c7728 consolidated ha changes 2024-02-29 09:27:56 -05:00
Paul Lorenz a84369a6e9 Consolidate fabric and edge persistence code. Fixes #1555 2023-12-06 17:36:37 -05:00
Paul Lorenz b270d18faf Add additional logging. Remove unnecessary router lookups. May address #1460 2023-10-31 14:57:06 -04:00
Paul Lorenz f3d67b7f49 Update fabric imports 2023-09-28 23:34:28 -04:00
Paul Lorenz 07da3cd513 Merge remote-tracking branch 'edge/main' into merge-edge
Updated package names
Merged golangci-lint configurations
2023-09-27 16:54:53 -04:00
Paul Lorenz 5b59ae13ee Update for moved packages in fabric 2023-08-23 09:40:05 -04:00