Package com.mapr.cli
Class SecurityPolicyCommands
- java.lang.Object
-
- com.mapr.cliframework.base.CLIBaseClass
-
- com.mapr.cli.common.ListCommand
-
- com.mapr.cli.SecurityPolicyCommands
-
- All Implemented Interfaces:
ListIterator,com.mapr.cliframework.base.CLIInterface
public class SecurityPolicyCommands extends ListCommand implements com.mapr.cliframework.base.CLIInterface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACCESS_CONTROL_PARAMstatic java.lang.StringACE_ADDCHILD_PARAMstatic java.lang.StringACE_DELETECHILD_PARAMstatic java.lang.StringACE_EXECUTEFILE_PARAMstatic java.lang.StringACE_LOOKUPDIR_PARAMstatic java.lang.StringACE_READ_PARAMstatic java.lang.StringACE_READDB_PARAMstatic java.lang.StringACE_READDIR_PARAMstatic java.lang.StringACE_READFILE_PARAMstatic java.lang.StringACE_TRAVERSEDB_PARAMstatic java.lang.StringACE_UNMASKED_READ_PARAMstatic java.lang.StringACE_WRITE_PARAMstatic java.lang.StringACE_WRITEDB_PARAMstatic java.lang.StringACE_WRITEFILE_PARAMstatic java.lang.StringALLOW_TAGGING_PARAMstatic java.lang.StringASCENDING_SORTING_ORDER_PARAMstatic java.lang.StringAUDIT_ENABLED_PARAMstatic java.lang.StringCOLUMNS_PARAMstatic java.lang.StringDATA_AUDIT_OPS_PARAMstatic java.lang.StringDESCENDING_SORTING_ORDER_PARAMstatic java.lang.StringDESCRIPTION_PARAMstatic java.lang.StringDISABLE_DATA_AUDIT_OPS_PARAMstatic java.lang.StringEXPAND_ACES_PARAMstatic java.lang.StringEXPORT_DATA_AUDIT_OPS_VAL_PARAMstatic java.lang.StringFILE_NAME_PARAMstatic java.lang.StringFILTER_PARAMstatic java.lang.StringGID_PARAM_NAMEstatic java.lang.StringLIMIT_PARAMstatic java.lang.StringMULTI_ARG_SEPstatic java.lang.StringOUTPUT_PARAMstatic java.lang.StringSECURITY_EXPORT_POLICY_CTIME_PARAMstatic java.lang.StringSECURITY_EXPORT_POLICY_ID_PARAMstatic java.lang.StringSECURITY_EXPORT_POLICY_MTIME_PARAMstatic java.lang.StringSECURITY_EXPORT_POLICY_VERSION_PARAMstatic java.lang.StringSECURITY_POLICY_NAME_PARAMstatic java.lang.StringsecurityPolicyAceParamsstatic com.mapr.cliframework.base.CLICommandsecurityPolicyCommandsstatic com.mapr.cliframework.base.CLICommand[]securityPolicyCommandsArraystatic java.lang.StringsecurityPolicyCreateUsagestatic java.lang.StringsecurityPolicyInfoUsagestatic java.lang.StringsecurityPolicyListUsagestatic java.lang.StringsecurityPolicyModifyUsagestatic java.lang.StringSORTBY_PARAMstatic java.lang.StringSORTING_ORDER_PARAMstatic java.lang.StringSTART_PARAMstatic java.lang.StringUID_PARAM_NAMEstatic java.lang.StringvalidCharRegExstatic java.lang.StringvalidCharRegExWithSpacestatic java.util.regex.PatternvalidDescPatternstatic java.util.regex.PatternvalidNamePatternstatic java.lang.StringWIRE_SECURITY_ENABLED
-
Constructor Summary
Constructors Constructor Description SecurityPolicyCommands(com.mapr.cliframework.base.ProcessedInput input, com.mapr.cliframework.base.CLICommand cliCommand)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mapr.fs.proto.PolicyServerProto.SecurityPolicyListRequestbuildNextRequest(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp)Builds the next request object by inspecting the previous request and previous response.com.mapr.cliframework.base.CommandOutputexecuteRealCommand()booleanhasMore(com.google.protobuf.MessageLite prevReq, com.google.protobuf.MessageLite prevResp)Inspect the last request and last response to see if there are more records to be fetched.voidprocessResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response)Parse the response and populate the output hierarchy.static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponsesecurityPolicyLookup(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String securityPolicy, int securityPolicyId)static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponsesecurityPolicyLookupById(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, int securityPolicyId)static com.mapr.fs.proto.PolicyServerProto.LookupSecurityPolicyResponsesecurityPolicyLookupByName(java.lang.String cluster, com.mapr.fs.proto.Security.CredentialsMsg creds, java.lang.String securityPolicy)com.mapr.fs.proto.PolicyServerProto.SecurityPolicyListResponsesendRequest(com.google.protobuf.MessageLite request)Send the request using RPC and fetch the response.-
Methods inherited from class com.mapr.cli.common.ListCommand
getFilters, getNextLimiter, hasMore, list
-
Methods inherited from class com.mapr.cliframework.base.CLIBaseClass
executeCommand, executeSimpleSHHCommand, executeSimpleSHHCommand, getCLICommand, getCommandUsage, getGIds, getInput, getKeyType, getParamBooleanValue, getParamDateValue, getParamIntValue, getParamLongValue, getParamObjectValue, getParamTextValue, getUserCredentials, getUserId, getUserLoginId, getVersion, isParamPresent, isParamValueEmpty, setServerCall, setUserCredentials, setVersion, validateInput
-
-
-
-
Field Detail
-
MULTI_ARG_SEP
public static final java.lang.String MULTI_ARG_SEP
- See Also:
- Constant Field Values
-
FILTER_PARAM
public static final java.lang.String FILTER_PARAM
- See Also:
- Constant Field Values
-
COLUMNS_PARAM
public static final java.lang.String COLUMNS_PARAM
- See Also:
- Constant Field Values
-
SORTBY_PARAM
public static final java.lang.String SORTBY_PARAM
- See Also:
- Constant Field Values
-
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
-
OUTPUT_PARAM
public static final java.lang.String OUTPUT_PARAM
- See Also:
- Constant Field Values
-
START_PARAM
public static final java.lang.String START_PARAM
- See Also:
- Constant Field Values
-
LIMIT_PARAM
public static final java.lang.String LIMIT_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
-
FILE_NAME_PARAM
public static final java.lang.String FILE_NAME_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
-
ACE_READ_PARAM
public static final java.lang.String ACE_READ_PARAM
- See Also:
- Constant Field Values
-
ACE_WRITE_PARAM
public static final java.lang.String ACE_WRITE_PARAM
- See Also:
- Constant Field Values
-
EXPAND_ACES_PARAM
public static final java.lang.String EXPAND_ACES_PARAM
- See Also:
- Constant Field Values
-
UID_PARAM_NAME
public static final java.lang.String UID_PARAM_NAME
- See Also:
- Constant Field Values
-
GID_PARAM_NAME
public static final java.lang.String GID_PARAM_NAME
- See Also:
- Constant Field Values
-
validCharRegEx
public static final java.lang.String validCharRegEx
- 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
-
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
-
-
Method Detail
-
executeRealCommand
public com.mapr.cliframework.base.CommandOutput executeRealCommand() throws com.mapr.cliframework.base.CLIProcessingException- Specified by:
executeRealCommandin classcom.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.CLIProcessingExceptioncom.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.CLIProcessingExceptioncom.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.CLIProcessingExceptioncom.mapr.security.MaprSecurityException
-
processResponse
public void processResponse(com.mapr.cliframework.base.CommandOutput.OutputHierarchy out, com.google.protobuf.MessageLite response) throws com.mapr.cliframework.base.CLIProcessingExceptionDescription copied from interface:ListIteratorParse the response and populate the output hierarchy.- Specified by:
processResponsein interfaceListIterator- Specified by:
processResponsein classListCommand- Parameters:
out- -CommandOutput.OutputHierarchyresponse- - 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.CLIProcessingExceptionDescription copied from interface:ListIteratorSend the request using RPC and fetch the response.- Specified by:
sendRequestin interfaceListIterator- Specified by:
sendRequestin classListCommand- 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.CLIProcessingExceptionDescription copied from interface:ListIteratorBuilds the next request object by inspecting the previous request and previous response.- Specified by:
buildNextRequestin interfaceListIterator- Specified by:
buildNextRequestin classListCommand- 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.CLIProcessingExceptionDescription copied from interface:ListIteratorInspect the last request and last response to see if there are more records to be fetched.- Specified by:
hasMorein interfaceListIterator- Specified by:
hasMorein classListCommand- Returns:
- - true, if there are more records. false, if no more.
- Throws:
com.mapr.cliframework.base.CLIProcessingException
-
-