Commit Graph

22 Commits

Author SHA1 Message Date
Andrew Martinez 949de99ee4 fixes #3809 support CSR submission during OIDC authentication (#3840)
* fixes #3809 support CSR submission during OIDC authentication

- accepts an optional CSR during OIDC login (all auth methods) and
  signs it into a session-bound certificate with a SPIFFE ID derived
  from the identity and API session
- returns the signed certificate PEM as a top-level "session_cert"
  field in the token endpoint JSON response (CodeExchange, RefreshToken,
  TokenExchange)
- adds cert-binding verification on RefreshToken and TokenExchange:
  if z_cfs is present the peer cert fingerprint must match (strict),
  otherwise falls back to SPIFFE ID verification
- supports cert rotation via csr_pem form parameter on refresh and
  token exchange; replaces the session cert fingerprint while
  preserving the authenticating cert fingerprint
- adds AuthCertFingerprints (z_acfs) claim to track permanent auth
  cert fingerprints separately from rotatable session cert fingerprints
- only the leaf certificate fingerprint is added to z_cfs and z_acfs,
  intermediates are never included
- invalid CSR returns 400 Bad Request in OIDC error format
- propagates updated CustomClaims (including CertFingerprints) from
  access token to renewed refresh token so rotated fingerprints are
  enforced on subsequent refreshes
- adds CertGenerated field to ApiSessionEvent
- advertises OIDC_AUTH_WITH_CSR controller capability when OIDC is
  enabled
- adds unit tests for verifyCertBinding (fingerprint, SPIFFE ID,
  edge cases) and CsrPem field parsing
- adds integration tests for initial CSR auth (updb, cert, ext-jwt),
  cert-binding on refresh/exchange, CSR rotation with cert auth,
  SPIFFE fallback and z_cfs transition, and CSR property forging
  resistance

* address pr concerns

* add z_cfs len tests on junk chain certs

* strip csr subject info, replace w/ santized values

* fix csr rotation rejection/paths during token exchange/refresh
2026-05-07 13:56:48 -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
Paul Lorenz d1300de040 Add preferredLeader flag to raft configuration. Fixes #3600 2026-03-05 17:24:43 -05:00
Paul Lorenz c69b07b74d Remove created/updated/deleted terminator events which are obsoleted by entity change events. Fixes #3531 2026-02-04 11:16:59 -05:00
Paul Lorenz da9ef76d19 Optimize imports 2026-01-28 15:01:35 -05:00
Paul Lorenz 08359a9e2b Remove legacy link management code from the controller. Fixes #3512 2026-01-22 15:26:42 -05:00
Paul Lorenz 653063767e Add alert events. Fixes #3264 2025-10-15 14:21:07 -04:00
Paul Lorenz 0b5e36c652 Add edge session events for JWT edge sessions. Fixes #3225 2025-09-02 15:37:02 -04:00
Paul Lorenz e5fb69935e Support multi-underlay links. Fixes #3134 2025-07-11 20:56:11 -04:00
Paul Lorenz b21db0faa1 Implement circuit validation API and CLI. Fixes #3098 2025-06-16 13:57:42 -04:00
Paul Lorenz c4bfd72e22 Add instance id to terminator events. Fixes #3052 2025-05-29 09:57:15 -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
Paul Lorenz 3c3585caff Disconnect and event on non-member peers. Fixes #2742 2025-02-14 11:56:23 -05:00
Paul Lorenz 110446a990 Add doc generator for events. Add event doc. Fixes #2593 2025-01-31 12:23:43 -05:00
Paul Lorenz 71c7f6bb00 Add event source id to all events. Fixes #2619 2025-01-14 12:17:48 -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 16f0a858e6 Add controller connect events. Fixes #1835. Fixes #2234 2024-11-01 15:21:01 -04:00
Paul Lorenz 694b9dc18d Add events for JWT session for create/refresh/exchange. Fixes #2119 2024-09-30 15:32:48 -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 73ad4c9c84 Handle fallout from putting and fabric and edge into the same project 2023-09-29 10:51:56 -04:00
Paul Lorenz 509364d908 Remove trace events from dispatcher. Move trace to common 2023-08-16 12:39:42 -04:00
Paul Lorenz 8dbc759d45 move event and events packages to controller 2023-08-10 17:10:17 -04:00