Class AuthManager

java.lang.Object
com.mapr.cli.common.AuthManager

public class AuthManager extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canPerformClusterActions(int clusterActions, com.mapr.fs.proto.Security.CredentialsMsg creds, com.mapr.cliframework.base.CommandOutput.OutputHierarchy out)
     
    boolean
    canPerformClusterActions(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.
    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)
     
    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)
    Checks if a client is authorized to perform actions on a certain Volume.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AuthManager

      public AuthManager()
  • Method Details

    • getInstance

      public static AuthManager 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 Actions
      volumeActions - List of volume actions
      volProps - VolumeProperties structure of the Volume
      volumeName - Name of the Volume
      out - 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 perform
      out - 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