Cloudflare is a content delivery network and DDoS mitigation product. Cloudflare acts as a reverse proxy between a website and the hosting provider.
Lucidum uses the Cloudflare connector to ingest data from Cloudflare services
Requirements #
To use the Cloudflare Connector in Lucidum:
-
Before configuring the Cloudflare connector in Lucidum, you must firstĀ define an API tokenĀ in Cloudflare. Lucidum will use the app and its token to access Cloudflare. (https://api.cloudflare.com/#getting-started-requestsĀ )
-
You can thenĀ configure the Cloudflare connector in LucidumĀ and start ingesting data from Cloudflare.
Prerequisite: Defining an API Bearer Token #
To define an API token that Lucidum will use to fetch data from Cloudflare:
-
Log in to the Cloudflare Dashboard (https://dash.cloudflare.com/loginĀ ) with the account you want to use with Lucidum.
-
Go toĀ User Profile > API Tokens.
-
From the API Token page, selectĀ Create Token.
-
Under API tokens templates, select the templateĀ Read all resources. This token allows Lucidum to read all account resources, zone resources, and user resources.
-
ClickĀ Use template.
-
Accept the default values for theĀ Read all resourcesĀ template and clickĀ Continue to summary.
-
SelectĀ Create Token.
-
Copy and save the token secret.
-
To test that your credentials will work with Lucidum, login to a Linux shell.
-
Execute the following cURL commands:
"https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer <token secret>" \
Ā Ā Ā Ā -H "Content-Type:application/json"where:
-
<token secret>Ā is the value you saved in step #8.
-
-
If the token is valid, the cURL response will include:
āThis API Token is value and activeā
Configuring the Cloudflare Connector #
-
Log in to Lucidum.
-
In the left pane, clickĀ Connector.
-
In theĀ ConnectorĀ page, clickĀ Add Connector.
-
Scroll until you find the Connector for Cloudflare. ClickĀ Connect. TheĀ SettingsĀ page appears.
-
In theĀ SettingsĀ page, enter the following:
-
URL.Ā The URL for the Cloudflare API. For example,Ā https://api.cloudflare.com
-
API Token.Ā Cloudflare API bearer token. Enter the token secret. This is the preferred way to access the API. For more details on creating the API token, seeĀ https://developers.cloudflare.com/api/tokens/create/
-
Auth EmailĀ (optional).Ā The email address associated with your Cloudflare account. This is a legacy setting for use with an API Key.
-
API KeyĀ (optional). Legacy option for authentication with Cloudflare.
-
-
To test the configuration, clickĀ Test.
-
If the connector is configured correctly, Lucidum displays a list of services that are accessible with the connector.
-
If the connector is not configured correctly, Lucidum display an error message.
-
API Documentation #
https://developers.cloudflare.com/api/#getting-started-endpoints