Package com.denimgroup.threadfix.data.entities

Examples of com.denimgroup.threadfix.data.entities.RemoteProviderApplication


            "Roller", "HSQLdb", "Bodgeit", "DVWA", "BlogEngine.NET", "Lunar Lander",
            "Metamail", "Hadoop", "WebGoat",
    };

    private RemoteProviderApplication getApplication(RemoteProviderType type, String nativeName) {
        RemoteProviderApplication application = new RemoteProviderApplication();
        application.setNativeName(nativeName);
        application.setRemoteProviderType(type);
        application.setApplicationChannel(new ApplicationChannel());
        return application;
    }
View Full Code Here


    String[] appNames = {
            "http://testasp.vulnweb.com/", "http://testphp.vulnweb.com/"
    };

    private RemoteProviderApplication getApplication(RemoteProviderType type, String nativeName) {
        RemoteProviderApplication application = new RemoteProviderApplication();
        application.setNativeName(nativeName);
        application.setRemoteProviderType(type);
        application.setApplicationChannel(new ApplicationChannel());
        return application;
    }
View Full Code Here

    RemoteProviderFactory factory = null;
    @Autowired
    ThreadFixBridge bridge = null;

    private RemoteProviderApplication getApplication(String key, String nativeName, RemoteProviderType type) {
        RemoteProviderApplication application = new RemoteProviderApplication();
        application.setNativeName(nativeName);
        application.setRemoteProviderType(type);
        return application;
    }
View Full Code Here

    model.addAttribute("errorMessage", ControllerUtils.getErrorMessage(request));
    PermissionUtils.filterApps(typeList);

    model.addAttribute("remoteProviders", typeList);
    model.addAttribute("remoteProviderType", new RemoteProviderType());
    model.addAttribute("remoteProviderApplication", new RemoteProviderApplication());
    model.addAttribute("organizationList", organizationService.loadAllActiveFilter());

        PermissionUtils.addPermissions(model, null, null, Permission.CAN_MANAGE_REMOTE_PROVIDERS, Permission.CAN_UPLOAD_SCANS);
    return "config/remoteproviders/index";
  }
View Full Code Here

 
  @RequestMapping(value="/{typeId}/apps/{appId}/import", method = RequestMethod.GET)
  public @ResponseBody RestResponse<String> importScan(@PathVariable("appId") int appId) {
   
    log.info("Processing request for scan import.");
    RemoteProviderApplication remoteProviderApplication = remoteProviderApplicationService.load(appId);
    if (remoteProviderApplication == null || remoteProviderApplication.getApplication() == null) {
      return RestResponse.failure("The requested application wasn't found.");
    }
   
    if (remoteProviderApplication.getApplication().getId() == null ||
        remoteProviderApplication.getApplication().getOrganization() == null ||
        remoteProviderApplication.getApplication().getOrganization().getId() == null ||
        !PermissionUtils.isAuthorized(Permission.CAN_UPLOAD_SCANS,
            remoteProviderApplication.getApplication().getOrganization().getId(),
            remoteProviderApplication.getApplication().getId())) {
            return RestResponse.failure("You don't have permission to do that.");
    }
   
    remoteProviderTypeService.decryptCredentials(
        remoteProviderApplication.getRemoteProviderType());
   
    ResponseCode response = remoteProviderTypeService.importScansForApplication(remoteProviderApplication);
   
    if (response.equals(ResponseCode.SUCCESS)) {
            return RestResponse.success("Do the redirect");
View Full Code Here

 
  @PreAuthorize("hasRole('ROLE_CAN_MANAGE_REMOTE_PROVIDERS')")
  @RequestMapping(value="/{typeId}/apps/{rpAppId}/delete/{appId}", method = RequestMethod.POST)
  public @ResponseBody RestResponse<RemoteProviderApplication> deleteAppConfiguration(@PathVariable("typeId") int typeId, @PathVariable("rpAppId") int rpAppId,
      @PathVariable("appId") int appId) {
        RemoteProviderApplication dbRemoteProviderApplication =
                remoteProviderApplicationService.load(rpAppId);

        remoteProviderApplicationService.deleteMapping(dbRemoteProviderApplication, appId);

        return RestResponse.success(dbRemoteProviderApplication);
View Full Code Here

    private boolean grabLabel;
   
    public List<RemoteProviderApplication> getApplications() {
      List<RemoteProviderApplication> apps = list();
      for (String label : map.keySet()) {
        RemoteProviderApplication remoteProviderApplication = new RemoteProviderApplication();
          remoteProviderApplication.setNativeName(label);
          remoteProviderApplication.setNativeId(map.get(label));
          remoteProviderApplication.setRemoteProviderType(remoteProviderType);
          apps.add(remoteProviderApplication);
      }
      return apps;
    }
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.data.entities.RemoteProviderApplication

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.