This article shows how to leverage the Lumu Defender API and Akamai Web App & API protector API to mitigate security risks by using its Client List feature.
Ensure your script host can communicate with the following hosts. These are required for the operation of this integration.
Lumu Custom Response integration with Akamai App & API Protector uses its API to manage a dedicated Client List. The integration updates the IP Indicators of the list based on Lumu detections to avoid inbound contacts within your Akamai deployment.
To set up the integration, you must prepare your Akamai App & API Protector console to communicate with the Lumu integration. To do this, you need the following:
The following sections will guide you on how to perform these tasks.
We strongly recommend the creation of a custom Role. This practice facilitates the implementation of the Principle of Least Privilege for your integration user. To establish this custom integration role, please log in to your Web app & API protection console and proceed as follows:
1. In the left-hand navigation bar, go to ACCOUNT ADMIN > Identity & Access.
2. Select the Role tab and initiate the creation of a new role.
3. Provide a suitable name and description in the respective fields.
4. In the Permissions section, search for Web Security > Client List/Network List edit and activate.
5. Once you have configured the new role to look as follows, click on Save.
Having created the new Custom Role, you can proceed with the creation of the Integration Service Account as follows:
1. Within the same Identity & Access Management section, navigate to the Users and API Clients tab, then click Create API client.
2. Under Select API client type, select Service Account, and then click Set API Client Options.
3. Fill the Create API client for a service account form as follows:
4. Once you finish with the configuration, the API client should look as follows to keep the Principle of Least Privilege. Enable the I reviewed and acknowledge any escalation to the authorized users' permissions option and click Create API client.
5. Once the Client API is created, you will need to create the credentials to be used during the integration. Click on Create Credential.
6. Copy the following credential fields and the Akamai Host; keep them at hand as they will be used during the Identify Contract and Group ID and Set up the configuration files sections.
The Contract and Group ID are specific to the Akamai App & API Protector service. If there are multiple IDs, contact the service administrator to know the exact ID.
Prior to deployment, you must verify the credentials and the contracts and groups association for the integration. To extract the Contract ID and the Group ID, you need to first unpack the integration package shared by our Support team.
Unpack the deployment package provided by Lumu in your preferred path/folder. Keep in mind this location, as it will be required for further configurations in the Set up the configuration files step. From now on, we will refer to this folder as <app_lumu_root>.
Or
Provide the requested data collected in step 6 from the Create an Integration Service Account section. You will obtain a result like the following if everything works.
Upon execution of the command, a summary of your credentials will be displayed, along with a potential list of contract and group IDs available for selection in the integration. Select and copy the Contract and Group to which the integration will apply. Keep them at hand. They will be used during the Set up the configuration files step.
Please note that administrative privileges may be required for the installation of dependencies such as CURL and UV, if they are not already present on the system.
You must collect the following information from your Lumu portal:
Log in to your Lumu portal and proceed with the following sections.
To collect the Lumu Defender API key, please refer to the Defender API document.
To collect your Lumu company UUID, log in to your Lumu portal. Once you are in the main window, copy the string below your company name.
Before starting, ensure your integration environment can communicate with the hosts listed in the Contacted Hosts section.
The integration is deployed in a Docker environment; therefore, adhere to the subsequent guidance to prepare the hosting environment.
At this point, you should have already unpacked the integration package shared by our Support team in the <app_lumu_root> folder during the Identify Contact and Group ID step.
You must follow the Docker installation documentation that corresponds to your OS. Ensure you follow the Post-installation steps for Linux before deploying the integration.
For Windows users, follow the Install Docker Desktop for Windows documentation to install the Docker Engine.
Add the companies.yml and the integrations.yml configuration files in the <app_lumu_root> folder and edit them as instructed to set up the integration.
You will find the companies_template.yml and integrations_template.yml sample files inside the integrations package. Use it to build your configuration file.
The companies.yml file contains the information required by the integration to collect the Lumu-related IOCs and make them available for their injection in the Web app & API protection policy.
All the parameters in red should be replaced with the real data necessary for your integration deployment. For example, the parameter “COMPANY-UUID” should end up as something similar to “aa11bb22bb33-123a-456b-789c-11aa22bb33cc”. Follow these indications for all similar parameters.
-
lumu:
uuid: "COMPANY_UUID"
defender_key: "DEFENDER_API_KEY"
ioc_types: # list of ioc types, option one, many or all
- ip
adversary: # list of adversary types, option one, many or all
- C2C
- Malware
- Mining
- Spam
- Phishing
- Anonymizer
days: 3 # MIN 1, MAX 30
Replace the highlighted placeholders as follows:
You must fill in the configuration data carefully. If there are any mistakes or missing data, you’ll receive errors during the deployment of the integration.
The integrations file contains the information required for the integration to connect and interact with your Web app & API protection deployment:
- lumu:
uuid: "COMPANY-UUID"
days: 30
app:
name: "UNIQUE-NAME"
contract_id: "AKAMAI-CONTRACT-ID"
group_id: "AKAMAI-GROUP-ID"
list_type: ['IP']
api:
host: "AKAMAI-API-HOST"
client_token: "AKAMAI-CLIENT-TOKEN"
client_secret: "AKAMAI-CLIENT-SECRET"
access_token: "AKAMAI-ACCESS-TOKEN"
Replace the highlighted placeholders as follows:
You must fill in the configuration data carefully. If there are any mistakes or missing data, you’ll receive errors during the deployment of the integration.
To streamline the deployment process, Lumu introduced the Makefile model integration that allows you to easily deploy integrations as a Docker container. To deploy the integration, locate yourself in the <app_lumu_root> folder, and run the following command:
Monitor the console output for any unexpected errors. If there are any errors present, fix them and run the command again. Check the Troubleshooting section for further reference.
If you have a Docker environment, you can select this option to run the integration as a Docker process. To deploy and run your integration as a docker container, locate yourself at the <app_lumu_root> folder, and follow these instructions.
1. Build the container by running the following command.
Do not forget the dot "."
2. Run the container by using the following command.
With this mode, your integration will run every 5 minutes.
After the integration has been executed, any Indicators of Compromise (IoC) present in your instance will be visible within the Client List created specifically for this integration.
Navigate to Web & Data Center Security > Security configuration and then view the Client List.
The source will be blocked if the feed is present on the list and a connection block has occurred.
Once the Client List is populated and synchronized by the integration, it can then be applied to specific web configuration policies.
Proceed to Web & Data Center Security > Security Configurations and click on Web Security to access the security configuration policies for the web applications and APIs and do the following:
1. Select a configuration policy.
2. Navigate to the Action menu (represented by the "three dots icon") and create a new version based on the most recent one.
3. A new version can be created based on the last one, allowing for the addition of the Client list in specific sections of the policy, such as:
The preceding three examples merely illustrate the association of the client list; for further details, please refer to the Akamai Official Documentation and consult the Client List Compatibility section regarding list usability.
4. If you try to connect to a blocked website, you will see the following
The commands defined in this section will allow you to troubleshoot the operation of your integration. Keep in mind that you must locate yourself in the <app_lumu_root> folder before running any of them.
The following are the troubleshooting commands for this deployment option:
For troubleshooting purposes, you can run the following commands:
In this section we collect all the potential issues you will find after you run the troubleshooting commands from the above section.
Most of the issues building the component are due to network issues like not having a proper Docker Network connection or temporarily unavailable repositories, just make sure your Docker has an active DNS resolution and a good internet connection.
You might receive errors like failed download, reset connection
If you got some error building the integration related to docker: permission denied while trying to connect to the Docker daemon socket, run the make docker-fix-sudo command.
If you receive errors like this:
It means you are using the wrong key parameters or values. Review your configuration files and run the integration again.
When the authentication fails, you will get the following error. This may occur during the configuration preparation phase executed by the config command to retrieve the contracts and groups.
When the component is operational, an error 401 may be observed.
When you have connectivity problems, you will get the following error. Make sure you have a stable network connection.
An error of this nature often indicates that while the credentials may be valid, the associated permissions are likely misconfigured and getting forbidden 403 error. Please verify the assigned role and permissions.
If you receive the following error.
There could be another instance running. To check this, open the pid.pid file in the integration folder. This file stores the process ID if it’s running.