Commit Graph

150 Commits

Author SHA1 Message Date
Paul Lorenz 187aa11f24 Own the metrics wire format in ziti. Fixes #4036
- adds a common/servermetrics package that owns the metrics MetricsMessage wire
  format and the reporting/usage subsystem (message builder, usage registry,
  interval and usage counters), wrapping the openziti/metrics Registry for
  metric collection
- moves the controllers metrics reporter into the router package and removes it
  from the shared metrics package, breaking a common -> router/env import cycle
- repoints controller and router consumers to common/servermetrics; base metric
  collection stays on openziti/metrics
- keeps the proto field numbers and the metrics content-type identical so the
  encoding is byte-compatible across the move, and uses a distinct proto package
  name so ziti's and the library's messages coexist without a global proto
  registry clash
- adds a round-trip test asserting wire compatibility with the library's
  MetricsMessage
- leaves openziti/metrics unchanged, so sdk-golang and the shared xgress data
  plane are unaffected
2026-06-29 22:37:25 -04:00
Paul Lorenz 1c877e2501 Migrate to channel/v5 deferred-ack accept API. For #3983
- switches the xlink transport and router ctrl listeners to NewClassicListenerWithAcceptor, passing the MultiListener as a HelloAcceptor
- replaces the controller ctrl channel's NewClassicListener/UnderlayDispatcher wiring with NewClassicListenerWithAcceptor and a TypeRoutingAcceptor, adapting the mesh acceptor via AsHelloAcceptor
- removes the multiListenerAcceptor wrapper now that MultiListener implements HelloAcceptor directly
- removes the xgress_edge Acceptor.Run Create-loop, handing underlays to the MultiListener through the acceptor-based listener
- moves the controller ctrl connect handler into ListenerConfig.ConnectionHandlers
- updates ctrlchan channel tests to the new constructor
2026-06-18 12:51:02 -04:00
Paul Lorenz 1c122af490 Rewrite channel/v4 imports to channel/v5. For #3983
- moves the channel dependency to channel/v5 v5.0.10 and sdk-golang to v1.9.0 in the root and zititest modules
- mechanically rewrites every channel/v4 import path to channel/v5

This is the import-path-only step; the API-level changes the switch requires land in the following commit. This commit does not build on its own.
2026-06-18 12:51:02 -04:00
dovholuknf 7a6da85fdd add generic 'binding: spa', fix quickstart --home, lint cleanup 2026-05-03 11:08:40 -04:00
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 c367679e79 fixes openziti/ziti#3626 omit overlay bind points from /versions apiB… (#3663)
* fixes openziti/ziti#3626 omit overlay bind points from /versions apiBaseUrls

- adds BindPointTypeUnderlay and BindPointTypeOverlay constants
- implements Type() on UnderlayBindPoint and OverlayBindPoint
- skips non-underlay bind points when building apiBaseUrls in version_router
- skips non-underlay bind points in GetApiAddresses
- adds unit tests for Type() on both bind point implementations
- updates xweb
2026-03-10 09:57:50 -04:00
Paul Lorenz 6b869cea9d Add support for ctrlChanListener on router to the model. Fixes #3635 2026-03-07 00:00:51 -05:00
Paul Lorenz 46cd641c71 Use success rate for adaptive rate limiter window sizing. Fixes #3636
- replaces queue-position-based window adjustment with an exponentially
  decaying success rate histogram to drive grow/shrink decisions
- introduces AdaptiveRateLimitTrackerConfig with configurable
  successThreshold, increaseFactor, decreaseFactor,
  increaseCheckInterval, and decreaseCheckInterval
- grows window by increaseFactor when success rate exceeds threshold,
  shrinks by decreaseFactor when it falls below
- renames LoadAdaptiveRateLimiterConfig to a Load method on the config
- adds currentSize and currentWindow to Success/Backoff/Failed debug logs
- updates controller TLS handshake, raft, and router ctrl rate limiters
  to use the new AdaptiveRateLimitTrackerConfig
2026-03-05 18:35:57 -05:00
Paul Lorenz d1300de040 Add preferredLeader flag to raft configuration. Fixes #3600 2026-03-05 17:24:43 -05:00
Andrew Martinez a9dd2fc8f8 fix.openziti.ziti.3597.OIDC.by.default (#3605)
* fixes #3597, enable OIDC by default

- adds ability to have different sets of environment configs for tests
- adds ConfigSet struct as a configuration device for integration tests
  - allows entire environments to be defined as needed
  - original ats config set at "default-ats"
  - tests that do not specify a config set, use "default-ats" as before
- standardizes configuration location, naming, etc.
- adds README.md for the above
- updates testContext to now be config set aware
- add config value to disable, update tests, changelog
- add defense against cached version data for tests
2026-03-04 10:03:14 -05:00
Paul Lorenz a228ab4543 Initializing cluster from existing db using db: config settings results in panic. Fixes #3613 2026-02-27 11:21:56 -05:00
Paul Lorenz ab51fa8217 Fix the control channel header conflicts with channel headers. Use single strategy for sharing capabilities with bit mask. 2026-02-24 15:50:05 -05:00
Paul Lorenz 84c98e2481 Version 2.0+ routers should not connect to controllers which do not support JWT formatted legacy sessions. Fixes #3569 2026-02-13 15:28:50 -05:00
Paul Lorenz 90112219a3 Support multi-underlay control channels. Fixes #3550 2026-02-11 14:20:29 -05:00
Paul Lorenz 15ae909c07 Remove option to disable the router data model in the controller. Fixes #3541 2026-02-04 16:23:28 -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 f3ad7b65ae Have identity env updates and system authenticator updates happen in the background. Fixes #3477 2025-12-29 12:08:16 -05:00
Paul Lorenz ae8306942c Add permissions list to identity. Fixes #3430. Add read-only permission. Fixes #2109. Add CRUD permissions by entity type. Fixes #3435 2025-12-18 10:54:08 -05:00
dovholuknf 63927bab46 Issue 3442 legacy router healthcheck broke (#3443)
* restore legacy router healthcheck support for address 0.0.0.0

* restore extraneous comment

* move bindpoint to common since routers and controllers use it. put old validation back and soften message

* missed an import
2025-12-11 10:14:33 -05:00
Paul Lorenz 701fe9ffd9 Move fabric router/service/terminators rest api code common location 2025-12-05 10:35:25 -05:00
Paul Lorenz ffe6e16b76 Separate raft command submission limiting from in-flight limiting. Fix some create terminator error handling. Fixes #3318 2025-12-03 17:01:28 -05:00
Paul Lorenz d37c721c83 Optimize router data model subscription code. Add additional events. Fixes #3359 2025-12-02 11:37:38 -05:00
dovholuknf caee6124e2 add support for and identity-driven bindPoints in controller (#3315)
* add support for and identity-driven bindPoints in controller

* cannot use ListenOptions as it pulls the go sdk into xweb :(

* more generic log message

* add ziti cli login tests in prep for continuing adding identity support in controller

* updates to tests

* updates to tests

* rebase with main

* allow login testing to external overlay

* more changes to allow a zitified ziti cli. add a test for testing login and ensure it works over a zitified connection

* refactor bindPoints to a module

* rebase with main

* no functional changes, just major refactoring based on PR requests. encapsulated all tests state into loginTestState, moved overlay to testutil

* rework a couple of util funcs to be cleaner per PR feedback

* make the new func more useful

* run tests via github action

* update changelog and remove unnecssary serveTls for now

* update from xweb v2 to v3

* change where factory is added and fix compilation issue of a test

* linting changes, move ascode test to cli_tests and activate via cli_tests

* use proper go build

* forgot to set the bin location

* fix timeout on test

* different errors on linux, windows and on gh runners

* cleanup after self-pr review

* use longer name to prevent codespell issues...

* additional changelog and add addressable terminator support

* fix out of control concatenation in cache file. fix ipv6 checking

* updates based on newer sdk and edge api client

* ensure oidc sessions auth for both older and newer commands

* add better error when url is empty and update changelog

* codespell fixes

* remove extraneous file

* update to 1.3.0 to kick off CI

* PR related changes. add interface enforcer and refactor networkIdentity

* go tidied

* fix golangci-lint and ha quickstart test

* keep fixing golanglint-ci... lol

* golanglint i was sure i'd fixed

* fix login test

* should fix ziti ops verify traffic as well

* fix verify traffic when all login information is supplied as well

* make all the timeouts longer? seems to run fine locally but fail in actions
2025-11-14 11:07:52 -05:00
Paul Lorenz 2096535abe Add missing shutdown logic 2025-09-18 15:33:45 -04:00
Andrew Martinez 0506ef251b fix.3048.auth.events.impropert.chain.flag (#3050)
fixes #3084 adds events and improper chain flag

- splits cert resolution into root, legacy root + intermediate,
  and third-party pool. Allowing the detection of client authentication
  with incomplete chains if root + intermediate succeeds after root only fails
- adds `improperClientCertChain` to API Sessions and Current API Session.
  Added for OIDC and legacy auth. Set to true when a client certificate is used
  that was issued by the network and did not pass the root-only pool.
2025-05-21 11:49:39 -04:00
Andrew Martinez c4b89e9d01 fixes #2904 limit client certs requested/allowed (#2974)
* fixes #2904 limit client certs requested/allowed

Some clients (browsers) show a popup when interacting with our TLS
servers and a pop-up or other UI to select certificates for
interacting with our server. If not limited, this causes any client cert
available to be shown, allowing the user to choose a certificate
that will never work. This fix limits the issuer's allowed so the popup
never appears or only appears with viable options.

- use new xweb to modify server TLS configs with static and 3rd party
  CAs
- centralize CA certificates for re-use
2025-04-11 14:33:21 -04:00
Paul Lorenz e647d67325 Update to channel/v4 2025-04-02 15:28:59 -04:00
Paul Lorenz ed6194b333 Fix restore if db is restored in multiple locations. Fixes #2891 2025-03-14 13:00:46 -04:00
Paul Lorenz 50a4cca051 Fix controller online status. Fixes #2854 2025-03-10 09:49:30 -04:00
dovholuknf 37cedecd48 closes #2860 - add validation from controller/router (#2861)
* closes #2860 - add validation from controller/router instead of within xweb.
allow routers to have misconfigured xweb section for healthchecks

* remove prototyping

* add changelog too
2025-02-28 13:25:58 -05:00
Paul Lorenz 58e3b8cb9f Shutdown raft when controller shuts down 2025-02-11 13:01:34 -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
Andrew Martinez 4d2eeb7c3a Merge branch 'main' into fix.2591.split.apis.cause.login.fail 2025-01-21 13:52:44 -05:00
Paul Lorenz 02ac768207 Add changelog and panic fix for health check update. Closes #2582 2025-01-15 08:10:56 -05:00
Paul Lorenz 12e3bb86d0 Merge pull request #2581 from nenkoru/main
Add controller-isleader xweb component to respond with 200 if the controller in question is a raft leader
2025-01-14 15:05:14 -05:00
Paul Lorenz 5621d5ce55 Make sure controller data is correctly updated after peer connect. Fixes #2586 2025-01-10 16:33:19 -05:00
Paul Lorenz f147fc6b99 Add events for cluster has leader/is leaderless. Change cluster events NS to cluster. Fixes #2639 Fixes #2184
Also fix member events. We were getting add evetts on startup as the log was replayed. Store them in the
DB so we only get events when membership has actually changed.
2025-01-10 13:57:28 -05:00
Paul Lorenz 5429ce5064 Separate leader updates from controller cluster member updates 2025-01-09 16:18:34 -05:00
Chernenko Ruslan 425c69968e feat: make healtcheck controller specific
Signed-off-by: Chernenko Ruslan <ractyfree@gmail.com>
2025-01-08 19:01:48 +03:00
Chernenko Ruslan ed26065331 feat: move to a more generic health endpoint in conjunction with isleader check
Signed-off-by: Chernenko Ruslan <ractyfree@gmail.com>
2025-01-08 19:01:39 +03:00
Chernenko Ruslan 6d695c8db0 feat: add controller-isleader xweb component to return 200 if the controller is a raft leader
Signed-off-by: Chernenko Ruslan <ractyfree@gmail.com>
2025-01-08 19:01:31 +03: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
Andrew Martinez 5e0237e663 fixes #2591 ziti edge login will not fail with split APIs
- ziti edge login now properly probes endpoints and their return content
  type along with the existing status code check
- probed endpoint responses are no longer blindly parsed
- the management endpoint is the default initial probe point, falling
  back to the client version endpoint then the legacy root version
  endpoint
- the SPA/ZAC bindings for web apis has been moved to the webapis folder
- improved erroring and messaging for the SPA/ZAC handling
2024-12-13 13:33:48 -05:00
Paul Lorenz c2162ea9a9 Add cluster id, to prevent merging disparate clusters. Fixes #2541 2024-11-14 12:34:17 -05:00
Paul Lorenz 32eddd61ca HA SDK terminators test. Fixes #2217. Fixes #2533 2024-11-12 18:45:08 -05:00
Paul Lorenz fb809263b3 Simplify raft bootstrapping and controller initialization. Fixes #2212 2024-11-01 15:21:01 -04:00
Andrew Martinez 22a800b4de allow fabric only testing to set fabric management as default API 2024-09-17 10:35:45 -04:00
Paul Lorenz cccf0c06af Update to channel/v3. Fixes #2390 2024-09-09 12:23:25 -04:00