Install testing module in your Cloud

Introduction

API Security testing involves sending malicious API requests to your (staging) server. By default, these malicious testing requests are sent from the Testing module installed within Akto Cloud.

There could be multiple reasons why you'd want to install testing module within your Cloud.

  1. Whitelisting Akto's IP in Security Group or WAF isn't an option

  2. The staging server isn't reachable from public domain

  3. The WAF would block most requests (or block Akto's IP)

  4. The API domain isn't resolvable from public domain

  5. The API is completely internal

Testing from Customer Cloud

  1. Login to Akto dashboard at app.akto.ioarrow-up-right

  2. Go to Quick Start > Hybrid Saas > Click on “Connect” button

  3. Copy the JWT token (marked in red) [ Also referred as Database Abstractor Token later]

You can now use a Helm-chart to install Akto Security Testing module in your cloud or install manually

Terraform

  1. To install using Terraform, use the Terraform script herearrow-up-right.

    1. Please make sure you install it in a private subnet from your application VPC.

    2. This private subnet should also have network connectivity (typically via NAT).

  2. For Database Abstractor Service Token input in the terraform script specify the JWT token copied in the earlier step.

  3. Once the terraform script has finished running, you should be able to see a new autoscaling group created with 1 Akto Testing EC2 instance running.

Helm-chart

Pre-requisites / Dependencies

If you don't need auto-scaling, skip this section.

Otherwise, if auto-scaling needs to be enabled to allow parallel test runs via multiple k8s pods, we need to install few dependencies via helm charts.

  1. Install kube-prometheus-stack

  1. Install keda

  1. Upgrade keda to set watchNamespace

    1. This restricts keda to watch/control only specific namespace(s)

    2. Its fine if you get this error - Error: UPGRADE FAILED: no RoleBinding with the name "keda-operator" found

    3. As a fix, re-run the helm upgrade command mentioned below, as the first run would create the keda-operator deployment in k8s.

  1. While installing / upgrading Akto's helm chart (covered in later sections) additionally set the following flag

Akto's helm chart installation

  1. Add akto helm repository.

Note: If you've already added akto helm repository, update the helm repository using:

  1. Using the dashboard abstractor token saved in the above steps, deploy the helm chart below.

Note: If you want to modify the helm chart according to your needs, you can clone the same from mini-testing-helm-chartarrow-up-right

Linux VM

  1. Create a new instance with the following requirements

    1. Platform

      1. Amazon Linux 2023

    2. Spec

      1. 2 vCPU

      2. 4GB RAM

      3. 20GB Hard disk

      4. Don’t use burstable instances

    3. Network

      1. Private subnet

      2. connectivity to internet (typically via NAT)

      3. connectivity to your staging service

    4. Security groups

      1. Inbound - Open only port 22 for SSH

      2. Outbound - Open all

  2. SSH into this new instance in your Cloud

  3. Run sudo su -

  4. Paste the following in docker-compose-testing.yml file. Use token from step(3) for DATABASE_ABSTRACTOR_SERVICE_TOKEN value

  5. Run docker-compose -f docker-compose-testing.yml up -d

  6. Run systemctl enable /usr/lib/systemd/system/docker.service to ensure Docker starts up in case of instance restarts

Get Support for your Akto setup

There are multiple ways to request support from Akto. We are 24X7 available on the following:

  1. In-app intercom support. Message us with your query on intercom in Akto dashboard and someone will reply.

  2. Join our discord channelarrow-up-right for community support.

  3. Contact [email protected] for email support.

  4. Contact us herearrow-up-right.

Last updated