public class Auth
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Auth.MigrationListener
IMigrationListener implementation that cleans up permissions on dropped resources.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTH_KS |
static java.lang.String |
DEFAULT_SUPERUSER_NAME |
static long |
SUPERUSER_SETUP_DELAY |
static java.lang.String |
USERS_CF |
Constructor and Description |
---|
Auth() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteUser(java.lang.String username)
Deletes the user from AUTH_KS.USERS_CF.
|
static void |
insertUser(java.lang.String username,
boolean isSuper)
Inserts the user into AUTH_KS.USERS_CF (or overwrites their superuser status as a result of an ALTER USER query).
|
static boolean |
isExistingUser(java.lang.String username)
Checks if the username is stored in AUTH_KS.USERS_CF.
|
static boolean |
isSuperuser(java.lang.String username)
Checks if the user is a known superuser.
|
static void |
setup()
Sets up Authenticator and Authorizer.
|
public static final java.lang.String DEFAULT_SUPERUSER_NAME
public static final long SUPERUSER_SETUP_DELAY
public static final java.lang.String AUTH_KS
public static final java.lang.String USERS_CF
public static boolean isExistingUser(java.lang.String username)
username
- Username to query.public static boolean isSuperuser(java.lang.String username)
username
- Username to query.public static void insertUser(java.lang.String username, boolean isSuper) throws RequestExecutionException
username
- Username to insert.isSuper
- User's new status.RequestExecutionException
public static void deleteUser(java.lang.String username) throws RequestExecutionException
username
- Username to delete.RequestExecutionException
public static void setup()
Copyright © 2013 The Apache Software Foundation