-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Central & Network ManagementZeroTier Central & networking managementZeroTier Central & networking managementStatus: BacklogOlder issues that are awaiting resolutionOlder issues that are awaiting resolutionType: BugBug to be resolvedBug to be resolved
Description
Deleting a network member using the controller API does not actually delete the resource.
Instead, it looks like it just does the equivalent of a GET.
I would have expected the member to be removed, and the result code to be an HTTP 204 (No Content) result with no JSON body.
Note that this is on a macOS host with the most recent code. API version 4. The member was originally created using a POST to the API.
Best example is curl trace:
garrett@garretts-mbp{11}% curl -v -X DELETE -H 'X-ZT1-Auth: 62865eee65d89bd17465264a' http://localhost:9993/controller/network/2d2f619ccc8d59ee/member/0123456789
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9993 (#0)
> DELETE /controller/network/2d2f619ccc8d59ee/member/0123456789 HTTP/1.1
> Host: localhost:9993
> User-Agent: curl/7.54.0
> Accept: */*
> X-ZT1-Auth: 62865eee65d89bd17465264a
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: application/json
< Content-Length: 540
< Connection: close
<
{
"activeBridge": false,
"address": "0123456789",
"authorized": false,
"capabilities": [],
"creationTime": 1537894419768,
"id": "0123456789",
"ipAssignments": [],
"lastAuthorizedCredential": null,
"lastAuthorizedCredentialType": "api",
"lastAuthorizedTime": 1537894459717,
"lastDeauthorizedTime": 1537894473719,
"noAutoAssignIps": false,
"nwid": "2d2f619ccc8d59ee",
"objtype": "member",
"remoteTraceLevel": 0,
"remoteTraceTarget": null,
"revision": 3,
"tags": [],
"vMajor": -1,
"vMinor": -1,
"vProto": -1,
"vRev": -1
* Closing connection 0
}
Then if you look again, it's still there:
garrett@garretts-mbp{12}% curl -v -H 'X-ZT1-Auth: 62865eee65d89bd17465264a' http://localhost:9993/controller/network/2d2f619ccc8d59ee/member
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9993 (#0)
> GET /controller/network/2d2f619ccc8d59ee/member HTTP/1.1
> Host: localhost:9993
> User-Agent: curl/7.54.0
> Accept: */*
> X-ZT1-Auth: 62865eee65d89bd17465264a
>
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Type: application/json
< Content-Length: 46
< Connection: close
<
* Closing connection 0
{"2d2f619ccc":1,"0123456789":3,"964474c234":1}
I have not tested this via the "Central API" yet, but that's next.
Metadata
Metadata
Assignees
Labels
Central & Network ManagementZeroTier Central & networking managementZeroTier Central & networking managementStatus: BacklogOlder issues that are awaiting resolutionOlder issues that are awaiting resolutionType: BugBug to be resolvedBug to be resolved