Interface BeagleSecurityClient
-
- All Known Implementing Classes:
BeagleSecurityClientImpl
public interface BeagleSecurityClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ApplicationcreateApplication(String applicationName, String url, UUID projectKey, ApplicationType type)Create a new application and return itProjectcreateProject(String projectName, String description)Create a new project and return itProjectcreateProject(String projectName, String description, String teamId)Create a new project in a team and return itApplicationdeleteApplication(String applicationToken)Delete an application using application tokenProjectdeleteProject(UUID projectKey)Delete a project and return itList<ProjectWithApplication>getAllProjects()Returns all the projects and applications for a particular userProjectWithTeamgetAllProjectWithTeams()Returns all the projects and team projectsApplicationgetApplication(String applicationToken)Returns application object corresponds to the given application token.List<Application>getApplications(UUID projectKey)Returns application object corresponds to the given application token.SignaturegetSignature(String applicationToken)Gets signature of the given applicationList<TestRunningSession>getTeamTestRunningSessions(String teamId)Gets all running sessions under a teamStringgetTestResultJson(String applicationToken, String resultToken)Get the result json, which contains entire vulnerabilities found in the penetration testing process in json formatList<TestRunningSession>getTestRunningSessions()Gets all running sessions under a userList<TestSession>getTestSessions(String applicationToken, int count)Gets a number of test sessions under an applicationTestStatusgetTestStatus(String applicationToken, String resultToken)Gets the status of a running sessionApplicationmodifyApplication(String applicationToken, String applicationName, String url)Modify an existing application and return itProjectmodifyProject(UUID projectKey, String projectName, String description)Modify an existing project and return itStartTeststartTest(String applicationToken)Starts a new testbooleanstopTest(String applicationToken)Stop a running testbooleanverifySignature(String applicationToken, SignatureType signatureType, PluginType pluginType)Verify signature of an application if signatureType is Plug-in, then pluginType needs to provide.
-
-
-
Method Detail
-
getAllProjects
List<ProjectWithApplication> getAllProjects()
Returns all the projects and applications for a particular user
- Returns:
- list of project
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getAllProjectWithTeams
ProjectWithTeam getAllProjectWithTeams()
Returns all the projects and team projects
- Returns:
- all the projects and team projects
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
createProject
Project createProject(String projectName, String description)
Create a new project and return it
- Parameters:
projectName- Name of projectdescription- project description- Returns:
- created project
- Throws:
ValidationException- Parameter validation failure exceptionGeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidUrlException- Given url is not validProjectAlreadyExistsException- The given project already existsForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
createProject
Project createProject(String projectName, String description, String teamId)
Create a new project in a team and return it
- Parameters:
projectName- Name of projectdescription- project descriptionteamId- team id to create the project- Returns:
- created project
- Throws:
ValidationException- Parameter validation failure exceptionGeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidUrlException- Given url is not validProjectAlreadyExistsException- The given project already existsForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
modifyProject
Project modifyProject(UUID projectKey, String projectName, String description)
Modify an existing project and return it
- Parameters:
projectKey- project key to modifyprojectName- Name of projectdescription- project description- Returns:
- modified project
- Throws:
ValidationException- Parameter validation failure exceptionGeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidUrlException- Given url is not validProjectAlreadyExistsException- The given project already existsInvalidProjectKeyException- The given project key is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
deleteProject
Project deleteProject(UUID projectKey)
Delete a project and return it
- Parameters:
projectKey- project key to delete- Returns:
- deleted project
- Throws:
ValidationException- Parameter validation failure exceptionGeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidUrlException- Given url is not validInvalidProjectKeyException- The given project key is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getApplication
Application getApplication(String applicationToken)
Returns application object corresponds to the given application token.
- Parameters:
applicationToken- is the unique token of application- Returns:
- application object
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidApplicationTokenException- Given token is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getApplications
List<Application> getApplications(UUID projectKey)
Returns application object corresponds to the given application token.
- Parameters:
projectKey- project key to retrieve applications- Returns:
- list of applications under project
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidProjectKeyException- Given project key is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
createApplication
Application createApplication(String applicationName, String url, UUID projectKey, ApplicationType type)
Create a new application and return it
- Parameters:
applicationName- Name of applicationurl- website url for penetration testingprojectKey- project key under the application needs to addtype- application type such as WEB or API- Returns:
- created application
- Throws:
ValidationException- Parameter validation failure exceptionGeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidUrlException- Given url is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
modifyApplication
Application modifyApplication(String applicationToken, String applicationName, String url)
Modify an existing application and return it
- Parameters:
applicationToken- token of the applicationapplicationName- Name of application to modifyurl- website url to modify. If domain is verified, then unable to modify url- Returns:
- modified application
- Throws:
ValidationException- Parameter validation failure exceptionGeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidUrlException- Given url is not validUrlAlreadyAddedException- The url is added in another applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
deleteApplication
Application deleteApplication(String applicationToken)
Delete an application using application token
- Parameters:
applicationToken- is the unique token of application- Returns:
- application object
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidApplicationTokenException- Given token is not validTestInProgressException- A test is in progressForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getSignature
Signature getSignature(String applicationToken)
Gets signature of the given application
- Parameters:
applicationToken- is the unique token of application- Returns:
- application object
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidApplicationTokenException- Given token is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
verifySignature
boolean verifySignature(String applicationToken, SignatureType signatureType, PluginType pluginType)
Verify signature of an application if signatureType is Plug-in, then pluginType needs to provide. Otherwise pluginType will be null
- Parameters:
applicationToken- is the unique token of applicationsignatureType- is type of signaturepluginType- is type of plug-in- Returns:
- true if verify signature success
- Throws:
GeneralAPIException- General exceptions.PlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationInvalidApplicationTokenException- Given token is not validForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getTestResultJson
String getTestResultJson(String applicationToken, String resultToken)
Get the result json, which contains entire vulnerabilities found in the penetration testing process in json format
- Parameters:
applicationToken- is the unique token of applicationresultToken- is the test start token to fetch result- Returns:
- json result
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
startTest
StartTest startTest(String applicationToken)
Starts a new test
- Parameters:
applicationToken- is the unique token of application- Returns:
- start test result
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getTestStatus
TestStatus getTestStatus(String applicationToken, String resultToken)
Gets the status of a running session
- Parameters:
applicationToken- is the unique token of applicationresultToken- token of a session- Returns:
- status of the session
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
stopTest
boolean stopTest(String applicationToken)
Stop a running test
- Parameters:
applicationToken- is the unique token of application- Returns:
- boolean true if stop test success, false otherwise
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getTestSessions
List<TestSession> getTestSessions(String applicationToken, int count)
Gets a number of test sessions under an application
- Parameters:
applicationToken- is the unique token of applicationcount- is the number of records to fetch- Returns:
- list of sessions
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getTestRunningSessions
List<TestRunningSession> getTestRunningSessions()
Gets all running sessions under a user
- Returns:
- list of running sessions
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
getTeamTestRunningSessions
List<TestRunningSession> getTeamTestRunningSessions(String teamId)
Gets all running sessions under a team
- Parameters:
teamId- team id to find running session- Returns:
- list of running sessions
- Throws:
GeneralAPIException- General exceptionsPlanNotSupportException- The user plan is not supportedInvalidSessionException- Given token is not validUnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
-