36 Commits

Author SHA1 Message Date
eugene 2ebe5b5a70 cleanup model: remove raw map field support 2024-08-23 13:21:39 -04:00
eugene 0696667408 more renames and cleanup 2024-08-16 11:31:06 -04:00
eugene 4e59f70dea model improvements:
- rename string to model_string to avoid collision in C++ world
- replace using int with number(int64_t)
2024-08-16 10:05:27 -04:00
eugene dac50e06f5 fix timeval_to_json 2024-06-14 11:16:38 -04:00
eugene 3556ab57d6 use json-c for parsing 2024-06-14 11:16:38 -04:00
Shawn Carey ecfee7b2ec iterate model_list fields when comparing models (#476) 2022-11-10 12:09:56 -05:00
Eugene K 95627d14d8 upgrade testing to Catch2 v3 2022-07-29 11:35:21 -04:00
Eugene K 8ecf2843d2 fix test memory leaks 2022-06-29 12:08:28 -04:00
Eugene K 66d4513ea2 implement duration type 2022-06-03 11:10:21 -04:00
Eugene K 301737de5c add model_list_clear() and generated model function that can be used to clear elements 2022-06-01 19:21:20 -04:00
Eugene K bd542ca9b6 add parse_xxx_list() test 2022-05-31 17:40:05 -04:00
Eugene K 2034cf5e2c add list support in ziti model 2022-05-31 17:12:40 -04:00
Shawn Carey cffc6fa4bb Propagate json parser errors through model_parse functions (#378)
pass jsmn_parse errors through model parse functions.
2022-05-02 14:30:11 -04:00
ekoby da0627d981 change parse_XXX() functions to return number of parsed bytes (#330) 2021-12-10 12:40:40 -05:00
ekoby beb29c3b94 map enhancements: (#319)
- support arbitrary keys
- convenience functions for integer/long keys
- avoid memory allocations for short(length <= pointer size) keys
2021-10-10 20:02:05 -04:00
ekoby ad07844160 fix parsing null JSON fields (#285) 2021-06-08 09:03:06 -04:00
Eugene K b89a4e33be add JSON-to-fixed buffer serialization 2021-03-15 12:59:21 -04:00
Eugene K f2fd9c2fb3 add compact json option flag 2021-03-15 09:11:31 -04:00
Eugene K 14025f2c35 NULL check 2021-03-12 17:22:15 -05:00
Eugene K f9be69dbbb correct sample-enroll to new usage 2021-03-12 16:25:55 -05:00
Eugene K 80fa8fdffd replace JSON serialization 2021-03-12 16:25:55 -05:00
Eugene K 98aadb0fe9 better model to JSON 2021-03-12 16:25:55 -05:00
Eugene K 63f5b87655 add negative tests 2021-03-03 15:06:38 -05:00
Eugene K bea79fe76e parse \\u JSON escaped characters, more valid JSON output 2021-03-03 14:54:45 -05:00
ekoby 6ee97bd322 Ziti conn improvement (#206)
* improve ziti_connection lifecycle

[fixes #154]
- ziti_close() now takes a callback
- avoid crash if we receive close before connect reply
2020-12-21 15:35:28 -05:00
ekoby 5bc3142f01 implement ziti_context level events (#203)
* implement ziti_context level events
* implement service events
* implement router events
* add docs
* add convenience accessors
* better handle controller errors:
  - Controller unavailable: start re-try timer;
  - Authentication failure -- re-auth/login, if that fails stop ziti_context

* Cleanup API
* turn off controller keep-alive
* fix model string compare with NULL strings
2020-12-17 09:14:24 -05:00
ekoby 1076df0f53 set conn.encrypted flag (#176)
* set conn.encrypted flag

* fix tests
2020-11-20 07:43:49 -05:00
Andrew Martinez f550f08b74 add null array, posture query tests 2020-11-07 16:17:23 -05:00
ekoby b1178364f5 fix comparison of map fields (#145) 2020-09-17 09:55:29 -04:00
ekoby e403e6c42b Model tags support (#133)
* implement field map modifier
* add tags support
* add tags to ziti_identity
2020-07-30 22:23:09 -04:00
ekoby 2f1deebdb5 More enrollment (#129)
* pkcs7 parsing moved to TSL engine
* use new TLS API during enrollment (no direct mbedTLS dependencies)
* bump uv-mbed to v0.6.2
* make ziti_config model public API
* add JSON serialization support
* add support for CA enrollment methods (ottca, ca)
* bump version: enrollment API changed
* add login request type
* remove mjson dependency
2020-07-21 15:42:15 -04:00
ekoby b548742c58 Ziti api rename (#99)
* rename include folder

* rename:
* nf_ctx -> ziti_ctx
* NF_init -> ziti_init
* nf_options -> ziti_options

* rename:
* nf_conn -> ziti_conn
* nf_xxx callbacks

* rename:
* rest of ziti.h

* cleanup proxy

* level up

* clean up samples

* rename nf_config -> ziti_config

* no more `nf`
2020-05-18 13:14:08 -04:00
ekoby 37aac597c5 fix string array compares (#98)
add timestamp compare
2020-05-13 11:32:02 -04:00
ekoby c328d31b86 notify app of service config changes (#97)
* [fixes #65]
* provide support for detecting model changes (`cmp_entity(entity *lh, entity *rh)`)
* call service update callback when configuration changes are detected
2020-05-13 08:55:09 -04:00
ekoby d62dfa2f40 Service config (#71)
* add generic JSON map support, NF_init options
* request config types
* move ziti_identity, ziti_service to sdk API
pass full service structure to nf_service_cb
add access functions to service configs
2020-04-03 23:16:21 -04:00
ekoby f496ff4700 Better model (#70)
* New model macros and implementation, major changes:
* parsing functions now have the following signature `int parse_XXX(XXX*, const char*, size_t)` and return negative value if parsing fails
* nested structures can be embedded as well pointer referenced
* use jsmn (https://github.com/zserge/jsmn) for more efficient parsing
* elevate model support (macros and implementation) to API to allow SDK apps to define custom models
* convert ziti model to new implementation
* add raw json fields support
* properly export model support functions
2020-04-02 16:41:32 -04:00