Package org.apache.accumulo.cluster
Class ClusterUser
- java.lang.Object
-
- org.apache.accumulo.cluster.ClusterUser
-
public class ClusterUser extends Object
Simple wrapper around a principal and its credentials: a password or a keytab.
-
-
Constructor Summary
Constructors Constructor Description ClusterUser(String principal, File keytab)ClusterUser(String principal, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)FilegetKeytab()StringgetPassword()StringgetPrincipal()AuthenticationTokengetToken()Computes the appropriateAuthenticationTokenfor the user represented by this object.inthashCode()StringtoString()
-
-
-
Method Detail
-
getPrincipal
public String getPrincipal()
- Returns:
- the principal
-
getKeytab
public File getKeytab()
- Returns:
- the keytab, or null if login is password-based
-
getPassword
public String getPassword()
- Returns:
- the password, or null if login is keytab-based
-
getToken
public AuthenticationToken getToken() throws IOException
Computes the appropriateAuthenticationTokenfor the user represented by this object. May not yet be created in Accumulo.- Returns:
- the correct
AuthenticationTokento use with Accumulo for this user - Throws:
IOException- if performing necessary login failed
-
-