Hello,
im struggle to delete old enrollment tokens under: Kibana -> Fleet -> Enrollment Tokens
Neither in the ui nor via the api i'm able to delete them.
In the ui they just are flagged as inactive and via the api "api/v1/platform/configuration/security/enrollment-tokens/" i always receive a 404.
Does anybody know how i can delete the old tokens to that they are no longer visible in the ui?
As far as I can see there is no API to delete revoked enrollment tokens the Fleet API is fairly new, but it may be for a design reason that I am unaware of...
This should work.. it does for me BUT It is a Kibana API so if you want to run it from the Kibana -> Dev Tools
GET kbn:api/fleet/enrollment_api_keys ....^^^
That kbn says run the Kibana API not the default Elasticsearch Endpoint
If you run from curl / command line then you need to run the Kibana API per the docs to the Kibana Endpoint (not Elasticsearch Endpoint) see here you can use basic auth too.
Hi @stephenb ,
thank you for the reply. Yes the GET is working, i did try a DELETE because i would like to delete the old tokens which are not longer usable.
That is a completely separate API / Capability about adding / enrolling new Servers into Elastic Cloud Enterprise environment ... are you running Elastic Cloud Enterprise? I suspect Not, you would know if you were.
What are you running Self Managed or Elastic Cloud?
That API has nothing to do with Fleet / Agent Enrollment Tokens, similar names etc but not Fleet / Agent.
Hi @stephenb,
ah okay maybe i did read the wrong docs. But in the docs provided by you there is a swagger documentation linked which do show a get and a delete for the enrollment api keys.
When i try to use the path provided by swagger i receive a:
{
"error": "no handler found for uri [/api/fleet/enrollment-api-keys] and method [GET]"
}
Is there a way in the ui to check which API url to use? Maybe the API url i use is wrong.
Show me EXACTLY how you are running the command... from what tool? from Kibana? From Curl, From some other tool ... the APIs work ... you just showed me
Make sure you set those AND you are pointing to Kibana not Elasticsearch
Kibana APIs must point to Kibana : The Kibana endpoint is whatever you have our Browser pointed to for Kibana.
All the Elasticsearch APIs point to Elasticsearch... that is a common problem.
Yes Open a ticket BUT... I suspect support is going to tell you this about the API
Kibana Fleet APIs
This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
But I would submit it anyways so it shows up as a Bug.
And only Revoke is supported in the UI today not delete so that is supported, I suspect the Delete will come in the future...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.