org.apache.accumulo.core.security
Class SecurityUtil
java.lang.Object
org.apache.accumulo.core.security.SecurityUtil
public class SecurityUtil
- extends Object
Method Summary |
static boolean |
login(String principalConfig,
String keyTabPath)
This will log in the given user in kerberos. |
static void |
serverLogin()
This method is for logging a server in kerberos. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
usingKerberos
public static boolean usingKerberos
SecurityUtil
public SecurityUtil()
serverLogin
public static void serverLogin()
- This method is for logging a server in kerberos. If this is used in client code, it will fail unless run as the accumulo keytab's owner. Instead, use
login(String, String)
login
public static boolean login(String principalConfig,
String keyTabPath)
- This will log in the given user in kerberos.
- Parameters:
principalConfig
- This is the principals name in the format NAME/HOST@REALM. SecurityUtil.HOSTNAME_PATTERN
will automatically be
replaced by the systems host name.keyTabPath
-
- Returns:
- true if login succeeded, otherwise false
Copyright © 2013 Apache Accumulo Project. All Rights Reserved.