Package com.mapr.cli

Class SecurityPolicyCommands

  • All Implemented Interfaces:
    ListIterator, com.mapr.cliframework.base.CLIInterface

    public class SecurityPolicyCommands
    extends ListCommand
    implements com.mapr.cliframework.base.CLIInterface
    • Field Detail

      • SORTING_ORDER_PARAM

        public static final java.lang.String SORTING_ORDER_PARAM
        See Also:
        Constant Field Values
      • ASCENDING_SORTING_ORDER_PARAM

        public static final java.lang.String ASCENDING_SORTING_ORDER_PARAM
        See Also:
        Constant Field Values
      • DESCENDING_SORTING_ORDER_PARAM

        public static final java.lang.String DESCENDING_SORTING_ORDER_PARAM
        See Also:
        Constant Field Values
      • SECURITY_POLICY_NAME_PARAM

        public static final java.lang.String SECURITY_POLICY_NAME_PARAM
        See Also:
        Constant Field Values
      • ALLOW_TAGGING_PARAM

        public static final java.lang.String ALLOW_TAGGING_PARAM
        See Also:
        Constant Field Values
      • ACCESS_CONTROL_PARAM

        public static final java.lang.String ACCESS_CONTROL_PARAM
        See Also:
        Constant Field Values
      • DESCRIPTION_PARAM

        public static final java.lang.String DESCRIPTION_PARAM
        See Also:
        Constant Field Values
      • SECURITY_EXPORT_POLICY_ID_PARAM

        public static final java.lang.String SECURITY_EXPORT_POLICY_ID_PARAM
        See Also:
        Constant Field Values
      • SECURITY_EXPORT_POLICY_VERSION_PARAM

        public static final java.lang.String SECURITY_EXPORT_POLICY_VERSION_PARAM
        See Also:
        Constant Field Values
      • SECURITY_EXPORT_POLICY_CTIME_PARAM

        public static final java.lang.String SECURITY_EXPORT_POLICY_CTIME_PARAM
        See Also:
        Constant Field Values
      • SECURITY_EXPORT_POLICY_MTIME_PARAM

        public static final java.lang.String SECURITY_EXPORT_POLICY_MTIME_PARAM
        See Also:
        Constant Field Values
      • EXPORT_DATA_AUDIT_OPS_VAL_PARAM

        public static final java.lang.String EXPORT_DATA_AUDIT_OPS_VAL_PARAM
        See Also:
        Constant Field Values
      • AUDIT_ENABLED_PARAM

        public static final java.lang.String AUDIT_ENABLED_PARAM
        See Also:
        Constant Field Values
      • WIRE_SECURITY_ENABLED

        public static final java.lang.String WIRE_SECURITY_ENABLED
        See Also:
        Constant Field Values
      • DATA_AUDIT_OPS_PARAM

        public static final java.lang.String DATA_AUDIT_OPS_PARAM
        See Also:
        Constant Field Values
      • DISABLE_DATA_AUDIT_OPS_PARAM

        public static final java.lang.String DISABLE_DATA_AUDIT_OPS_PARAM
        See Also:
        Constant Field Values
      • ACE_READFILE_PARAM

        public static final java.lang.String ACE_READFILE_PARAM
        See Also:
        Constant Field Values
      • ACE_WRITEFILE_PARAM

        public static final java.lang.String ACE_WRITEFILE_PARAM
        See Also:
        Constant Field Values
      • ACE_EXECUTEFILE_PARAM

        public static final java.lang.String ACE_EXECUTEFILE_PARAM
        See Also:
        Constant Field Values
      • ACE_READDIR_PARAM

        public static final java.lang.String ACE_READDIR_PARAM
        See Also:
        Constant Field Values
      • ACE_ADDCHILD_PARAM

        public static final java.lang.String ACE_ADDCHILD_PARAM
        See Also:
        Constant Field Values
      • ACE_DELETECHILD_PARAM

        public static final java.lang.String ACE_DELETECHILD_PARAM
        See Also:
        Constant Field Values
      • ACE_LOOKUPDIR_PARAM

        public static final java.lang.String ACE_LOOKUPDIR_PARAM
        See Also:
        Constant Field Values
      • ACE_READDB_PARAM

        public static final java.lang.String ACE_READDB_PARAM
        See Also:
        Constant Field Values
      • ACE_WRITEDB_PARAM

        public static final java.lang.String ACE_WRITEDB_PARAM
        See Also:
        Constant Field Values
      • ACE_TRAVERSEDB_PARAM

        public static final java.lang.String ACE_TRAVERSEDB_PARAM
        See Also:
        Constant Field Values
      • ACE_UNMASKED_READ_PARAM

        public static final java.lang.String ACE_UNMASKED_READ_PARAM
        See Also:
        Constant Field Values
      • EXPAND_ACES_PARAM

        public static final java.lang.String EXPAND_ACES_PARAM
        See Also:
        Constant Field Values
      • VOLUME_NAME_PARAM

        public static final java.lang.String VOLUME_NAME_PARAM
        See Also:
        Constant Field Values
      • POLICY_LIST_PARAM

        public static final java.lang.String POLICY_LIST_PARAM
        See Also:
        Constant Field Values
      • validNamePattern

        public static final java.util.regex.Pattern validNamePattern
      • validCharRegExWithSpace

        public static final java.lang.String validCharRegExWithSpace
        See Also:
        Constant Field Values
      • validDescPattern

        public static final java.util.regex.Pattern validDescPattern
      • securityPolicyAceParams

        public static java.lang.String securityPolicyAceParams
      • securityPolicyCreateUsage

        public static final java.lang.String securityPolicyCreateUsage
      • securityPolicyModifyUsage

        public static final java.lang.String securityPolicyModifyUsage
      • securityPolicyInfoUsage

        public static final java.lang.String securityPolicyInfoUsage
        See Also:
        Constant Field Values
      • securityPolicyAttachUsage

        public static final java.lang.String securityPolicyAttachUsage
        See Also:
        Constant Field Values
      • securityPolicyListUsage

        public static java.lang.String securityPolicyListUsage
      • securityPolicyCommandsArray

        public static com.mapr.cliframework.base.CLICommand[] securityPolicyCommandsArray
      • securityPolicyCommands

        public static com.mapr.cliframework.base.CLICommand securityPolicyCommands
    • Constructor Detail

      • SecurityPolicyCommands

        public SecurityPolicyCommands​(com.mapr.cliframework.base.ProcessedInput input,
                                      com.mapr.cliframework.base.CLICommand cliCommand)
                               throws com.mapr.cliframework.base.CLIProcessingException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
    • Method Detail

      • executeRealCommand

        public com.mapr.cliframework.base.CommandOutput executeRealCommand()
                                                                    throws com.mapr.cliframework.base.CLIProcessingException
        Specified by:
        executeRealCommand in class com.mapr.cliframework.base.CLIBaseClass
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • securityPolicyLookupById

        public static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponse securityPolicyLookupById​(java.lang.String cluster,
                                                                                                                com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                                                int securityPolicyId)
                                                                                                         throws com.mapr.cliframework.base.CLIProcessingException,
                                                                                                                com.mapr.security.MaprSecurityException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
        com.mapr.security.MaprSecurityException
      • securityPolicyLookupByName

        public static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponse securityPolicyLookupByName​(java.lang.String cluster,
                                                                                                                  com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                                                  java.lang.String securityPolicy)
                                                                                                           throws com.mapr.cliframework.base.CLIProcessingException,
                                                                                                                  com.mapr.security.MaprSecurityException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
        com.mapr.security.MaprSecurityException
      • securityPolicyLookup

        public static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponse securityPolicyLookup​(java.lang.String cluster,
                                                                                                            com.mapr.fs.proto.Security.CredentialsMsg creds,
                                                                                                            java.lang.String securityPolicy,
                                                                                                            int securityPolicyId)
                                                                                                     throws com.mapr.cliframework.base.CLIProcessingException,
                                                                                                            com.mapr.security.MaprSecurityException
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
        com.mapr.security.MaprSecurityException
      • processResponse

        public void processResponse​(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out,
                                    com.google.protobuf.MessageLite response)
                             throws com.mapr.cliframework.base.CLIProcessingException
        Description copied from interface: ListIterator
        Parse the response and populate the output hierarchy.
        Specified by:
        processResponse in interface ListIterator
        Specified by:
        processResponse in class ListCommand
        Parameters:
        out - - CommandOutput.OutputHierarchy
        response - - response object
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • sendRequest

        public com.mapr.fs.proto.PolicyServerProto.SecurityPolicyListResponse sendRequest​(com.google.protobuf.MessageLite request)
                                                                                   throws com.mapr.cliframework.base.CLIProcessingException
        Description copied from interface: ListIterator
        Send the request using RPC and fetch the response.
        Specified by:
        sendRequest in interface ListIterator
        Specified by:
        sendRequest in class ListCommand
        Parameters:
        request - - request object.
        Returns:
        - the response object.
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • buildNextRequest

        public com.mapr.fs.proto.PolicyServerProto.SecurityPolicyListRequest buildNextRequest​(com.google.protobuf.MessageLite prevReq,
                                                                                              com.google.protobuf.MessageLite prevResp)
                                                                                       throws com.mapr.cliframework.base.CLIProcessingException
        Description copied from interface: ListIterator
        Builds the next request object by inspecting the previous request and previous response.
        Specified by:
        buildNextRequest in interface ListIterator
        Specified by:
        buildNextRequest in class ListCommand
        Returns:
        - new request object
        Throws:
        com.mapr.cliframework.base.CLIProcessingException
      • hasMore

        public boolean hasMore​(com.google.protobuf.MessageLite prevReq,
                               com.google.protobuf.MessageLite prevResp)
                        throws com.mapr.cliframework.base.CLIProcessingException
        Description copied from interface: ListIterator
        Inspect the last request and last response to see if there are more records to be fetched.
        Specified by:
        hasMore in interface ListIterator
        Specified by:
        hasMore in class ListCommand
        Returns:
        - true, if there are more records. false, if no more.
        Throws:
        com.mapr.cliframework.base.CLIProcessingException