✨ feat(apikey): adds command to delete api keys (#1702)
We currently do not have a way to clean up api keys. There may be cases where users of headscale may generate a lot of api keys and these may end up accumulating in the database. This commit adds the command to delete an api key given a prefix.
This commit is contained in:
parent
c4beb0b8af
commit
47405931c6
16 changed files with 543 additions and 163 deletions
|
@ -101,6 +101,36 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/apikey/{prefix}": {
|
||||
"delete": {
|
||||
"operationId": "HeadscaleService_DeleteApiKey",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1DeleteApiKeyResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/rpcStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "prefix",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"HeadscaleService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/debug/node": {
|
||||
"post": {
|
||||
"summary": "--- Node start ---",
|
||||
|
@ -945,6 +975,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1DeleteApiKeyResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"v1DeleteNodeResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue