# Attacks with the Chaos Panel
Chaos Panel leverages you to run attacks on your system. The following paragraphs will guide you through the process of attacking applications and Azure infrastructure.
# Application attacks
In this guide we will configure your application and connect it to the Chaos Panel. This will allow you to inject turbulent conditions such as delays or timeouts by simply selecting it from the list.
The following guide is exemplified for a Python Flask application. Please head to the Chaos Middleware section to check other programming languages or frameworks.
proofdock-chaos-middleware-flask package to your Flask-based application:
$ pip install -U proofdock-chaos-middleware-flask
Provide following configuration variables:
| ||The application's name|
| ||The application's deployed environment|
| ||The token to connect to the Proofdock Cloud|
The application with configured Chaos Middleware looks as follow:
from flask import Flask, jsonify from pdchaos.middleware.contrib.flask.flask_middleware import FlaskMiddleware app = Flask(__name__) # Set required input variables app.config['CHAOS_MIDDLEWARE_APPLICATION_NAME'] = 'webshop-recommendation' app.config['CHAOS_MIDDLEWARE_APPLICATION_ENV'] = 'sandbox' app.config['CHAOS_MIDDLEWARE_PROOFDOCK_API_TOKEN'] = 'eyJ0eXAi...05' # Initialize chaos middleware middleware = FlaskMiddleware(app) # Your business logic here @app.route("/products/shower/recommendations") def recommendations(): return ["Shampoo", "Soap", "Shower foam"] if __name__ == "__main__": app.run()
# The first attack
The Chaos Panel allows to manage and interact with applications that has installed Chaos Middleware.
- Start your application. It automatically registers itself at the
- Navigate to
Project -> Chaos Platform -> Chaos Panel.
- Click the
New attackbutton, fill out the form and submit the application attacks.
- The submission may take up to thirty seconds until becoming active in your application.
# Azure attacks
Connect your Azure subscription with the Chaos Panel and inject turbulent conditions such as outages or stress situations to your resources.
Chaos Panel requires a service connection in order to attack Azure resources. If you don't have a service connection, please create one. In case you need more knowledge about creating service connections, please read the descriptive guide from Microsoft.
The Chaos Panel allows to manage and interact with attackable resources. Select your target(s) and a proper attack.