Skip to main content

README

Docs

Documentation Status

Tests

Travis Build Status Requirements Status
Appveyor Build Status coveralls
Codacy Code Quality Status Maintainability

Package

Supported versions Supported implementation
Development status PyPI Package License

GitHub

GitHub tag GitHub issues

umbr_api is Cisco Umbrella APIs wrapper and a command-line utility.

Cisco Umbrella uses the internet’s DNS infrastructure to block malicious destinations before a connection is ever established. By delivering security from the cloud, not only do you save money, but we also provide more effective security.

umbr_api supports Enforcement API, Reporting API, and Management API with limitations. With help of umbr_api you can add new sites and URLs to the black list, remove or show current entries, quickly check the latest security events, or check the status of registered computers or networks.

Using of command line tools, like umbr_api can immediately provide information to administrators of the system without myriads of clicks through GUI interfaces, two-factor authentications, etc.

References:

Created mostly for educational purposes.

Installation

To install from a local folder execute at the ‘umbr_api’ root directory:

pip3 install -e .

To install extra requirements from a local folder execute at the ‘umbr_api’ root directory:

pip3 install -e .[dev]
pip3 install -e .[doc]
pip3 install -e .[dev_lint]

To install from production https://pypi.org execute:

pip3 install umbr_api

To install from GitHub:

pip3 install git+https://github.com/kolatz/umbr_api.git

To install from local archive:

pip3 install filename.tar.gz

Please note, that you still need register and activate API key from Cisco to enable functionality.

Use of command-line utility

main() in umbrella.py registered as umbrella executable. So, you can run it directly.

Examples:

umbrella add www.example.com http://www.example.com/images
umbrella add example.com example.com --force
umbrella del www.example.com
umbrella del 555XXXXX --key YOUR-CUSTOMER-KEY-IS-HERE-0123456789
umbrella get 100
umbrella get --key YOUR-CUSTOMER-KEY-IS-HERE-0123456789

Use API wrapper

You need to import particular functions or modules from umbr_api. For example:

from umbr_api import get
get.get_list(key='YOUR-CUSTOMER-KEY-IS-HERE-0123456789')

from umbr_api.add import add
add(domain='example.com', url='example.com', key='YOUR-CUSTOMER-KEY-IS-HERE-0123456789')
There three main functions:
  • umbr_api.get.get_list

  • umbr_api.add.add

  • umbr_api.remove.remove

The API key should be specified via CLI, if not functions try to read it from enforcement.json within package data\ folder.

API key

How to obtain API key

You can sign up for 14 day free trial here: https://signup.umbrella.com/

How to use API key

  1. Provide as an argument for command-line utility

umbrella del www.example.com --key YOUR-CUSTOMER-KEY-IS-HERE-0123456789
  1. Provide it as part of a program call

from umbr_api.get import get_list
response = get_list(key='YOUR-CUSTOMER-KEY-IS-HERE-0123456789')

3. Create data/enforcement.json file within umbr_api package directory. This is an unsecured and unsupported way because of keeping key in clear text format. To find package directory:

import os
import umbr_api
print(os.path.abspath(umbr_api.__file__))

4. API key can be read from a keyring for command-line execution. To save API key you can use:

umbrella keyring --add YOUR-CUSTOMER-KEY-IS-HERE-0123456789
umbrella keyring --show

Supported methods

Enforcement API

  1. Add (POST)

  2. Get (GET)

  3. Remove (DELETE)

Management API

  1. Networks (GET)

  2. Roaming Computers (GET)

  3. Internal Networks (GET)

  4. Virtual Appliances (GET)

  5. Sites (GET)

  6. Users (GET)

  7. Roles (GET)

Reporting API

  1. Security Activity Report (GET)

  2. Destinations: Top Identities (GET)

  3. Destinations: Most recent requests (GET)

Limitations

  1. Lack of documentation

  2. You heed to have an Umbrella subscription or active evaluation

  3. Storing API key within json file is not secure

  4. Asserts will be removed with compiling to optimized byte code. This caused various protections to be removed.

  5. Other methods for change or delete entities are not supported and no plans to do that

Documentation

Documentation pages based on README.rst file and docstrings. Created for educational purposes.

Contribution guidelines

Who do I talk to

Metadata

Release files for umbr-api 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for umbr-api 1.0.0
File Size Uploaded
umbr_api-1.0.0.tar.gz 20.0 kB Details

Release files / umbr_api-1.0.0.tar.gz

Download URL umbr_api-1.0.0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
727ac651e1e77cc8b91b39666385fab6745f7be469e1473b0ee6ae4a8cc6ab89
BLAKE2b-256 checksum
How to use checksums
0bc8862f0f321bdf4e2afb3f4c1856148ecff0e546ef67f2eb1165b25c3dbff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.0 CPython/3.7.0

Release history Release notifications | RSS feed

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

This release

1.0.0 This release

1 release file

0.4.2

1 release file

0.4.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page