org.apache.accumulo.server.security
Class SecurityUtil

java.lang.Object
  extended by org.apache.accumulo.server.security.SecurityUtil

public class SecurityUtil
extends Object


Constructor Summary
SecurityUtil()
           
 
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
 

Constructor Detail

SecurityUtil

public SecurityUtil()
Method Detail

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)

Throws:
UnknownHostException
IOException

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
Throws:
IOException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.