Coder Social home page Coder Social logo

aaronmulgrew / threat-removal-async-api-example-azure Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deep-secure/threat-removal-async-api-example-azure

0.0 0.0 0.0 29 KB

An Azure based example for the Async API

License: MIT License

JavaScript 100.00%

threat-removal-async-api-example-azure's Introduction

Demo the Threat Removal Async API on Microsoft Azure

Featuring Deep Secure’s unique Threat Removal technology delivered via the cloud, potentially infected files can be uploaded and transformed. Providing 100% guaranteed, clean files in return. This is the key difference between existing anti-virus detection based approaches and our next generation Threat Removal technology; malicious content is simply left behind. You can learn more about our cloud-based APIs here.

Our Instant and Async APIs can be utilised through Microsoft Azure. By following the setup instructions below, content can be uploaded to a storage container within Azure, sent to our Threat Removal services in AWS and subsequently transformed. The safe content is then placed in another storage container in Azure for you to download. Currently, we do not support native Azure transformations. When using our Azure code samples, content leaves the Azure infrastructure and is sent to our AWS-hosted APIs for transformation. We are planning to support Microsoft Azure natively in the future.

This code sample deploys a small amount of Microsoft Azure infrastructure. This includes:

  • A storage account used to store input files, transformations and errors
  • A Function App that uploads files from your storage account to the instant API, then downloads the result
  • Additional resources necessary for logging and billing within Microsoft Azure

These resources will be created in your own Microsoft Azure account, and usage will incur charges to your Microsoft Azure subscription as well as separate Threat Removal API fees. The Azure charges are primarily for Storage Accounts and data transfer. You can keep the storage charges to a minimum by removing data from the blob containers after use.

Setup Instructions

  1. Login to the Microsoft Azure Portal. You can create a new Microsoft Azure account if necessary, or choose an existing one. Your Azure account must be linked to an active subscription in order to deploy this code sample. To do so, either add a payment method to your Azure account or activate a free trial subscription.
  2. Click this button to open the code sample template in the Azure Portal:
    Deploy to Azure
  3. Select the appropriate subscription to manage the deployed resources and associated costs. Then, choose a resource group to deploy into. This can either be an existing resource group or a newly created one.
  4. If you chose to create a new resource group, please select the region you would like the resources to be deployed into. If you chose an existing resource group, the region will be based on the location of the resource group you selected.
  5. Enter a name for the function app resource. This can be anything you like, but the name must only contain alphanumerics and hyphens.
  6. Get your API Service URL and API Key from the Async API management page and enter these values into the Azure deployment parameters.
  7. Click the blue 'Review + create' button at the bottom of the page. The deployment will now undergo final validation checks. After the validation checks have passed, please read the Microsoft Azure terms that are on screen.
  8. Once you have read the on-screen T&C's, click the blue 'Create' button to start the deployment of the code sample.
  9. You will now be redirected to the deployment overview. The deployment should only take a couple of minutes. Once the deployment is complete, click the blue 'Go to resource group' button.
  10. In the resource group, click on the filestorexxxxxxxxxxxxx storage account. Then, on the 'overview' page, in the 'Tools and SDKs' section, open 'Storage Explorer (preview)'.
  11. In Storage Explorer, open the blob containers dropdown:
    • input - upload unsafe content here. The Azure Function then sends the unsafe content to the Async API to be transformed.
    • transformed - Safe content is uploaded to this blob container after a successful transformation.
    • errors - If the unsafe content cannot be processed, a json file containing error information will be placed here.

You are now ready to upload some content to the Async API.

Usage Instructions

  1. In the filestorexxxxxxxxxxxxx storage account, open the input blob container.
  2. Upload a file to the input container via the Azure Portal (alternatively, this can be done via the Azure REST API, CLI, Powershell etc.)
  3. Refresh until the file disappears from the input container.
  4. Check the transformed container for your newly transformed file.
  5. If it is not there, check the errors container.

Cleaning up

Follow these steps in order to remove the deployed Azure resources:

  1. Navigate to 'Resource Groups' in the Azure portal.
  2. Click on the resource group that contains your deployed resources
  3. Click 'Delete resource group'
  4. Click the blue 'Delete' button.

threat-removal-async-api-example-azure's People

Contributors

aaronmulgrew avatar matthewseelig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.