Git Product home page Git Product logo

cli-firewall's Introduction

cli-firewall

Provides a way to interact with Firewall Rules and Site Shield related information via Open APIs. Functionality includes viewing firewall rules services, subscribing and unsubscribing to firewall rules services, viewing and acknowledging Site Shield maps, and listing CIDR blocks.

Local Install

  • Python 3+
  • pip install edgegrid-python

Credentials

In order to use this module, you need to:

  • Set up your credential files as described in the authorization and credentials sections of the Get Started pagegetting started guide on developer.akamai.comthe developer portal.
  • When working through this process you need to give grants for the Firewall Rules Manager and Siteshield API. For Firewall Rules, the section in your configuration file should be called [firewall]. For Site Shield, the section in your configuration file should be called [site-shield]
[firewall]
client_secret = [CLIENT_SECRET]
host = [HOST]
access_token = [ACCESS_TOKEN_HERE]
client_token = [CLIENT_TOKEN_HERE]
[site-shield]
client_secret = [CLIENT_SECRET]
host = [HOST]
access_token = [ACCESS_TOKEN_HERE]
client_token = [CLIENT_TOKEN_HERE]

Functionality

This version includes the following functionality:

  • List all firewall rules services available for subscription
  • Subscribe and unsubscribe to firewall rules services
  • List CIDRs for all current subscriptions or a specific firewall rules subscribed to
  • List all available Site Shield maps
  • List CIDRs for a specified Site Shield map
  • Acknowledge a pending Site Shield map update

akamai-firewall

This is the main program that wraps this functionality in a command line utility:

akamai-site-shield

This is the main program that wraps this functionality in a command line utility:

list-services

List available firewall rules services available for subscription. A service must be subscribed to before CIDRs can be displayed for that service.

%  akamai firewall list-services

list-subscriptions

List current subscriptions.

%  akamai firewall list-subscriptions

subscribe

Subscribe to a firewall rules service (email address is mandatory).

%  akamai firewall subscribe --service-id 1 --email [email protected]
%  akamai firewall subscribe --service-name FIRSTPOINT --email [email protected]

The flags of interest are (please specify either --service-name or --service-id):

--service-id <value>            ID of service to be subscribed for
--service-name <value>          Name of service to be subscribed for
--email <value>                 Email address to subscribe for service specified

unsubscribe

Unsubscribe from a specific firewall rules service.

%  akamai firewall unsubscribe --service-id 1
%  akamai firewall unsubscribe --service-name FIRSTPOINT

The flags of interest are (please specify either --service-name or --service-id):

--service-id <value>            ID of service to be unsubscribed from
--service-name <value>          Name of service to be unsubscribed from
--email <value>                 Email address to unsubscribe for service specified

list-cidrs

List the CIDR blocks for all current subscriptions or a specific firewall rules service subscription.

%  akamai firewall list-cidrs
%  akamai firewall list-cidrs --file
%  akamai firewall list-cidrs --service-name FIRSTPOINT
%  akamai firewall list-cidrs --service-id 20
%  akamai firewall list-cidrs --service-name 'Global Traffic Management - Siteshield' --json

The flags of interest are:

--service-id <value>            ID of service to be unsubscribed from (optional)
--service-name <value>          Name of service to be unsubscribed from (optional)
--json                          Display output in json format (optional)

list-maps

List available Site Shield maps.

%  akamai site-shield list-maps

list-cidrs

List the CIDRs for a specified Site Shield map

%  akamai site-shield list-cidrs --map-id 12345
%  akamai site-shield list-cidrs --map-name sample.akamaiedge.net
%  akamai site-shield list-cidrs --map-name sample.akamaiedge.net --json

The flags of interest are (please specify either --map-id or --map-name):

--map-id <value>            	ID of desired Site Shield map
--map-name <value>          	Name of desired Site Shield map
--json                        Display output in json format (optional)

acknowledge

Acknowledge a pending Site Shield map update.

%  akamai site-shield acknowledge --map-id 12345
%  akamai site-shield acknowledge --map-name sample.akamaiedge.net

The flags of interest are (please specify either --map-id or --map-name):

--map-id <value>            	ID of desired Site Shield map
--map-name <value>          	Name of desired Site Shield map

cli-firewall's People

Contributors

aetsai avatar didierfort avatar stuart-macleod-akamai avatar vreddhi avatar

Watchers

 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.