org.apache.cassandra.auth

## Class Auth

- java.lang.Object
- - org.apache.cassandra.auth.Auth

    public class Auth
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `Auth.MigrationListener` IMigrationListener implementation that cleans up permissions on dropped resources.

### Field Summary

Fields
`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 Summary

Constructors
Constructor and Description
`Auth()`

### Method Summary

Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_SUPERUSER_NAME

    public static final java.lang.String DEFAULT_SUPERUSER_NAME

See Also:
  Constant Field Values

#### SUPERUSER_SETUP_DELAY

    public static final long SUPERUSER_SETUP_DELAY

#### AUTH_KS

    public static final java.lang.String AUTH_KS

See Also:
  Constant Field Values

#### USERS_CF

    public static final java.lang.String USERS_CF

See Also:
  Constant Field Values

### Constructor Detail

#### Auth

    public Auth()

### Method Detail

#### isExistingUser

    public static boolean isExistingUser(java.lang.String username)

Checks if the username is stored in AUTH_KS.USERS_CF.

Parameters:
  `username` - Username to query.
Returns:
  whether or not Cassandra knows about the user.

#### isSuperuser

    public static boolean isSuperuser(java.lang.String username)

Checks if the user is a known superuser.

Parameters:
  `username` - Username to query.
Returns:
  true is the user is a superuser, false if they aren't or don't exist at all.

#### insertUser

    public static void insertUser(java.lang.String username,
                  boolean isSuper)
                           throws RequestExecutionException

Inserts the user into AUTH_KS.USERS_CF (or overwrites their superuser status as a result of an ALTER USER query).

Parameters:
  `username` - Username to insert.
  `isSuper` - User's new status.
Throws:
  `RequestExecutionException`

#### deleteUser

    public static void deleteUser(java.lang.String username)
                           throws RequestExecutionException

Deletes the user from AUTH_KS.USERS_CF.

Parameters:
  `username` - Username to delete.
Throws:
  `RequestExecutionException`

#### setup

    public static void setup()

Sets up Authenticator and Authorizer.