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 boolean
equals(Object obj)
File
getKeytab()
String
getPassword()
String
getPrincipal()
AuthenticationToken
getToken()
Computes the appropriateAuthenticationToken
for the user represented by this object.int
hashCode()
String
toString()
-
-
-
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 appropriateAuthenticationToken
for the user represented by this object. May not yet be created in Accumulo.- Returns:
- the correct
AuthenticationToken
to use with Accumulo for this user - Throws:
IOException
- if performing necessary login failed
-
-