redis.clients.jedis.commands.AccessControlLogCommands Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.commands;
import java.util.List;
import redis.clients.jedis.CommandArguments;
import redis.clients.jedis.resps.AccessControlLogEntry;
import redis.clients.jedis.resps.AccessControlUser;
/**
* This class provides the interfaces necessary to interact with
* Access Control Lists (ACLs) within redis. These are the interfaces
* for string-based (i.e. decoded) interactions.
*
*
* @see Redis ACL Guide
*/
public interface AccessControlLogCommands {
/**
* Returns the username used to authenticate the current connection.
*
* @see ACL WHOAMI
* @return The username used for the current connection
*/
String aclWhoAmI();
/**
* Generate a random password
*
* @return A random password
*/
String aclGenPass();
/**
* Generate a random password
*
* @param bits the number of output bits
* @return A random password
*/
String aclGenPass(int bits);
/**
* Returns the currently active ACL rules on the Redis Server
*
* @see ACL LIST
* @return An array of ACL rules
*/
List aclList();
/**
* Shows a list of all usernames currently configured with access control
* lists (ACL).
*
* @see ACL USERS
* @return list of users
*/
List aclUsers();
/**
* The command returns all the rules defined for an existing ACL user.
* @param name username
* @return a list of ACL rule definitions for the user.
*/
AccessControlUser aclGetUser(String name);
/**
* Create an ACL for the specified user with the default rules.
*
* @param name user who receives an acl
* @see ACL SETUSER
* @return A string containing OK on success
*/
String aclSetUser(String name);
/**
* Create an ACL for the specified user, while specifying the rules.
*
* @param name user who receives an acl
* @param rules the acl rules for the specified user
* @see ACL SETUSER
* @return A string containing OK on success
*/
String aclSetUser(String name, String... rules);
/**
* Delete the specified user, from the ACL.
*
* @param names The usernames to delete
* @see ACL DELUSER
* @return The number of users delete
*/
long aclDelUser(String... names);
/**
* Show the available ACL categories.
*
* @see ACL CAT
* @return the available ACL categories
*/
List aclCat();
/**
* Show the available ACLs for a given category.
*
* @param category The category for which to list available ACLs
* @see ACL CAT
* @return the available ACL categories
*/
List aclCat(String category);
/**
* Shows the recent ACL security events.
*
* @see ACL LOG
* @return The list of recent security events
*/
List aclLog();
/**
* Shows the recent limit ACL security events.
*
* @param limit The number of results to return
* @see ACL LOG
* @return The list of recent security events
*/
List aclLog(int limit);
/**
* Reset the script event log
*
* @return The OK string
*/
String aclLogReset();
/**
* This function tells Redis to reload its external ACL rules,
* when Redis is configured with an external ACL file
*
* @see ACL LOAD
* @return OK or error text
*/
String aclLoad();
/**
* Save the currently defined in-memory ACL to disk.
*
* @see ACL SAVE
* @return OK on success
*/
String aclSave();
String aclDryRun(String username, String command, String... args);
String aclDryRun(String username, CommandArguments commandArgs);
}