Skip to content

Raveeshv04/dbs-scripts

Repository files navigation

gve_devnet_wsa_capabilities_script

for exploring WSA capabilities via python through API

Contacts

Solution Components

  • python
  • requests
  • WSA API
  • Ansible

Related Sandbox/Lab Environment

Have used the Dcloud Web Security Applicance V12.0 Lab

Installation/Configuration

Create Virtual environment and activate it

python3 -m venv venv
source venv/bin/activate

Install Python Dependecies for the script

pip install -r requirements.txt

please update device specific information in wsa_cred.yml.

# wsa_cred.yml
url: "https://<ip>:<port>"
username: "username"
password: "passowrd"

Usage

wsa.py

to get help message type the command as follows

$ python wsa.py 

run respective functions of the command as follows

$ python wsa.py getAccessPolicy
$ python wsa.py createAccessPolicy

WSAUtil.py

to get help message type the command as follows

python WSAUtil.py -h
python WSAUtil.py <command> <resource> <args>

######supported command

  • get to get the WSA Resource.
  • create to create new WSA Resource.

######supported resources

  • routing-policy Routing policy of WSA
  • access-policy Access policy of WSA

Examples

python WSAUtil.py get access-policy
python WSAUtil.py get access-policy -e <output-file>
python WSAUtil.py create access-policy -f <input-file>

Ansible Playbook wsa-playbook.yml

Running ansible playbook

ansible-playbook wsa-playbook.yml
ansible-playbook wsa-playbook.yml -vvv
ansible-playbook wsa-playbook.yml -t access-policies

Screenshots

/IMAGES/0image.png

LICENSE

Provided under Cisco Sample Code License, for details see LICENSE

CODE_OF_CONDUCT

Our code of conduct is available here

CONTRIBUTING

See our contributing guidelines here

DISCLAIMER:

Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages