Commit Graph

137 Commits

Author SHA1 Message Date
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
Andrew Martinez 5207dbb931 use UTC time 2021-01-19 08:53:21 -05:00
Andrew Martinez 2d61799c24 add posture check MFA tests 2021-01-19 08:37:29 -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 49804bd30b Merge pull request #470 from openziti/add.appid.appversion
Add appId and appVersion to sdkInfo
2021-01-18 15:03:29 -05:00
Paul Lorenz c5d3a4b69b Improve posture check perf using indexes 2021-01-18 14:15:30 -05:00
Andrew Martinez 65be49c609 Add appId and appVersion to sdkInfo 2021-01-18 10:38:43 -05:00
Andrew Martinez 807a061a93 adds expiration-seconds and expires-at headers
- also adds expiresSeconds to current api session and login
2021-01-14 11:30:44 -05:00
Paul Lorenz 5efbbf0942 Add health check implementation for tunnelers and add default hosting precedence and cost to identity 2021-01-12 11:00:43 -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 6ad6b3264c fixes #403
Process posture responses now allow an array of digital signer
fingerprints to be submitted and checked.
2020-11-11 21:31:17 -05:00
Andrew Martinez 108b657044 fix missing dangling period in os posture test 2020-11-11 20:51:54 -05:00
Andrew Martinez 48a3f5dc0b remove unused function 2020-11-11 20:39:35 -05:00
Andrew Martinez 4631fe1452 fixes #401
Valid x.y.z versions of OS posture checks can now be specified by
posture check ranges.
2020-11-11 20:32:48 -05:00
Andrew Martinez a80b27afe6 fix test based on pr 2020-11-11 19:11:05 -05:00
Andrew Martinez e0cf6a7ea5 fixes #397 and fixes #398
- isSigner is removed as it is not used
- process binary and signer hashes are case insensitive
2020-11-11 14:09:09 -05:00
Andrew Martinez 2ecdb921a9 fix process checks 2020-11-10 16:03:56 -05:00
Andrew Martinez 84225d2796 fixes #394
In scenarios where a service has no policies with any checks after
initialization, the posture checks would fail incorrectly.
2020-11-10 14:50:23 -05:00
Andrew Martinez 428135c4ad fix empty session type 2020-11-05 21:23:49 -05:00
Andrew Martinez e859ce6a67 filter posture check sets by bind type 2020-11-05 19:40:27 -05:00
Andrew 53f702c212 Merge pull request #369 from openziti/add.online.status
Add.online.status
2020-10-31 08:35:39 -04:00