Git Product home page Git Product logo

cloudstub's Introduction

cloudstub

Provides a proxy service for the Silver Peak Cloud Portal API service that essentially passes through all but one of the API endpoints. The API endpoint that is modified is used to seed SaaS information to the acceleration appliances. This service allows the adding of new SaaS platforms to the appliances without having them officially supported.

Note that this service requires the device to be signed-up to Silver Peak Cloud Intelligence.

Requirements

Any server/virtual machine with node.js 0.12 and npm installed. An SSL certificate is required (as the appliances connect via HTTPS) but this can be self-signed or otherwise not matching since it isn't validated.

Install

Short process - download and install dependencies.

cd /var
git clone https://github.com/davefinster/cloudstub.git
cd cloudstub
npm install

Usage

This will start the cloudstub server running on port 8000. For the SSL certificate, two files called server.crt and server.key will need to be added to the root directory of the project.

node index.js

In order to add SaaS application definitions, use the file called additional_apps.json. Add new objects to the array as shown below.

SaaS Definitions

When a device has been successfully registered, it queries the 'cloudapplication' api and retrieves a JSON array containing objects that look like this:

{
    saasId: <unique-numeric-identifier>,
    application: 'A SaaS Platform',
    addresses: [ 
      { 
        subnet: '8.8.8.0/24',
        reachableIp: '8.8.8.8',
        pingMethod: 'TCP',
        pingPort: 80 
      }
    ],
    domains:[
      'saas.com',
      '*.saas.com'
    ],
    threshold: '10',
    ports: [ '80', '443'],
    processedAt: null,
    enabled: false 
}

The 'addresses' array contains the various IP address subnets that the particular SaaS application uses. For each subnet, an IP address that is pingable must be included. This is used by the appliances to determine proximity to the SaaS servers, but not in the SSL Acceleration/Decryption process. The domains array lists the DNS names (that would otherwise appear on some sort of SSL certificate) that the SaaS application uses.

'processedAt' always appears to be null and 'enabled' appears to be false.

Discovering Reachability

Included is a 'discover_reachability' script, which will have a space separated list of CIDR IP ranges and determine a host that is reachable on port 443. This is useful for populating the 'addresses' array.

node discover_reachable.js 69.63.176.0/20 66.220.144.0/20

produces

[{"subnet":"69.63.176.0/20","reachableIp":"69.63.190.1","pingMethod":"TCP","pingPort":443}, {"subnet":"66.220.144.0/20","reachableIp":"66.220.156.73","pingMethod":"TCP","pingPort":443}]

License

MIT.

Bugs

See https://github.com/davefinster/cloudstub/issues.

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.