Package com.mapr.cli.common
Class AuthManager
- java.lang.Object
-
- com.mapr.cli.common.AuthManager
-
public class AuthManager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AuthManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanPerformClusterActions(int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out)booleancanPerformClusterActions(java.lang.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(java.lang.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(java.lang.String clusterName, java.lang.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 AuthManagergetInstance()
-
-
-
Method Detail
-
getInstance
public static AuthManager getInstance()
-
canPerformVolumeAction
public boolean canPerformVolumeAction(java.lang.String clusterName, java.lang.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.CLIProcessingExceptionChecks 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(java.lang.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(java.lang.String clusterName, int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out) throws com.mapr.cliframework.base.CLIProcessingExceptionChecks 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
-
-