Commit graph

78 commits

Author SHA1 Message Date
Abhishek K 5a4d0663da
NET-1227: User Cli cmds Update (#3064)
* generalise smtp config

* copy over smtp vars

* env new line

* fix master key api access

* comment user tests

* fix network and user invite for master key access

* remove email sender type

* user mgmt commands

* check user role on CE

* user role nmtcl cmds

* user groups commands

* fix role and groups command

* fix user create cmd

* add usage info

* rm user role check

* fix user update cmd

* fix static check
2024-08-25 07:25:40 +05:30
Max Ma c7469c79d0 rename isstaticendpoint to isstatic 2024-06-03 10:37:19 +02:00
Max Ma 81a6c9cf8a seperate static port and static endpoint 2024-05-28 10:16:11 +02:00
Max Ma 5740c3e009
Net 1115 (#2890)
* add endpointipv6 for host

* keep endpointipv6 unchanged when enable static endpoint

* handle ipv6 endpoint updates

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-04-11 17:37:45 +05:30
Max Ma e0bde5b67f
Net 1088 (#2872)
* fix ipv6 only issue

* fix InetGw ipv6 issue

* refactor constants for NET1088

* fix extClient IPv6 empty issue
2024-04-09 11:50:07 +05:30
Max Ma b59658024c
add enable/disable failover in nmctl command (#2857) 2024-03-20 15:12:42 +07:00
pwillis7 3b533952df
NET-1050: change ingress refs in NMCTL to remote access gateways (#2852) 2024-03-12 08:17:34 +07:00
Aceix b8c1dde152
fix(NET-1044): use new update acls endpoint (#2842)
allow for updating both node and client acls
2024-03-05 18:02:27 +07:00
Aceix 61d6b2fa3f
fix(NET-799): fix acl allow/deny subcommands (#2736) 2023-12-20 13:30:45 +04:00
Aceix 8aa185d880
feat(NET-678): add saas support to nmctl (#2687)
* feat(NET-678): add saas support to nmctl

* fix(NET-678): fix context endpoint for sso
2023-12-13 14:04:09 +04:00
Gabriel de Souza Seibel cb4b99ffcb
[NET-562] Persistent Keep Alive from node to host (#2604)
* Move PKA field from models node to host level

* Move PKA field from api models node to host level

* Adapt logic package to node->host PKA

* Adapt migration-related code to node->host PKA

* Adapt cli code to node->host PKA

* Change host PKA default to 20s

* On IfaceDelta, check for PKA on host

* On handleHostRegister, set default PKA

* Use a default PKA

* Use int64 for api host pka

* Reorder imports

* Don't use host pka in iface delta

* Fix ConvertAPIHostToNMHost

* Add swagger doc for host PKA field

* Fix swagger.yml

* Set default PKA only for new hosts

* Remove TODO comment

* Remove redundant check

* Have api-host pka be specified in seconds
2023-10-06 10:09:19 +04:00
Matthew R Kasun 823182cf09
add force flag to host/node delete (#2548)
* add force flag to host/node delete

* review comments

---------

Co-authored-by: Abhishek K <32607604+abhishek9686@users.noreply.github.com>
2023-09-13 10:10:17 +05:30
Matthew R Kasun 1e2fae0652
remove node uncordon (#2549) 2023-09-11 09:48:42 +05:30
Abhishek K 719e0c254d
NET-551: User Mgmt Re-Design (#2547)
* add superadmin role, apis to create superadmin user

* apis to attach and remove user from remote access gateways

* add api to list user's remote client has gateway clients

* remove code related user groups

* remove networks and groups from user model

* refactor user CRUD operations

* fix network permission test

* add superadmin to authorize func

* remove user network and groups from cli

* api to transfer superadmin role

* add api to list users on a ingress gw

* restrict user access to resources on server

* deny request from remote access client if extclient is already created

* fix user tests

* fix static checks

* fix static checks

* add limits to extclient create handler

* set username to superadmin on if masterkey is used

* allow creation of extclients using masterkey

* add migration func to assign superadmin role for existing admin user

* check for superadmin on migration if users are present

* allowe masterkey to extcleint apis

* check ownerid

* format error, on jwt token verification failure return unauthorized rather than forbidden

* user update fix

* move user remote functionality to ee

* fix update user api

* security patch

* initalise ee user handlers

* allow user to use master key to update any user

* use slog

* fix auth user test

* table headers

* remove user role, it's covered in middleware

* setuser defaults fix
2023-09-01 14:27:08 +05:30
Gabriel de Souza Seibel 1a1ba1ccf4
[NET-546] Move ee code to ee package, unify ee status and terminology (#2538)
* Move ee code to ee package and unify ee status to IsPro

* Consolidate naming for paid/professional/enterprise version as "pro". Notes:

- Changes image tags
- Changes build tags
- Changes package names
- Doesn't change links to docs that mention "ee"
- Doesn't change parameters sent to PostHog that mention "ee"

* Revert docker image tag being -pro, back to -ee

* Revert go build tag being pro, back to ee

* Add build tags for some ee content

* [2] Revert go build tag being pro, back to ee

* Fix test workflow

* Add a json tag to be backwards compatible with frontend "IsEE" check

* Add a json tag for the serverconfig struct for IsEE

* Ammend json tag to Is_EE

* fix ee tags

---------

Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2023-09-01 07:42:05 +05:30
Abhishek K 645bc4c126
NET-447: Removed proxy related fields and code (#2459)
* remove related fields and code

* remover metrics collection from server code

* fw update struct

* add ext client flag to metrics data

* simply nat types

* rm proxy update from cli
2023-07-26 11:22:49 +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
Matthew R Kasun 78640f1342
Extclient NET-63x (#2286)
* model changes

* additional fields for extclient create

* add DNS to extclient config

* extclient name checks

* update extclient

* nmctl extclient

* final tweaks

* review comments

* add extclientdns to node on ingress creation

* fix to add ingress dns to api (#2296)

---------

Co-authored-by: Aceix <aceixsmartX@gmail.com>
2023-05-17 10:58:03 -04:00
dcarns 249cf5f474
Merge pull request #2205 from gravitl/GRA-1529n-key-update
Gra 1529n key update
2023-04-18 17:06:35 -04:00
Matthew R Kasun 34eb699752 deprecated ability to edit networks 2023-04-14 10:39:36 -04:00
Matthew R Kasun 7d8aeb66c1 correct api path 2023-04-13 17:36:27 -04:00
Matthew R Kasun 12004aa09a refactor key updates on host basis vice node 2023-04-13 16:08:39 -04:00
0xdcarns 0b7df753f7 removed references to AccessKey model 2023-03-13 16:02:44 -04:00
Anish Mukherjee 8e09684def add json format output alternative to tables 2023-03-06 12:08:46 +05:30
Anish Mukherjee 9e8f41f491 remove [--args] from definition 2023-03-02 17:45:10 +05:30
Anish Mukherjee c5311c0cd5 add enrollment key to nmctl 2023-03-02 17:40:31 +05:30
Matthew R Kasun 828b3f7162 remove local network/range 2023-02-26 16:28:16 -05:00
Anish Mukherjee 6a03947384 update host network modification endpoints 2023-02-14 17:25:22 +05:30
Abhishek Kondur 98c70e8a20 pr comments 2023-02-06 22:46:50 +04:00
Matthew R Kasun 77cfae41ff remove postup/down 2023-02-02 11:16:54 -05:00
Matthew R Kasun 92af578ab1 remove point to site from nmctl 2023-01-30 11:04:22 -05:00
dcarns d22a38a4d0
Merge pull request #1972 from gravitl/bugfix_nmctl_host_default
Fix nmctl host update
2023-01-25 12:48:00 -05:00
Anish Mukherjee ebb1349228 fix nmctl node update 2023-01-25 18:02:30 +05:30
Anish Mukherjee 5c1d91ad72 fix host update 2023-01-25 16:34:48 +05:30
Anish Mukherjee 02ba1ce6ae move relay logic to hosts 2023-01-24 16:00:12 +05:30
Matthew R Kasun 9edb541388 remove localrange 2023-01-20 05:42:05 -05:00
Anish Mukherjee f04828f1d4 update node models to ApiNode 2023-01-16 10:32:26 +05:30
Anish Mukherjee 905f5ef5e2 add flags for host update 2023-01-06 10:28:08 +05:30
Anish Mukherjee e600fe32ed remove toggle flag 2023-01-06 10:09:35 +05:30
Anish Mukherjee 46f4f4f4c6 minor refactor 2023-01-05 19:27:42 +05:30
Anish Mukherjee 90ef4fd168 use new node structs 2023-01-05 19:25:47 +05:30
Anish Mukherjee 016e7fd2f9 cleanup comments 2023-01-05 18:53:12 +05:30
Anish Mukherjee 8b5eb0cbd4 add host endpoints to cli 2023-01-05 18:53:12 +05:30
dcarns ae6a12b16b
Merge pull request #1887 from gravitl/feature_cli_sso
Add headless oauth login endpoint for CLI
2023-01-03 13:27:18 -05:00
Matthew R. Kasun 66723bf0e4 change cli name to nmctl 2023-01-03 10:36:58 -05:00
Anish Mukherjee fd21d960fc minor refactor 2023-01-02 16:06:14 +05:30
Anish Mukherjee 93fdf359b3 add callback for headless sso 2023-01-02 14:48:39 +05:30
Anish Mukherjee 289bb3e5ec add headless sso login 2023-01-02 13:18:40 +05:30
Anish Mukherjee 2a5b973144 fix grammatical error 2022-12-09 22:28:03 +05:30