.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Search::Elasticsearch::Client::6_0::Direct::XPack::Security 3pm" .TH Search::Elasticsearch::Client::6_0::Direct::XPack::Security 3pm "2020-06-29" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Search::Elasticsearch::Client::6_0::Direct::XPack::Security \- Plugin providing Security API for Search::Elasticsearch 6.x .SH "VERSION" .IX Header "VERSION" version 6.81 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& my $response = $es\->xpack\->security\->authenticate(); .Ve .SS "\s-1DESCRIPTION\s0" .IX Subsection "DESCRIPTION" This class extends the Search::Elasticsearch client with a \f(CW\*(C`security\*(C'\fR namespace, to support the Security APIs . .PP The full documentation for the Security feature is available here: .SH "GENERAL METHODS" .IX Header "GENERAL METHODS" .ie n .SS """authenticate()""" .el .SS "\f(CWauthenticate()\fP" .IX Subsection "authenticate()" .Vb 1 \& $response = $es\->xpack\->security\->authenticate() .Ve .PP The \f(CW\*(C`authenticate()\*(C'\fR method checks that the \f(CW\*(C`userinfo\*(C'\fR is correct and returns a list of which roles are assigned to the user. .PP See the authenticate docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """clear_cached_realms()""" .el .SS "\f(CWclear_cached_realms()\fP" .IX Subsection "clear_cached_realms()" .Vb 3 \& $response = $es\->xpack\->security\->clear_cached_realms( \& realms => $realms # required (comma\-separated string) \& ); .Ve .PP The \f(CW\*(C`clear_cached_realms()\*(C'\fR method clears the caches for the specified realms .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`usernames\*(C'\fR .PP See the clear_cached_realms docs for more information. .SH "USER METHODS" .IX Header "USER METHODS" .ie n .SS """put_user()""" .el .SS "\f(CWput_user()\fP" .IX Subsection "put_user()" .Vb 4 \& $response = $es\->xpack\->security\->put_user( \& username => $username, # required \& body => {...} # required \& ); .Ve .PP The \f(CW\*(C`put_user()\*(C'\fR method creates a new user or updates an existing user. .PP See the User Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """get_user()""" .el .SS "\f(CWget_user()\fP" .IX Subsection "get_user()" .Vb 3 \& $response = $es\->xpack\->security\->get_user( \& username => $username | \e@usernames # optional \& ); .Ve .PP The \f(CW\*(C`get_user()\*(C'\fR method retrieves info for the specified users (or all users). .PP See the User Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """delete_user()""" .el .SS "\f(CWdelete_user()\fP" .IX Subsection "delete_user()" .Vb 3 \& $response = $es\->xpack\->security\->delete_user( \& username => $username # required \& ); .Ve .PP The \f(CW\*(C`delete_user()\*(C'\fR method deletes the specified user. .PP See the User Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """change_password()""" .el .SS "\f(CWchange_password()\fP" .IX Subsection "change_password()" .Vb 6 \& $response = $es\->xpack\->security\->change_password( \& username => $username # optional \& body => { \& password => $password # required \& } \& ) .Ve .PP The \f(CW\*(C`change_password()\*(C'\fR method changes the password for the specified user. .PP See the User Management docs for more information. .ie n .SS """disable_user()""" .el .SS "\f(CWdisable_user()\fP" .IX Subsection "disable_user()" .Vb 3 \& $response = $es\->xpack\->security\->disable_user( \& username => $username # required \& ); .Ve .PP The \f(CW\*(C`disable_user()\*(C'\fR method disables the specified user. .PP See the User Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """enable_user()""" .el .SS "\f(CWenable_user()\fP" .IX Subsection "enable_user()" .Vb 3 \& $response = $es\->xpack\->security\->enable_user( \& username => $username # required \& ); .Ve .PP The \f(CW\*(C`enable_user()\*(C'\fR method enables the specified user. .PP See the User Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .SH "ROLE METHODS" .IX Header "ROLE METHODS" .ie n .SS """put_role()""" .el .SS "\f(CWput_role()\fP" .IX Subsection "put_role()" .Vb 4 \& $response = $es\->xpack\->security\->put_role( \& name => $name, # required \& body => {...} # required \& ); .Ve .PP The \f(CW\*(C`put_role()\*(C'\fR method creates a new role or updates an existing role. .PP See the Role Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """get_role()""" .el .SS "\f(CWget_role()\fP" .IX Subsection "get_role()" .Vb 3 \& $response = $es\->xpack\->security\->get_role( \& name => $name | \e@names # optional \& ); .Ve .PP The \f(CW\*(C`get_role()\*(C'\fR method retrieves info for the specified roles (or all roles). .PP See the Role Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """delete_role()""" .el .SS "\f(CWdelete_role()\fP" .IX Subsection "delete_role()" .Vb 3 \& $response = $es\->xpack\->security\->delete_role( \& name => $name # required \& ); .Ve .PP The \f(CW\*(C`delete_role()\*(C'\fR method deletes the specified role. .PP See the Role Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """clear_cached_roles()""" .el .SS "\f(CWclear_cached_roles()\fP" .IX Subsection "clear_cached_roles()" .Vb 3 \& $response = $es\->xpack\->security\->clear_cached_roles( \& names => $names # required (comma\-separated string) \& ); .Ve .PP The \f(CW\*(C`clear_cached_roles()\*(C'\fR method clears the caches for the specified roles. .PP See the Role Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .SH "ROLE MAPPING METHODS" .IX Header "ROLE MAPPING METHODS" .ie n .SS """put_role_mapping()""" .el .SS "\f(CWput_role_mapping()\fP" .IX Subsection "put_role_mapping()" .Vb 4 \& $response = $es\->xpack\->security\->put_role_mapping( \& name => $name, # required \& body => {...} # required \& ); .Ve .PP The \f(CW\*(C`put_role_mapping()\*(C'\fR method creates a new role mapping or updates an existing role mapping. .PP See the Role Mapping docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """get_role_mapping()""" .el .SS "\f(CWget_role_mapping()\fP" .IX Subsection "get_role_mapping()" .Vb 3 \& $response = $es\->xpack\->security\->get_role_mapping( \& name => $name, # optional \& ); .Ve .PP The \f(CW\*(C`get_role_mapping()\*(C'\fR method retrieves one or more role mappings. .PP See the Role Mapping docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """delete_role_mapping()""" .el .SS "\f(CWdelete_role_mapping()\fP" .IX Subsection "delete_role_mapping()" .Vb 3 \& $response = $es\->xpack\->security\->delete_role_mapping( \& name => $name, # required \& ); .Ve .PP The \f(CW\*(C`delete_role_mapping()\*(C'\fR method deletes a role mapping. .PP See the Role Mapping docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .SH "TOKEN METHODS" .IX Header "TOKEN METHODS" .ie n .SS """get_token()""" .el .SS "\f(CWget_token()\fP" .IX Subsection "get_token()" .Vb 3 \& $response = $es\->xpack\->security\->get_token( \& body => {...} # required \& ); .Ve .PP The \f(CW\*(C`get_token()\*(C'\fR method enables you to create bearer tokens for access without requiring basic authentication. .PP See the Token Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .ie n .SS """invalidate_token()""" .el .SS "\f(CWinvalidate_token()\fP" .IX Subsection "invalidate_token()" .Vb 3 \& $response = $es\->xpack\->security\->invalidate_token( \& body => {...} # required \& ); .Ve .PP The \f(CW\*(C`invalidate_token()\*(C'\fR method enables you to invalidate bearer tokens for access without requiring basic authentication. .PP See the Token Management docs for more information. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`human\*(C'\fR .SH "API KEY METHODS" .IX Header "API KEY METHODS" .ie n .SS """create_api_key()""" .el .SS "\f(CWcreate_api_key()\fP" .IX Subsection "create_api_key()" .Vb 3 \& $response = $es\->xpack\->security\->create_api_key( \& body => {...} # required \& ) .Ve .PP The \f(CW\*(C`create_api_key()\*(C'\fR \s-1API\s0 is used to create \s-1API\s0 keys which can be used for access instead of basic authentication. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`filter_path\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`refresh\*(C'\fR .PP See the Create \s-1API\s0 Key docs for more. .ie n .SS """get_api_key()""" .el .SS "\f(CWget_api_key()\fP" .IX Subsection "get_api_key()" .Vb 6 \& $response = $es\->xpack\->security\->get_api_key( \& id => $id, # optional \& name => $name, # optional \& realm_name => $realm, # optional \& username => $username # optional \& ) .Ve .PP The \f(CW\*(C`get_api_key()\*(C'\fR \s-1API\s0 is used to get information about an \s-1API\s0 key. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`filter_path\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`id\*(C'\fR, \f(CW\*(C`name\*(C'\fR, \f(CW\*(C`realm_name\*(C'\fR, \f(CW\*(C`username\*(C'\fR .PP See the Get \s-1API\s0 Key docs for more. .ie n .SS """invalidate_api_key()""" .el .SS "\f(CWinvalidate_api_key()\fP" .IX Subsection "invalidate_api_key()" .Vb 6 \& $response = $es\->xpack\->security\->invalidate_api_key( \& id => $id, # optional \& name => $name, # optional \& realm_name => $realm, # optional \& username => $username # optional \& ) .Ve .PP The \f(CW\*(C`invalidate_api_key()\*(C'\fR \s-1API\s0 is used to invalidate an \s-1API\s0 key. .PP Query string parameters: \f(CW\*(C`error_trace\*(C'\fR, \f(CW\*(C`filter_path\*(C'\fR, \f(CW\*(C`human\*(C'\fR, \f(CW\*(C`id\*(C'\fR, \f(CW\*(C`name\*(C'\fR, \f(CW\*(C`realm_name\*(C'\fR, \f(CW\*(C`username\*(C'\fR .PP See the Invalidate \s-1API\s0 Key docs for more. .SH "USER PRIVILEGE METHODS" .IX Header "USER PRIVILEGE METHODS" .ie n .SS """get_user_privileges()""" .el .SS "\f(CWget_user_privileges()\fP" .IX Subsection "get_user_privileges()" .Vb 1 \& $response = $es\->xpack\->get_user_privileges(); \& \& The C method retrieves the privileges granted to the current user. \& \& Query string parameters: \& C, \& C, \& C .Ve .ie n .SS """has_privileges()"" $response = $es\->xpack\->has_privileges( user => $user, # optional body => {...} # required );" .el .SS "\f(CWhas_privileges()\fP \f(CW$response\fP = \f(CW$es\fP\->xpack\->has_privileges( user => \f(CW$user\fP, # optional body => {...} # required );" .IX Subsection "has_privileges() $response = $es->xpack->has_privileges( user => $user, # optional body => {...} # required );" .Vb 1 \& The C method checks whether the current or specified user has the listed privileges. \& \& Query string parameters: \& C, \& C, \& C .Ve .PP See the Has Privileges docs for more. .SH "APPLICATION PRIVILEGE METHODS" .IX Header "APPLICATION PRIVILEGE METHODS" .ie n .SS """put_privileges()""" .el .SS "\f(CWput_privileges()\fP" .IX Subsection "put_privileges()" .Vb 5 \& $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 .Ve .PP See the Create or Update Application Privileges docs for more. .ie n .SS """get_privileges()""" .el .SS "\f(CWget_privileges()\fP" .IX Subsection "get_privileges()" .Vb 4 \& $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 .Ve .PP See the Get Application Privileges docs for more. .ie n .SS """delete_privileges()""" .el .SS "\f(CWdelete_privileges()\fP" .IX Subsection "delete_privileges()" .Vb 4 \& $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 .Ve .PP See the Delete Application Privileges docs for more. .SH "AUTHOR" .IX Header "AUTHOR" Enrico Zimuel .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2020 by Elasticsearch \s-1BV.\s0 .PP This is free software, licensed under: .PP .Vb 1 \& The Apache License, Version 2.0, January 2004 .Ve