Commit Graph

93 Commits

Author SHA1 Message Date
Andrew Martinez 219c19c8e7 fix map passed by reference in shallow struct copy 2021-03-08 15:58:57 -05:00
Andrew Martinez fff256487c status to state in broker 2021-03-08 15:04:51 -05:00
Andrew Martinez 90ca54adb8 adds thread safe router state
Router state used to be stored and accessed in a thread unsafe way.
State is now locks on a mutex for setting values and values are copied
out for referencing.
2021-03-08 14:55:36 -05:00
Paul Lorenz 735eb1d80f Move ApiError and FieldError to foundation 2021-03-03 14:44:26 -05:00
Andrew Martinez b784577f36 add new error state for router sync, move defers to catch router info 2021-02-19 20:58:53 -05:00
Andrew Martinez 4afc0bd0b6 fix dupe connection testing by looking at strat stat not network state 2021-02-19 11:18:09 -05:00
Andrew Martinez a51cf270f2 ignore duplicate connecting routers, do not dereference er hostnames
hostnames may be a nil pointer at times now due to the fact that edge
routers may be waiting to sync and may be "online" but edge hellos
have not been exchanged.
2021-02-19 10:19:26 -05:00
Paul Lorenz 155bbd8217 Validate sessions on controller instead of edge router 2021-02-17 20:38:13 -05:00
Andrew Martinez d76fcbc168 merge stops in instant strat, add broker stop to shutdown 2021-02-15 13:39:07 -05:00
Andrew Martinez a8f1b8b79a moves sync strat/state to headers 2021-02-15 13:22:07 -05:00
Andrew Martinez d07618c9d5 modular edge router sync
- edge router sync is now modular and can have different strategies
- plans to make this configurabe in the future with multiple strat
- legacy strategy is called "instant" and is the only option
- instant strat now supports control signaling and resync requests
- edge routers now do not remove connections till after a full sync
- added the ability for the controller to report the er sync status
- added er syn status to GET /edge-routers list and detail
- improved log output in sync logic
2021-02-15 13:22:07 -05:00
Andrew Martinez 2c1a9dd82b ignores dupe router startup
A second edge router starting up could offline the original according to
the edge. This would cause issues w/ API Session and Session
distribution.
2021-02-10 10:58:50 -05:00
Curt Tudor 2c6814aaa4 edge router enhancements for browZer support (#499) 2021-02-04 06:09:46 -05:00
Andrew Martinez df1f2a1a75 fixes #497 send session header
- add server headers during HTTP handler delegation rather than at HTTP
  response time
- remove all old header setting locations
- remove unused status writer and other response code
- add manual set on authentication for session headers
2021-02-01 14:28:29 -05:00
Paul Lorenz f485d4e8c3 Update service poller to use service update callback 2021-01-29 15:32:51 -05:00
Andrew Martinez 308d7f3a10 mfa initial
- add mfa read endpoints
- add mfa enroll enpoints
- fix mfa library timing issues
- adds mfa at tests
- adds admin mfa management endpoints
- adds admin mfa at tests
- improve at tests
- fix auth check vs auth query
- fix swagger for auth queryies
- fix swagger doc
- adds more api tests for validation
- redo auth query structure
- redo mfa endpoints
- move mfa verify to authenticate router:wq
- add recovery code support and tests
- add partial session authentication status
2021-01-19 08:36:27 -05:00
Andrew Martinez 65be49c609 Add appId and appVersion to sdkInfo 2021-01-18 10:38:43 -05:00
Paul Lorenz c370dff45c Notify clients to refresh after restart 2021-01-15 16:20:13 -05:00
Paul Lorenz 2194d8a2e2 Implement service change notifications 2021-01-15 15:28:59 -05:00
Andrew Martinez a3789c063a adds support of API Session Certificates
- adds ability for any authenticated API Session to create ephemeral
 certificates
- allows UPDB session connection
- adds create/delete/read of current api session certificates
- add session cert pem result on create and detail
- fixes ER not updating sessions with new certs from API session
- fixes naming of session vs apiSession on members, functions, etc
- organizes ER state manager functions into apiSession vs session
- adds api session ids to api sessions and sessions sent from the
  controller to ERs
- ensure api and ns fingerprints are the same
- filter api session certs by valid periods
- clarify fingerprint func naming
2021-01-06 09:42:57 -05:00
Andrew Martinez c726f158d6 fixes #365 adds hasApiSession and hasEdgeRouterConnection 2020-10-20 15:00:22 -04:00
Andrew Martinez 3bbff3a01a support version info from fabric 2020-10-07 07:25:14 -04:00
Paul Lorenz 50bc204dd5 Add edge terminator validator 2020-09-29 09:27:05 -04:00
Paul Lorenz 50c6b3e4b3 Support identity dial/bind 2020-09-29 09:27:03 -04:00
Paul Lorenz 734e9a5542 Fix service policy migration. Update for terminator precendence changes. Log panic stacks. Fixes GH-291 2020-09-03 10:22:27 -04:00
Andrew Martinez a97fbd1ffa remove session delete sync
Turns out this is important for high availability reworked probe and sdk
to deal with it as it was.
2020-08-26 13:35:03 -04:00
Andrew Martinez 006995db6c use fabric event system for session lifecycle 2020-08-25 13:15:47 -04:00
Andrew Martinez f92b88e395 Merge branch 'master' into stream.sessions.276 2020-08-24 08:40:29 -04:00
Andrew M faec4b95ba various fixes for API streaming and data net support
- http requests should hard timeout w/ a reasonable response
- edge routers should close when an API session token is not provided or
  does not match
- stream both types of sessions on edge router connect
- stream sessions for time out processing/deletion
- add id to session messages (edge control pb update, breaks backwards
  compat)
2020-08-24 08:31:45 -04:00
Paul Lorenz c179f87538 Improve session create performance. Closes GH-281 2020-08-20 12:35:04 -04:00
Paul Lorenz e2ad712948 Add edge session events API. Closes GH-229 2020-08-11 14:00:57 -04:00
Andrew M e39c21b6a1 e2e support fixes #173
- adds edge level edge_transport xgress
- adds service encyrptionRequired flag (rest API, protobuffs)
- adds edge router encryption checks
2020-07-27 16:18:46 -04:00
Paul Lorenz 8e7f096b22 Fix hello timeout by making it fully async. Fixes GH-248 2020-07-20 17:31:16 -04:00
Andrew M f76e2a1c55 remove old embedded files
- old postgres files
- packr migration adapter struct
- remove packr and sql migration deps
2020-07-09 14:58:40 -04:00
Andrew M 1242a1b950 fixes #240
- adds spec router
- updates swagger to allow for both JSON and YAML spec bodies
- pulls spec from generated rest server
2020-07-09 09:29:09 -04:00
Andrew M 6182beeffa rename text producer
- text producer is now pem producer only
- remove ability to render errors in pem producer
- update tests
- fix accept header processing for multiple accepts in one header
2020-07-07 11:44:40 -04:00
Andrew M 923b182b85 fixes #233 return API errors as JSON if possible 2020-07-01 15:54:20 -04:00
Andrew M 5ddefc25c2 Merge branch 'master' into use.shortids 2020-06-17 17:24:24 -04:00
Paul Lorenz 64ce3a92df move edge routers under fabric routers. Fixes GH-144 2020-06-17 16:36:14 -04:00
Andrew M 6571dbd72c use shortids 2020-06-16 17:33:45 -04:00
Andrew M 7d34b9eadf set base path to /edge/v1
- reroute API requests for the root to edge/v1 (i.e. / -> /edge/v1
- fix pagination empty values being omitted
2020-06-16 12:15:35 -04:00
Andrew M 0923db08d5 Merge branch 'master' into open.api 2020-06-15 13:49:23 -04:00
Andrew M ec0b662471 code review fixes 2020-06-11 00:46:12 -04:00
Paul Lorenz a3f9e3c978 Remove postgres code. Fixes GH-195 2020-06-10 15:52:45 -04:00
Paul Lorenz f0eb83e7fe Update for API changes and fix close bug. Fixes GH-189 (#190)
* Update for API changes and fix close bug. Fixes GH-189
2020-06-09 20:21:40 -04:00
Andrew M 3087972172 all conversion work
- remove old JSON schema, unsused code
- remove unused variables from base router functions
- rework all API entities
- rework all links
- fix lint issues
- adds error conversion logic
- update tests as needed
- fix up go test
- fix backwards compat w/ non json enroller
2020-06-09 14:11:23 -04:00
Andrew M b6d9efaf8c fixed #183, move to openziti 2020-05-26 17:37:35 -04:00
Andrew M e8b10600c4 fixes #147, identity naming durin auto enrollment
- allows CAs to specify a naming format for auto ca identities
- name collisions during auto enrollment now adds a six digit
  incrementing number
2020-05-20 13:00:54 -04:00
Paul Lorenz 00208186cf Merge pull request #156 from netfoundry/fix-server-first-race-condition
Fix server first race condition
2020-05-13 10:38:36 -04:00
Paul Lorenz 9b31a7e0f8 Enable server first rotating test. Lengthen timeout waiting for connection to quiesce. Fix some possible timing issues 2020-05-12 17:37:53 -04:00