Commit Graph

157 Commits

Author SHA1 Message Date
Andrew Martinez 329a18af87 assume legacy unless c-sdk 2021-07-23 09:57:49 -04:00
Andrew 20017f5a08 Merge pull request #721 from openziti/fix.pd.concurrent.map.usage
respect posture data concurrent lock
2021-07-23 09:27:03 -04:00
Andrew Martinez 4112c6d241 respect posture data concurrent lock 2021-07-23 08:49:00 -04:00
Andrew Martinez c6f37bef67 adds wake/unlock timeout unit tests 2021-07-22 14:52:12 -04:00
Andrew Martinez 6a522893fc adds timeoutRemainingSeconds for posture queries 2021-07-21 14:20:26 -04:00
Paul Lorenz f34d540765 Update pfxlog to 0.5.1 2021-07-16 15:24:14 -04:00
Andrew Martinez a35e088e8e fixes an issue where posture timeouts would not be enforced for 1st sess 2021-07-16 09:25:53 -04:00
Andrew Martinez bb4dbd90b9 adjust for c-sdk 0.25.0 release 2021-07-09 17:32:36 -04:00
Andrew Martinez 0dbd5e515b adds unit tests for legacy version mfa checks 2021-07-09 15:51:57 -04:00
Andrew Martinez efcb90c033 add all sdk version info to posture data 2021-07-09 15:27:23 -04:00
Andrew Martinez 47499bc4f1 add mfa options
- allow timeouts for MFA posture checks
- allow wake/unlocked MFA options
- allow legacy toggle for SDKs that don't supply endpoint state
- supply timeouts on posture checks
- posture data now caches session state
2021-07-07 08:39:39 -04:00
Andrew 825c0a327a Merge pull request #685 from openziti/fix.process.multi.patch
fixes issues with process multi's patch
2021-06-14 14:18:56 -04:00
Andrew Martinez 572e606a0b adds posture check patch tests 2021-06-14 11:12:32 -04:00
Paul Lorenz ef8847b34e Delete expired api sessions in batches. Remove some unused methods 2021-06-09 15:40:42 -04:00
Andrew Martinez 177379aa8e fix durations w/ no units 2021-06-03 08:52:24 -04:00
Paul Lorenz 9af29b5072 Add appData to filtered jsonfields. Remove unused identity checker field 2021-05-18 21:08:19 -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 1919b6b5a4 Merge branch 'main' into posture.multi.process 2021-04-28 11:08:28 -04:00
Paul Lorenz d313d39a80 When empty router name specified, return 4xx error instead of 5xx error 2021-04-23 14:18:40 -04:00
Andrew Martinez 54af8801e7 adds posture check type PROCESS_MULTI
- adds a new posture check for dealing with multiple processes
- supports anyOf and allOf semantics
- does not require new posture responses, current process responses
  suffice
- tests
2021-04-20 08:52:23 -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 b278f611d0 add policyType to posture query sets
- also fixes policy ids being set as the same value due to pointer in
  for loop reference
2021-04-13 15:26:17 -04:00
Paul Lorenz b493cce490 Add app data to identity and edge router. Add isSystem to ERP 2021-04-06 10:07:57 -04:00
Paul Lorenz 8f6234842e Add per-service identity hosting precedence/costs 2021-04-06 09:51:22 -04:00
Paul Lorenz 038e9bdd91 Add support for host.v1. Add health checks to host.v1. Add host.v2 (multiple terminators). Add support for health events. 2021-03-25 15:43:07 -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
Andrew Martinez 993f51f7ab set mfa posture on enroll
- update api session session state on mfa enroll
- update posture data state on mfa enroll
- centralize setting mfa posture data
- pass isMfaRequired and isMfaComplete in apiSession/currentApiSession
2021-03-23 09:54:46 -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
Paul Lorenz 71a3a1643e Pass FieldChecker to toBoltEntityForPatch. Add some ReadByName methods. Move some code to allow re-use 2021-03-17 10:41:21 -04:00
Andrew 2b9388b7ea Merge pull request #585 from openziti/make.api.session.batch
use batch for api access last updates
2021-03-15 13:27:41 -04:00
Andrew Martinez fb9e4569f8 use mock api session 2021-03-15 11:25:07 -04:00
Andrew Martinez 5841f6fa70 use batch for api access last updates 2021-03-15 11:14:45 -04:00
Andrew Martinez 50f3145e1c invalid posture errors now only include actual failing checks
- reduce looping
- save only failing checks
- output only failing checks as the cause of INVALID_POSTURE
2021-03-11 15:14:33 -05:00
Andrew 9612637454 Merge pull request #573 from openziti/thread.safe.router.state
adds thread safe router state
2021-03-08 16:19:54 -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 0066137733 If api session not found, skip rest of loop 2021-03-08 10:27:10 -05:00
Andrew Martinez 3edbc4a16e reduce from 80 bytes to 80 bits
Our secrets were huuuuuge.
2021-03-05 10:03:50 -05:00
Paul Lorenz 735eb1d80f Move ApiError and FieldError to foundation 2021-03-03 14:44:26 -05:00
Paul Lorenz 155bbd8217 Validate sessions on controller instead of edge router 2021-02-17 20:38:13 -05:00
Andrew Martinez 707a5a7362 Merge branch 'main' into additional.posture.os.unit.tests 2021-02-17 13:11:04 -05:00
Andrew Martinez 919d7a3d6b add hearbeat invalid api token delete 2021-02-17 12:19:06 -05:00
Andrew Martinez 7eb3699f9b additional os posture checks 2021-02-16 13:24:21 -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 2360d44b05 moves posture data to not time out 2021-02-10 16:51:40 -05:00
Andrew Martinez 5c47c31016 moves hasApiSession lookup to api model and limit 1
This move isolates the cost of hasApiSession to the identity endpoint
lookups in the REST API. Being in the model caused this cost to be
shared on all identity lookups for internal logic.

Limit 1 is an attempt to reduce the cost of searching over a large set.
API Sessions do not have an index on identity id so there is still some
cost.
2021-02-03 14:01:53 -05:00
Andrew Martinez ab9e19f485 fix unit tests 2021-01-26 14:33:34 -05:00
Andrew Martinez a4a872c377 remove test sleeps, use const for window size 2021-01-26 14:08:16 -05:00