mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 12:37:42 +00:00
✨ 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:
@@ -33,3 +33,10 @@ message ListApiKeysRequest {
|
||||
message ListApiKeysResponse {
|
||||
repeated ApiKey api_keys = 1;
|
||||
}
|
||||
|
||||
message DeleteApiKeyRequest {
|
||||
string prefix = 1;
|
||||
}
|
||||
|
||||
message DeleteApiKeyResponse {
|
||||
}
|
||||
|
@@ -178,6 +178,12 @@ service HeadscaleService {
|
||||
get : "/api/v1/apikey"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteApiKey(DeleteApiKeyRequest) returns(DeleteApiKeyResponse) {
|
||||
option(google.api.http) = {
|
||||
delete : "/api/v1/apikey/{prefix}"
|
||||
};
|
||||
}
|
||||
// --- ApiKeys end ---
|
||||
|
||||
// Implement Tailscale API
|
||||
|
Reference in New Issue
Block a user