blacklist user

Blocks a user on a specific cluster.

This action cancels all existing tickets for the specified user. There is no REST equivalent command. For information about blocking, see How Tickets Work.

Syntax

CLI
maprcli blacklist user 
    -name <user name> 
   [ -blacklisttime <millis from epoch> or <MM/DD/YYYY> ]
   [ -cluster <cluster name> ]
REST
N/A

Parameters

Parameter

Description

name

Username to block.

blacklisttime Invalidates all user's tickets that were raised prior to the specified date (in the format <MM/DD/YYYY>). Alternatively, you can specify the time in milliseconds from epoch time (the number of milliseconds that have elapsed since Jan 1, 1970 midnight UTC).
cluster Name of the cluster from which to block the user.

Example

Block the rogueuser user name from the cluster my.cluster.com:

CLI
maprcli blacklist user -name rogueuser -cluster my.cluster.com

Block the rogueuser user's tickets that were raised prior to 1st September 2020 from the cluster my.cluster.com:

CLI
maprcli blacklist user -name rogueuser -cluster my.cluster.com -blacklisttime 09/01/2020

Block the rogueuser user's tickets that were raised prior to 1605418200155 milliseconds from epoch, from the cluster my.cluster.com:

CLI
maprcli blacklist user -name rogueuser -cluster my.cluster.com -blacklisttime 1605418200155

The value 1605418200155 corresponds to the time November 15th 2020, 11:00:00 am IST+05:30. Therefore, all rogueuser tickets that were raised prior to November 15th 2020, 11:00:00 am IST+05:30 are blocked.

Related Log File

The log file /opt/mapr/logs/cldbaudit.log.json contains the log of the block operation including the updated block time. For example:

{"timestamp":{"$date":"2020-11-13T08:37:36.524Z"},"resource":"mapruser4","operation":"blacklist",
             "username":"root","uid":0,"clientip":"10.10.50.42","properties":
             [{"property":"blacklisttime","oldvalue":"1605254599376","newvalue":"1605875766173"}],
             "status":0}{"timestamp":{"$date":"2020-11-13T08:37:45.020Z"},"resource":"cluster",
             "operation":"listBlacklist","username":"root","uid":0,
             "clientip":"10.10.50.42","status":0}

Here the old block list time was 1605254599376 milliseconds (November 13, 2020 1:33:19 PM IST) and is now updated to 1605875766173 milliseconds (Friday, November 20, 2020 6:06:06 PM IST).