Commit Graph

142 Commits

Author SHA1 Message Date
Paul Lorenz 63c161224a Add linter and fix issues found by linter 2022-10-10 16:56:51 -04:00
Paul Lorenz 32c197e5e1 Update to channel v2 2022-09-26 18:20:00 -04:00
Paul Lorenz db5c73b33b Refactor edge events to follow model established in fabric 2022-09-16 12:47:46 -04:00
Paul Lorenz 0b8a65207a Change bootstrap check. Add hooks for isRaftEnabled 2022-08-22 12:14:40 -04:00
Paul Lorenz 1fb3339bb1 Update for changes to fabric events model 2022-07-19 11:18:08 -04:00
Paul Lorenz bae7e40b61 Update for foundation changes 2022-07-01 15:55:30 -04:00
Paul Lorenz 12df770d04 Update copyright 2022-06-30 17:45:08 -04:00
Paul Lorenz b53fa0cd98 Remove event log and georegions 2022-06-30 10:35:19 -04:00
Andrew Martinez 0014b39f7e update xweb to v2 2022-06-06 14:33:42 -04:00
Paul Lorenz 2f6a3bc828 Update handler -> manager for base types and config 2022-06-02 00:05:54 -04:00
Paul Lorenz 7cf9dc135d Initial support for raft and command style architecture 2022-06-01 23:52:07 -04:00
Andrew Martinez 7381423974 use cmap generics, update fabric 2022-05-27 11:02:51 -04:00
Andrew Martinez 47b210c67b updates fabric w/ xweb moved out 2022-05-26 11:27:09 -04:00
Andrew Martinez c5f156dd9e adds x509 claims support for external ids to CAs
- adds REST API CA external id field
- adds rest api for external fields
- refactors authentication interfaces for federation
- alters authentication moduels to return AuthResult interfaces
- allows AuthResults to provide external x509 certs as session certs
2022-05-23 13:08:16 -04:00
Paul Lorenz 0243212f83 Use ZitiSession const from golang sdk instead of foundation (so we can remove it from foundation) 2022-05-02 17:20:03 -04:00
Andrew Martinez 5b17be58c8 fixes admin permission not also checking default admin 2022-04-08 10:43:24 -04:00
Paul Lorenz 01bea19e1f Update to use transport and storage libs. Use fabric config instead of foundation/config 2022-03-30 22:49:46 -04:00
Andrew Martinez 5129f3c8d7 adds partial authentication enforcement
- required ext jwt signer requires bearer token on requests
- adds auth query output for ext jwt
- enforces requireTotp auth policy
- allows partial auth to setup MFA but not remove
2022-03-30 10:10:52 -04:00
Andrew Martinez 99e3b283b6 adds auth policy CRUD, does not affect authentication 2022-03-25 14:40:07 -04:00
Paul Lorenz 5be9095e60 Update to use channel library 2022-01-28 11:35:15 -05:00
Andrew Martinez 1f784d89ce adds asynchronous eventer to controller
- emits events for processing progress/state for metric instrumentation
- emits events for eventual event backlog state for metrics
- alters Trigger() to return a channel that can be waited upon
- adds ability to add eventual events within a specific bbolt
  transaction
- splits session lookup and delete into view/update transactions
- add eventual event gauge
- use CascadeCreateUpdate
- adds named functions
- documentation for 500us timeout
- grammar fixes
2022-01-18 14:19:36 -05:00
Andrew 9bd955127c Merge pull request #866 from openziti/broker.async.bbolt.tx
move broker event handlers to go routines
2022-01-18 09:27:17 -05:00
Andrew Martinez 9b05d4e49b move broker event handlers to go routines 2022-01-17 13:59:33 -05:00
Andrew Martinez 4be50ea143 adds zero start time check 2022-01-17 10:24:00 -05:00
Andrew Martinez 050b0b086e moves metric endpoint logging lower in the stack
- endpoint url/path -> name remains the same
- start timing on request context before we start processing
- log metrics in IsAllowed which is called by all endpoint after routing
- logging before routing to a handler would log all probe attacks
2022-01-17 10:12:59 -05:00
Paul Lorenz 7b1ee2893d Add identity refresh meter 2022-01-06 13:45:18 -05:00
Andrew Martinez dae084f61c alters router/controller enrollment extension logic
- routers propertly wait on certs that are about to expire
- routers no longer send multiple extension requests
- routers now request cert verification
- routers now verify new certs before saving
- controller now supports verification requests
2021-12-20 09:19:10 -05:00
Paul Lorenz bfcb037783 Initial pass at fabric rest api working (#838)
* Update for fabric rest controller changes
2021-11-30 16:30:17 -05:00
Andrew Martinez 6612ad9c14 fix startup timing issues 2021-10-19 10:58:59 -04:00
Andrew Martinez 6b80d444a0 remove old dgrijalva jwt ref 2021-10-01 11:17:00 -04:00
Andrew Martinez b0f9f18f72 adds EventFullyAuthenticated to the API session store
The previous implementation would send API Sessions to Edge Routers
while partially authenticated. Due to state issues addressed separately
in the c-SDK, these partial API Sessions are maintained if a channel
connected to an edge router was established during reconnect. This would
further cause problems with channel connection using the wrong API
session vs what the rest of the SDK was using.
2021-09-13 15:15:34 -04:00
Andrew Martinez 4cac5518e9 ensure that lastAccessedAt is set on create, emit logs if not found 2021-09-02 08:57:14 -04:00
Paul Lorenz fa902f385d Add entity count events. Fixes GH-757 2021-08-19 14:18:30 -04:00
Paul Lorenz 23c98c2d5a Add more tracing and allow enabling debug for specific identities for path selection/establishment 2021-08-09 11:20:51 -04:00
Paul Lorenz 3151d31b7f Handle xweb import change (#697)
* Handle xweb import change. Fix tunnel update/delete terminator handling
2021-06-22 14:18:17 -04:00
Paul Lorenz d920dbbd93 Fix sync early exit bug. Track new session during sync. Simplify thre… (#686)
* Fix sync early exit bug. Track new session during sync. Simplify threading and tighten up locking. Add dump api-sessions debug operation

* Address review comments. Remove spurious error message. Fix defaultHostingCost/Precedence field names
2021-06-11 14:01:20 -04:00
Andrew Martinez 09b60f3ed8 Debugf to Infof 2021-06-04 12:30:27 -04:00
Andrew Martinez a6e0f4e807 revert defensive logic 2021-06-04 12:24:57 -04:00
Andrew Martinez 5a5fefa092 fixes deadlocks when a router disconnects mid sync or update
- range() of rtx'ers no longer locks, snapshots then loops
- rtx.Send() now checks for stopped/disconnected
- rtx.Send() now respects closeNotify
2021-05-25 16:23:20 -04:00
Andrew Martinez 6625084569 use xweb for Edge Client and Management APIs
- use xweb for run
- use xweb for api tests
- use time.ParseDuration for edge configuration
- use CORS defaults in Client/Management API handlers
2021-05-06 16:45:48 -04:00
Andrew Martinez b562fb5c07 splits API specs into composible modules
- splits Open API 2.0 (swagger) into client/management APIs
- uses go-swaggers flatten capabilities
- uses newer version of go-swagger (v0.27.0)
- introduces /edge/client/v1, /edge/management/v1
- non-prefixed URLs default to /edge/client/v1
- splits some shared management/client API handlers
- renames some REST models to "client" instead of "limited"
- passes all apitests, fails dataflow upd test (main fails this as well)
- updates generate rest script for powershell
- todo: test generate rest script for bash
- todo: use xweb (different branch)
2021-05-04 11:30:32 -04:00
Paul Lorenz 57da48f142 Move terminator validation from xtv to control channel handler 2021-04-29 13:46:54 -04:00
Andrew Martinez 4a9b226f0e adds the ability for router to extend their enrollment
- routers can now opt to extend their enrollment at any time with a
  previous or new key
- adds tests for router enrollment
- adds tests for router enrollment extension
2021-04-14 09:21:59 -04:00
Andrew Martinez 3014bdc405 new tests, don't prune policies w/ no checks 2021-03-24 14:06:09 -04:00
Andrew Martinez 1100d6f388 update service update on posture data change, tests 2021-03-23 09:54:47 -04:00
Paul Lorenz 680852f80e Allow tunnel to run over xgress directly 2021-03-22 14:33:54 -04:00
Andrew Martinez c54a007202 formalize posture data API output, add service request errors
- GET /identity/{id}/posture-data is now formalized in the swagger.yml
- posture data output now includes the last 100 failed service requests
  with temporal posture data state
- added ziti controller instance id header to detect restarts
- add GET /identity/{id}/failed-service-requests
2021-03-19 09:49:44 -04:00
Andrew Martinez 623681db87 add lastActivityAt
- as updates to API Sessions can now happen later than the last time
  they were active, updatedAt is no longer the correct representation of
  the last activity an API Session had
- move all logic that used updatedAt to lastActivityAt
- add migration to set lastActivityAt
2021-03-17 13:49:12 -04:00
Andrew Martinez 5841f6fa70 use batch for api access last updates 2021-03-15 11:14:45 -04:00
Andrew Martinez 219c19c8e7 fix map passed by reference in shallow struct copy 2021-03-08 15:58:57 -05:00