Mode E

Last update:2026-07-14 11:08:56

Table of Contents

This document provides a detailed explanation of Authentication Mode E, along with instructions on how to use it.

Authentication URL Structure

Similar to Mode C and Mode D, Mode E requires the authentication information to be appended as a query parameter in the URL. The authentication URL structure for Mode E is as follows:

http://domain/uri?auth_key=<time>-<rand>-<uid>-<key>

Note: In the example above, <> indicates the positions of the authentication parameters. These symbols do not appear in the actual URL.

In the URL structure above, auth_key is the only authentication parameter in the URL. It consists of four parts: time, rand, uid, and key. The description of each field is as follows:

Field Description
domain The domain you have added to Atomile.
uri The actual URL path of the CDN request. For example, if the original request URL is http://atomile.com/browse/index.html, the uri should be /browse/index.html. Note that if the request URL contains additional parameters, for example, /browse/index.html?user=123, the uri should include only the path part and exclude the question mark and everything after it.
time The timestamp when the URL is generated. The CDN edge server uses this timestamp to determine whether the URL is still within its valid period. If the current time exceeds the valid period, the CDN does not serve the content. Note: Mode E supports only decimal Unix timestamps for this field.
rand A string that you can define as needed. This value must be included in the key calculation.
uid A user-defined value that is also included in the key calculation.
key The encrypted signature used for authentication verification. In Mode E, the key is calculated as md5(uri-time-rand-uid-ourkey). For example, if the original request URL is http://atomile.com/browse/index.html, the timestamp is 1715916795, the random string is 7asdD6JEYMpCzX, the uid is 0, and the ourkey is atomile, then the generated key value is md5(/browse/index.html-1715916795-7asdD6JEYMpCzX-0-atomile)=ecf7f9414a09e15e1d9f07d03f2d568f.

How to Configure Mode E

In Authentication Mode, select Mode E. The following sections describe each configuration item.

Custom Encryption Key ($ourkey)

The Custom Encryption Key ($ourkey) is a unique string used to generate the encrypted key for URL authentication. Because this key is shared only between you and the CDN server, it significantly improves security by making the authentication parameters difficult for unauthorized parties to forge.

In the console, you can configure multiple ourkey values, separated by semicolons (;).

When multiple ourkey values are configured, the CDN edge server tries them in order during authentication. If the first ourkey fails, the server tries the next one, and so on, until a valid key is found or all keys fail validation.

Signature Calculation Method

The signature key is generated using an encryption algorithm. By default, Atomile uses the MD5 algorithm. If you need a different encryption algorithm for stronger security, contact Atomile technical support for assistance.

Signature Parameter Name

This refers to the name of the authentication parameter in the URL. By default, the parameter name is auth_key.

You can customize this name as needed. For example, if you change it to atomilekey, the client can use a URL such as:

http://atomile.com/browse/index.html?atomilekey=123

to request content.

Valid Time (Seconds)

Atomile provides three methods for configuring the validity period of the URL authentication information:

  • Configure the Upper Limit of the Validity Period: Enter a non-negative integer, for example, 60, to set the maximum validity period in seconds after the timestamp. For example, 60 means the authentication information remains valid for 60 seconds after the timestamp.
  • Configure the Validity Period Range: Enter two comma-separated values. The first value indicates the valid period before the timestamp and should be less than or equal to 0. The second value indicates the valid period after the timestamp and should be greater than or equal to 0. For example, -60,60 means the authentication information is valid from one minute before the timestamp to one minute after it.
  • Do Not Perform Validity Period Validation: Enter a minus sign (-) to disable validity period checks.

Quickly Verify Whether the URL Authentication Configuration Is Correct

To avoid affecting your production environment, we recommend first deploying the configuration to a test environment. After you confirm that the configuration is correct, you can apply it to the live environment. For details on deploying configurations to a test environment, refer to Deploy the Configurations to Staging Environment for Validation.

In addition, you can use the URL Authentication Generator available in the Atomile Console to generate URL authentication parameters and quickly verify your configuration. For more information, refer to Authentication URL Generator.