Managing access with API keys
In the previous recipes, we learned how to manage access control in Kibana with roles. This is very useful for the interactive usage of Kibana. API keys are ideal for service-to-service authentication such as Logstash-to-Elasticsearch communication. This approach aligns with security best practices by separating human user access from service accounts and automating the seamless rotation and revocation of keys where necessary. In this recipe, we will learn how to create and use API keys and how to apply correct access control to them.
Getting ready
Make sure that you have completed the Installing self-managed Logstash and Creating a Logstash pipeline recipes in Chapter 5.
Make sure that you have admin access to the virtual machine that hosts the Logstash installation.
The snippets in this recipe are available at the following link: https://github.com/PacktPublishing/Elastic-Stack-8.x-Cookbook/blob/main/Chapter11/snippets.md#managing-access...