package Search::Elasticsearch::Client::6_0::Direct::XPack::Security; $Search::Elasticsearch::Client::6_0::Direct::XPack::Security::VERSION = '6.80'; use Moo; with 'Search::Elasticsearch::Client::6_0::Role::API'; with 'Search::Elasticsearch::Role::Client::Direct'; use namespace::clean; __PACKAGE__->_install_api('xpack.security'); 1; # ABSTRACT: Plugin providing Security API for Search::Elasticsearch 6.x __END__ =pod =encoding UTF-8 =head1 NAME Search::Elasticsearch::Client::6_0::Direct::XPack::Security - Plugin providing Security API for Search::Elasticsearch 6.x =head1 VERSION version 6.80 =head1 SYNOPSIS my $response = $es->xpack->security->authenticate(); =head2 DESCRIPTION This class extends the L client with a C namespace, to support the L. The full documentation for the Security feature is available here: L =head1 GENERAL METHODS =head2 C $response = $es->xpack->security->authenticate() The C method checks that the C is correct and returns a list of which roles are assigned to the user. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->clear_cached_realms( realms => $realms # required (comma-separated string) ); The C method clears the caches for the specified realms Query string parameters: C, C, C See the L for more information. =head1 USER METHODS =head2 C $response = $es->xpack->security->put_user( username => $username, # required body => {...} # required ); The C method creates a new user or updates an existing user. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->get_user( username => $username | \@usernames # optional ); The C method retrieves info for the specified users (or all users). See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->delete_user( username => $username # required ); The C method deletes the specified user. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->change_password( username => $username # optional body => { password => $password # required } ) The C method changes the password for the specified user. See the L for more information. =head2 C $response = $es->xpack->security->disable_user( username => $username # required ); The C method disables the specified user. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->enable_user( username => $username # required ); The C method enables the specified user. See the L for more information. Query string parameters: C, C =head1 ROLE METHODS =head2 C $response = $es->xpack->security->put_role( name => $name, # required body => {...} # required ); The C method creates a new role or updates an existing role. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->get_role( name => $name | \@names # optional ); The C method retrieves info for the specified roles (or all roles). See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->delete_role( name => $name # required ); The C method deletes the specified role. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->clear_cached_roles( names => $names # required (comma-separated string) ); The C method clears the caches for the specified roles. See the L for more information. Query string parameters: C, C =head1 ROLE MAPPING METHODS =head2 C $response = $es->xpack->security->put_role_mapping( name => $name, # required body => {...} # required ); The C method creates a new role mapping or updates an existing role mapping. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->get_role_mapping( name => $name, # optional ); The C method retrieves one or more role mappings. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->delete_role_mapping( name => $name, # required ); The C method deletes a role mapping. See the L for more information. Query string parameters: C, C =head1 TOKEN METHODS =head2 C $response = $es->xpack->security->get_token( body => {...} # required ); The C method enables you to create bearer tokens for access without requiring basic authentication. See the L for more information. Query string parameters: C, C =head2 C $response = $es->xpack->security->invalidate_token( body => {...} # required ); The C method enables you to invalidate bearer tokens for access without requiring basic authentication. See the L for more information. Query string parameters: C, C =head1 API KEY METHODS =head2 C $response = $es->xpack->security->create_api_key( body => {...} # required ) The C API is used to create API keys which can be used for access instead of basic authentication. Query string parameters: C, C, C, C See the L for more. =head2 C $response = $es->xpack->security->get_api_key( id => $id, # optional name => $name, # optional realm_name => $realm, # optional username => $username # optional ) The C API is used to get information about an API key. Query string parameters: C, C, C, C, C, C, C See the L for more. =head2 C $response = $es->xpack->security->invalidate_api_key( id => $id, # optional name => $name, # optional realm_name => $realm, # optional username => $username # optional ) The C API is used to invalidate an API key. Query string parameters: C, C, C, C, C, C, C See the L for more. =head1 USER PRIVILEGE METHODS =head2 C $response = $es->xpack->get_user_privileges(); The C method retrieves the privileges granted to the current user. Query string parameters: C, C, C =head2 C $response = $es->xpack->has_privileges( user => $user, # optional body => {...} # required ); The C method checks whether the current or specified user has the listed privileges. Query string parameters: C, C, C See the L for more. =head1 APPLICATION PRIVILEGE METHODS =head2 C $response = $es->xpack->put_privileges( application => $application, # required name => $name, # required body => {...} # required ); The C method creates or updates the named privilege for a particular application. Query string parameters: C, C, C, C See the L for more. =head2 C $response = $es->xpack->get_privileges( application => $application, # required name => $name, # required ); The C method retrieves the named privilege for a particular application. Query string parameters: C, C, C See the L for more. =head2 C $response = $es->xpack->delete_privileges( application => $application, # required name => $name, # required ); The C method deletes the named privilege for a particular application. Query string parameters: C, C, C, C See the L for more. =head1 AUTHOR Enrico Zimuel =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2020 by Elasticsearch BV. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut