123 Commits

Author SHA1 Message Date
Andrew Martinez f64b6879cf fixes GHSA-whjr-3j94-gw3c constrain external jwt signer JWKS fetching
- adds HardenedJwksResolver, a jwks.Resolver that fetches an external jwt signer's
  jwksEndpoint with an http/https-only scheme check, a total timeout and a redirect cap
- adds JwksFetchPolicy, gating a fetch on both the URL hostname and the address being
  connected to, applied to the first request and to every redirect hop
- hostname gate: deniedHostnames blocks, allowedHostnames is exclusive when set; entries
  are an exact hostname or a '*.suffix' wildcard that matches subdomains at any depth but
  never the suffix itself, normalized to lower case punycode without a trailing dot
- address gate: built-in blocked (metadata, link-local, link-local multicast,
  unspecified), then deniedIPs, then allowedIPs, then blockPrivateAddresses,
  first-match-wins with deny over allow
- keeps the gates independent, so neither can authorize what the other refuses; the
  address check runs in the dialer against the resolved address, so a hostname that
  resolves to a blocked address is refused
- adds the [edge.externalJwtSigners.jwksFetch] config section with compatible defaults:
  empty hostname lists, blockPrivateAddresses false, timeout 5s, maxRedirects 5
- takes IP lists as a flat address or a CIDR block, hostname lists as names only, and
  rejects an entry belonging to the other list at startup
- rejects a jwksEndpoint the policy refuses when an external jwt signer is created or
  updated, and logs an existing signer whose endpoint the configuration now refuses
  when the token issuer cache loads
- documents both gates, their deny-wins precedence, the accepted entry forms and the
  wildcard matching rules in etc/ctrl.with.edge.yml and CHANGELOG.md
2026-08-20 15:12:56 -04:00
dovholuknf 767568a2e0 add option to ctrl.with.edge.yml and the template 2026-06-09 13:27:42 -04:00
Paul Lorenz ba809e4d26 Keep controller mesh fully connected, as much as possible. Fixes #3684 2026-05-27 10:21:34 -04:00
Paul Lorenz 7b4ae12c05 Add CreateCircuitV3 for RDM-authorized circuit creation. Fixes #3721
- adds CreateCircuitV3 message type and handler for routers that have
  already authorized dials locally via RDM, bypassing service session
  tokens in favor of identity ID, service ID, and pre-assigned circuit ID
- renames CreateCircuitRequest/Response to CreateCircuitV2Request/V2Response
  for clarity now that V3 exists
- adds CircuitManager.Reserve to atomically claim circuit IDs before routing,
  preventing collisions on pre-assigned IDs
- extends CreateCircuitParams with GetCircuitId so V3 can supply a
  pre-assigned circuit ID (falls back to UUID generation when empty)
- fixes IsDialableByIdentity which was incorrectly calling IsBindableByIdentity
- extracts V2 handler into its own file create_circuit_v2.go
- adds CreateCircuitV3RequestType/ResponseType (20222/20223) to edge_ctrl protobuf
- registers V3 handler in controller server
2026-03-27 14:41:28 -04:00
Paul Lorenz 62e29169c2 Coalesce OIDC JWT revocations to reduce controller write pressure. Fixes #3681
- adds DeleteRevocationsBatchCommand so expired-revocation cleanup goes
  through raft as a single log entry per batch
- adds CreateRevocationsBatchCommand for batched revocation creation
  through raft
- moves refresh-token revocations from synchronous inline creation to a
  background batcher that flushes on a configurable interval, removing
  the database and raft as a bottleneck on token refreshes
- skips revocation creation for tokens expiring within a configurable
  threshold (revocationMinTokenLifetime), since they become invalid on
  their own
- validates that revocationMinTokenLifetime is less than 50% of the
  configured refresh token lifetime
- makes the revocation enforcer frequency configurable and restricts it
  to run only on the raft leader
- adds tests for multi-batch delete, batched create with router RDM
  propagation, and skip-threshold behavior
- adds new configuration tunables under edge.oidc: revocationBucketInterval,
  revocationMinTokenLifetime, revocationBucketMaxSize, revocationMaxQueued,
  revocationEnforcerFrequency
2026-03-19 08:35:00 -04: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
Paul Lorenz 69e8a7ea63 xgress_transport and xgress_proxy should use common Connection type. Fixes #3642
- deletes proxyXgressConnection and transportXgressConn duplicate types
- adds ConnType enum (Tunnel, Transport, EdgeTransport, Proxy) to xgress_common
- replaces boolean isTransport parameter in NewXgressConn with ConnType
- updates HandleControlMsg to derive traceroute hop type from ConnType
- adds halfClose field to xgress_transport listener based on transport type
- updates all NewXgressConn call sites with appropriate ConnType values
2026-03-05 15:56:52 -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
Francesco Faraone f0dbcd512a Azure Service Bus logger for controller event streaming 2025-09-03 10:05:37 +02:00
Paul Lorenz e5fb69935e Support multi-underlay links. Fixes #3134 2025-07-11 20:56:11 -04:00
Paul Lorenz cc7eefaf24 Add support for tracking network interfaces on routers and identities. Fixes #3082. Add network discover to router. Fixes #3083 2025-06-17 09:32:51 -04:00
Paul Lorenz a70218a11c Allow disabling posture checks. Fixes #3063 2025-05-29 12:40:00 -04:00
Andrew Martinez 1743e9c50e fixes #2614 adds token expiration configuration for OIDC (#3022) 2025-05-27 08:29:56 -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 0e61edb2f9 fix #2984 identity/router enrollment do not return full chains (#2990)
* fix #2984 identity/router enrollment do not return full chains

- router extend via REST/ctrl now return full chains
- identity extend via REST now return full chains
- updates tests to allow for chain lengths
- modifies verification to look at the first cert in the chain (leaf)
- modifies edge routers to not start extension if new certs can't be
  saved
- adds network-jwt tests
2025-04-11 11:27:57 -04:00
Paul Lorenz 6a01db9e4c Rename raft config to cluster. Fixes #2731 2025-02-04 13:31:15 -05:00
Paul Lorenz fef5327e14 Endpoint management updates
* Allow configuring endpoints file full path instead of directory. Fixes #2724
* Write initial router endpoints file based on ctrls in JWT. Fixes #2728
* Add ctrls property to non-ha router enrollment. Fixes #2108
* Enrollment doesn't contain controller which created the enrollment. Fixes #2729
2025-02-03 18:52:57 -05:00
Paul Lorenz 110446a990 Add doc generator for events. Add event doc. Fixes #2593 2025-01-31 12:23: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
Andrew Martinez 2261a559ae adds support for ${TMP} ${TEMP} and ${TMPDIR} in configs
- TMP/TEMP/TMPDIR are standards from windows, macOs, bsd, and linux
- TMP/TEMP/TMPDIR are set for all oses to allow cross platform configs
- Priotity order for selection is TMP/TEMP/TMPDIR
- For windows if TMP/TEMP are not set C:\temp is the default
2025-01-16 11:24:31 -05:00
Andrew Martinez 51ef3ff80b revert changes to modified dev controller config 2024-12-13 13:38:39 -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 16f0a858e6 Add controller connect events. Fixes #1835. Fixes #2234 2024-11-01 15:21:01 -04:00
Andrew Martinez 04faa9e0a1 update deps 2024-10-11 10:41:24 -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
Andrew Martinez 6ecca65c85 fixes #2165 adds network id configuration/spiffe id look up
- adds support for trust domain lookup on x509 chain
- adds support for non-ha trustDomain configuration
- adds default generated trust domain for non-ha controllers
- non-HA controllers will generate a trust domain from the root CA if
  possible
- additionalTrustDomains has been added for transitioning between trust
  domains

update changelog.md
2024-07-03 10:23:50 -04:00
Paul Lorenz 97b9b44171 Spelling fixes from codespell 2024-05-28 13:44:54 -04:00
Kenneth Bingham 1a57b62c1a fix typo 2024-04-22 17:34:35 -04:00
Kenneth Bingham 57f95d6745 de-hyphenate old mentions of ziti-router as 'ziti router' 2024-04-22 17:30:30 -04:00
Paul Lorenz 0085e92ad4 Update HA smoketest for HA changes 2024-03-18 16:38:29 -04:00
Andrew Martinez 09542c7728 consolidated ha changes 2024-02-29 09:27:56 -05:00
Paul Lorenz 8423a8dd6a Fix link management race conditions found by chaos testing. Fixes #1709 2024-01-29 17:23:51 -05:00
Paul Lorenz 38617b244e Merge pull request #1658 from openziti/auth-rate-limiter
Add auth rate limiter. Fixes #1657. Also add links fablab stress test.
2023-12-21 10:53:04 -05:00
Paul Lorenz 04873a250d Add auth rate limiter. Fixes #1657. Also add links fablab stress test. 2023-12-21 09:48:04 -05:00
Mario Trangoni 126ee5d79c codespell: Add spelling check and fix all issues
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2023-12-19 10:52:42 +01:00
Paul Lorenz 9bed8a14a8 Add optional command rate limiter. Fixes #1445 2023-10-23 13:45:49 -04:00
Andrew Martinez ad861ad682 adds capabilities in version and enumerated list version 2023-10-18 09:58:59 -04:00
Paul Lorenz 48db386b56 Update changelogs and deps 2023-06-09 10:30:47 -04:00
Cam Otts db3c3f2685 updated changelog, deps, and example config (#1136)
* updated changelog, deps, and example config

* move fabric change to correct section

* updated zititest go.mod
2023-06-07 15:56:32 -05:00
Paul Lorenz d9957f866e Update deps and changelog 2023-05-12 15:19:30 -04:00
Cam Otts 614eafe6be added amqp logger (#1084) 2023-04-15 11:18:05 -05:00
dovholuknf a335a9c762 small tweaks to test ps1 2023-02-04 10:53:43 -05:00
dovholuknf 6e9dfae47f add a utility to test udp connections 2023-02-04 10:18:20 -05:00
Paul Lorenz faff525898 Update deps and changelog 2022-07-18 16:17:40 -04:00
Paul Lorenz 376c11bef3 Update deps. Update for foundation changes. Update CHANGELOG 2022-07-01 16:40:44 -04:00
Paul Lorenz 518e63ffda Update deps and changelog 2022-06-22 17:11:34 -04:00
Paul Lorenz 0b232d744a Initial raft implementation 2022-06-06 12:28:15 -04:00
Paul Lorenz afc2f9c9df Update to latest protobuf library 2022-05-13 14:48:48 -04:00
Paul Lorenz 644742b8e6 Update changelog and deps 2022-05-02 22:11:09 -04:00