How to install the Fingerprint integration through Azion Marketplace
Azion Fingerprint enables you to capture device and network data to better identify devices accessing your applications. It can be classified as a Session Fingerprinting integration and uses the collected data to generate a unique identifier and add it as a request header.
This integration includes two features:
- A browser-level script (optional): a JavaScript code that could be added to the web page. It captures data about the browser and sets it as a session cookie named
_azfp_sc
, so this data is always sent by the browser. Even when the usage of this script is optional, it increases the precision of the integration. - An edge function (mandatory): a function to capture connection-related data as well as the “frontend fingerprint” (created by the browser script), when available, to create the session fingerprint. It’ll then add this fingerprint as a request header named
X-AZFP
.
Embedding the script
The browser script is a JavaScript code that runs on the web page you want to fingerprint, a process also known as JavaScript injection. It captures multiple data from the web browser:
- Audio and video support
- Canvas rendering
- If the browser has access to device-level API, such as accelerometer and gyroscope
- Manufacturer’s data
- Timezone
- WebGL rendering
Then, it creates a unique identifier containing all this information and sets it as a session cookie named _azfp_sc
, as cookies are always sent in the requests made by the browser. The script checks if the session cookie already exists. If so, it won’t create a new one.
Azion provides a code sample for this JavaScript injection that you can include in your project. To do so:
- Add this file to your HTML source, following this example:
Alternatively, you can also:
- Copy the code in this file.
- Create a new JavaScript file with the code.
- Include the JavaScript file in your project folder.
- In this example, the file name is
fingerprint-script.js
- In this example, the file name is
- Then, add it to your HTML source, following this example:
Where:
https://example.com/
is your domain.fingerprint-script.js
is your JavaScript file name.
Getting the integration
To install Azion Fingerprint:
- Access Azion Console > Marketplace.
- On the Marketplace’s homepage, select the integration’s card.
- Once the integration’s page opens, click the Install button, at the bottom-right corner of the page.
A successful message appears to confirm your integration is installed.
- Access Real-Time Manager (RTM) > Marketplace.
- On the Marketplace’s homepage, select the integration’s card.
- Once the integration’s page opens, click the Get It Now button, at the bottom-right corner of the page.
A successful message appears to confirm your integration is installed.
Configuring the integration
Setting up an edge firewall
To do so, follow the steps:
- On the upper-left corner, select Products menu > Edge Firewall in the SECURE section.
- Click the + Edge Firewall button.
- Give an easy-to-remember name to your edge firewall.
- Select the domains you want to protect with the function.
- Enable the Edge Functions switch in the Modules section.
- Click the Save button.
Done. Now you’ve instantiated the edge firewall for your integration and it has access to edge functions.
- On the upper-left corner, select Products menu > Edge Firewall in the SECURE section.
- Click the Add Rule Set button.
- Give an easy-to-remember name to your edge firewall.
- Select the domains you want to protect with the function.
- Enable the Edge Functions switch in the Modules section.
- Click the Save button.
Done. Now you’ve instantiated the edge firewall for your integration and it has access to edge functions.
Setting up the function
While still on the Edge Firewall page:
- Select the Functions Instances tab.
- Click the + Function Instance button.
- Choose an easy to remember name for your function.
- On the dropdown menu, select the Fingerprint function.
This action will load the Arguments tab, where you can add the parameters to execute your application.
In this case, you must declare only the variables that you want the function to ignore, as an array of strings. It isn’t a required action. If blank, the function will collect all the data.
To understand how to configure the integration, contact the Azion support team and request the solution documentation.
- When you’re done, click the Save button.
- Select the Functions tab.
- Click the Add Function button.
- Give an easy-to-remember name to your instance.
- On the dropdown menu, select the Fingerprint function.
This action will load the function, showing a form with the function code and, just above it, two tabs: Code and Args.
By clicking the Code tab, you’ll be able to navigate through the source code but not to change it.
On the Args tab, you’ll pass your variables. In this case, you must declare only the variables that you want the function to ignore, as an array of strings. It isn’t a required action. If blank, the function will collect all the data.
To understand how to configure the integration, contact the Azion support team and request the solution documentation.
- When you’re done, click the Save button.
Setting up the Rules Engine
To finish, you have to set up a Rules Engine to configure the criteria and the behavior to run the function.
Still in the Edge Firewall page:
- Select the Rules Engine tab.
- Click the + Rule Engine button.
- Give an easy-to-remember name to the rule.
- You can add a description, but it’s an optional step.
- Select a criteria to run and catch the domains that you want to run the integration on.
- Below, select a behavior to the criteria. In this case, it’ll be Run Function.
- Select the adequate function according to the name you gave it in the instantiate step.
- Click the Save button.
Done. You now have you can collect session data by using Azion Fingerprint.
- Select the Rules Engine tab.
- Click the New Rule button.
- Give an easy-to-remember name to the rule.
- You can add a description, but it’s an optional step.
- Select a criteria to run and catch the domains that you want to run the integration on.
- Below, select a behavior to the criteria. In this case, it’ll be Run Function.
- Select the adequate function according to the name you gave it in the instantiate step.
- Click the Save button.
Done. You now have you can collect session data by using Azion Fingerprint.