Class JdkUser
java.lang.Object
org.elasticsearch.hadoop.security.JdkUser
- All Implemented Interfaces:
User
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEsToken(EsToken esToken) Adds the given esToken to the user<T> TdoAs(PrivilegedAction<T> action) Execute the given action as the user<T> TdoAs(PrivilegedExceptionAction<T> action) Execute the given action as the usergetEsToken(String clusterName) booleantoString()
-
Constructor Details
-
JdkUser
-
-
Method Details
-
doAs
Description copied from interface:UserExecute the given action as the user -
doAs
Description copied from interface:UserExecute the given action as the user- Specified by:
doAsin interfaceUser- Type Parameters:
T- The return type from the action- Parameters:
action- To execute- Returns:
- Whatever was returned from the action
- Throws:
EsHadoopException- Should an exception be thrown during the operation
-
getEsToken
- Specified by:
getEsTokenin interfaceUser- Parameters:
clusterName- The cluster name- Returns:
- a previously added Elasticsearch authentication token, or null if it does not exist
-
getAllEsTokens
- Specified by:
getAllEsTokensin interfaceUser- Returns:
- all previously added Elasticsearch authentication tokens, or an empty iterable if none exist
-
addEsToken
Description copied from interface:UserAdds the given esToken to the user- Specified by:
addEsTokenin interfaceUser- Parameters:
esToken- Authentication token for Elasticsearch
-
getUserName
- Specified by:
getUserNamein interfaceUser- Returns:
- the most appropriate and available user name for this user, or null if one cannot be found
-
getKerberosPrincipal
- Specified by:
getKerberosPrincipalin interfaceUser- Returns:
- the KerberosPrincipal attached to the user, or null if it does not exist
-
isProxyUser
public boolean isProxyUser()- Specified by:
isProxyUserin interfaceUser- Returns:
- true if the current user is a proxy user with a real user underneath it
-
getRealUserProvider
- Specified by:
getRealUserProviderin interfaceUser- Returns:
- Returns a user provider that will select the real user from any currently logged in user.
-
toString
-