Commit graph

53 commits

Author SHA1 Message Date
Abhishek K
230e062c84
GRA-1298: License check changes, free tier limits for saas (#2418)
* set free tier limits through config

* add host limit to config

* check for host limit on free tier

* fix license validation, replace node limit with hosts

* add hosts to telemetry data

* debug init

* validate license every 1hr

* hook manager, api to fetch server usage

* hook manager, server usage api

* encode json server usage api

* update ngork url

* update license validation endpoint

* avoid setting limits on eer

* adding hotfix

* correct users limits env var

* add comments to exported funcs

---------

Co-authored-by: afeiszli <alex.feiszli@gmail.com>
2023-06-28 20:33:06 +05:30
Abhishek K
6c2582651c
Net-137: Node relays (#2401)
* revert relays

* initial relay commit

* get relayed allowed ips

* add more relay validation checks, peer logic cleanup

* rm relayed nodes from relay node when relayed node is deleted

* fix egress updates for relayed nodes

* rm unused func

* remove  debug logs

* avoid adding egress ranges on the relayed gw node

---------

Co-authored-by: Matthew R Kasun <mkasun@nusak.ca>
2023-06-19 12:26:14 -04:00
Tobias Cudnik
723375b334
NET-152 enrollment keys for non admins (#2346)
* return 401 instead of 403

* fixed http.StatusForbidden

* Tagged build version (temp)

* Unauthorized_Err when applicable

* untagged version

* fixed PUT /api/users/networks/user1

* - expired token redirs to login
- added `/api/enrollment_keys` for non-admins
- unit test for enrollment keys for non-admins

* handle user perms in `/hosts`

* removed debug

* misc

* - support masteradmin
- return hosts with partial access

* added `ismaster` to middleware
2023-05-31 13:11:54 +05:30
Tobias Cudnik
3a4363c890
NET-163: Return 403 instead of 401 (#2326)
* return 401 instead of 403

* fixed http.StatusForbidden

* Tagged build version (temp)

* Unauthorized_Err when applicable

* untagged version
2023-05-25 09:40:39 -04:00
0xdcarns
7a2c225eb1 added mq and database connected funcs and endpoint 2023-02-06 12:09:21 -05:00
walkerwmanuel
6611941ca2 Replaced string methods with HTTP consts 2022-12-23 09:49:08 -05:00
Abhishek Kondur
a04549eebe rm register endpoint 2022-09-30 23:19:33 +05:30
Abhishek Kondur
faf7addcf5 Merge branch 'bugfix_v0.16.1_ee_checks' of https://github.com/gravitl/netmaker into feature_dyn_sec_latest 2022-09-26 18:09:34 +05:30
Abhishek Kondur
f632bec11d merge conflicts resolved 2022-09-26 17:47:20 +05:30
Abhishek Kondur
cbcb046139 added server health check api 2022-09-26 16:55:33 +05:30
Matthew R. Kasun
5f7d6ea1ef logic.Is_EE --> systemcfg.Is_EE 2022-09-25 07:11:26 -04:00
afeiszli
d19cac35fa removed remove network 2022-09-19 12:59:37 -04:00
Alex Feiszli
53d2250049
Merge branch 'develop' into bugfix_v0.16.0_swagger_sections 2022-09-19 12:55:32 -04:00
cameronts
4cc32a5b50 Fix sections for /server/ and /users/ paths in Swagger docs 2022-09-15 05:47:48 -07:00
afeiszli
b670755cce refactoring for ee 2022-09-14 13:26:31 -04:00
afeiszli
4917c457db added ee check 2022-09-13 15:44:45 -04:00
cameronts
661290c84d Update swagger docs 2022-09-10 21:51:59 -07:00
cameronts
cb23b871dd Added swagger for API docs. 2022-09-06 05:20:24 -07:00
Abhishek Kondur
0c9f3cf251 GRA-414: added additional logs for sever controllers 2022-07-12 20:03:14 +04:00
afeiszli
f28d361bea refactoring cert logic to use database 2022-06-30 22:30:28 -04:00
afeiszli
b281047168 adding functions to handle certs in DB 2022-06-30 21:56:11 -04:00
afeiszli
8d422526b3 refactoring servercfg 2022-05-31 12:07:56 -04:00
afeiszli
e4189ad8bd refactoring serverinfo logic 2022-05-31 08:42:12 -04:00
afeiszli
0865a535c7 changing broker retrieval/setting logic 2022-05-30 12:39:33 -04:00
Matthew R. Kasun
f5aa1d1e62 reorder register/join 2022-04-25 10:38:29 -04:00
Matthew R. Kasun
955e0e544c join as api call
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-20 15:46:19 -04:00
Matthew R. Kasun
2b1f20e94b changes from code review
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-18 18:21:55 -04:00
Matthew R. Kasun
1cbbd52e7d fixed comment
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-18 09:47:01 -04:00
Matthew R. Kasun
94b89dfff1 Merge branch 'feature_v0.13.0_mq_cleanup' into feature_v0.13.0_mq_register 2022-04-18 09:27:51 -04:00
Matthew R. Kasun
d312bf6636 return certs in correct order
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-18 09:22:11 -04:00
Matthew R. Kasun
f8fe382c02 cleanup and comments 2022-04-16 16:43:10 -04:00
Matthew R. Kasun
eae74e3430 gen certs with go rather than openssl 2022-04-16 08:37:55 -04:00
Matthew R. Kasun
a2805ddc80 register/cert gen 2022-04-16 08:27:22 -04:00
Matthew R. Kasun
4f19beda00 save returned certs/keys 2022-04-15 16:07:19 -04:00
0xdcarns
08e219cdcc idk 2022-04-15 15:20:46 -04:00
0xdcarns
1cf9ac77e9 changed encoding of structs 2022-04-15 15:03:54 -04:00
Matthew R. Kasun
7524f08146 response update
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-15 13:43:05 -04:00
Matthew R. Kasun
a6c388db67 use openssl to gen client key/cert 2022-04-15 13:32:10 -04:00
Matthew R. Kasun
84de5c5216 use issuer's public key for certs 2022-04-15 09:54:35 -04:00
Matthew R. Kasun
d50f7a8c0b revert to gen csr on client 2022-04-14 14:42:46 -04:00
Matthew R. Kasun
fb6059e4a1 wip 2022-04-14 14:14:37 -04:00
Matthew R. Kasun
38cf8b0ceb gen csr on server 2022-04-14 11:40:13 -04:00
Matthew R. Kasun
9677957023 logging 2022-04-14 09:22:07 -04:00
Matthew R. Kasun
5008462b3e send csr and get cert 2022-04-14 07:15:50 -04:00
Matthew R. Kasun
3e6a9be9ba return struct 2022-04-13 18:22:03 -04:00
Matthew R. Kasun
8c1eedc385 parse token correctly 2022-04-13 17:57:04 -04:00
Matthew R. Kasun
92d3e40bde logging 2022-04-13 17:33:40 -04:00
Matthew R. Kasun
867a616227 register command - server 2022-04-13 16:22:46 -04:00
0xdcarns
469618aa72 removed default master key and added warning log if not set 2022-02-15 10:12:37 -05:00
0xdcarns
916866f73c began refactor 2022-01-17 18:35:16 -05:00