Package com.mapr.cli.common
Class AuthManager
java.lang.Object
com.mapr.cli.common.AuthManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanPerformClusterActions(int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) booleancanPerformClusterActions(String clusterName, int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) Checks if a user is authorized to perform specific cluster actions.booleancanPerformVolumeAction(String volumeName, com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volProps, int volumeActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) booleancanPerformVolumeAction(String clusterName, String volumeName, com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volProps, int volumeActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) Checks if a client is authorized to perform actions on a certain Volume.static AuthManager
-
Constructor Details
-
AuthManager
public AuthManager()
-
-
Method Details
-
getInstance
-
canPerformVolumeAction
public boolean canPerformVolumeAction(String clusterName, String volumeName, com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volProps, int volumeActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingException Checks if a client is authorized to perform actions on a certain Volume.- Parameters:
creds- Credentials of the user performing the ActionsvolumeActions- List of volume actionsvolProps- VolumeProperties structure of the VolumevolumeName- Name of the Volumeout- OutputHierarchy object to record error messages- Returns:
- true, if the user is authorized to perform any of the actions ; false otherwise and in the case of errors
- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
canPerformVolumeAction
public boolean canPerformVolumeAction(String volumeName, com.mapr.fs.cldb.proto.CLDBProto.VolumeProperties volProps, int volumeActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingException - Throws:
com.mapr.cliframework.base.CLIProcessingException
-
canPerformClusterActions
public boolean canPerformClusterActions(String clusterName, int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingException Checks if a user is authorized to perform specific cluster actions.- Parameters:
creds- Credentials of the user performing the action.clusterActions- List of cluster actions the user wishes to performout- OutputHierarchy object to record error messages- Returns:
- true, if the user is authorized to perform any of the actions ; false otherwise and in the case of errors
- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
canPerformClusterActions
public boolean canPerformClusterActions(int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingException - Throws:
com.mapr.cliframework.base.CLIProcessingException
-