WARNING: Version 6.0 of Winlogbeat has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Configuring Authentication Credentials for Winlogbeat
editConfiguring Authentication Credentials for Winlogbeat
editWhen sending data to a secured cluster through the elasticsearch
output, Winlogbeat must either provide basic authentication credentials
or present a client certificate.
To configure authentication credentials for Winlogbeat:
-
Create a role that has the
manage_index_templatesandmonitorcluster privileges, andread,write, andcreate_indexprivileges for the indices that Winlogbeat creates. You can create roles from the Management / Roles UI in Kibana or through theroleAPI. For example, the following request creates awinlogbeat_writerrole: -
Assign the writer role to the user that Winlogbeat will use to connect to Elasticsearch:
-
To authenticate as a native user, create a user for the Winlogbeat to use internally and assign it the writer role. You can create users from the Management / Users UI in Kibana or through the
userAPI. For example, the following request creates awinlogbeat_internaluser that has thewinlogbeat_writerrole:POST /_xpack/security/user/winlogbeat_internal { "password" : "x-pack-test-password", "roles" : [ "winlogbeat_writer"], "full_name" : "Internal Winlogbeat User" } -
To authenticate using PKI authentication, assign the writer role to the internal Winlogbeat user in the
role_mapping.ymlconfiguration file. Specify the user by the distinguished name that appears in its certificate.winlogbeat_writer: - "cn=Internal Winlogbeat User,ou=example,o=com"
For more information, see Using Role Mapping Files.
-
-
Configure authentication credentials for the
elasticsearchoutput in the Winlogbeat configuration file:-
To use basic authentication, configure the
usernameandpasswordsettings. For example, the following Winlogbeat output configuration uses the nativewinlogbeat_internaluser to connect to Elasticsearch:output.elasticsearch: hosts: ["localhost:9200"] index: "winlogbeat" username: "winlogbeat_internal" password: "x-pack-test-password" -
To use PKI authentication, configure the
certificateandkeysettings:
-