Resource access path, authentication requires prefixing with /.
timestamp
Unix timestamp in hexadecimal form (the total number of seconds from 00:00:00, January 1, 1970, UTC time to now, regardless of the time zone)
md5hash
A fixed-length string of 32 characters calculated using the MD5 algorithm:
Algorithm: MD5(Key + Path + timestamp). Note: When calculating, the hexadecimal timestamp must filter out the hexadecimal number identification 0x.
Authentication Logic: If the request has not expired, the node compares this string value with the md5hash value carried in the request URL. If the values are the same, authentication passes, and the request is responded to; if the values are different, authentication fails, returning 403.
Configuration Samples
Assuming the request https://www.example.com/foo.jpg uses authentication method C, the configuration is as follows:
Get authentication parameters:
Path:/foo.jpg.
timestamp: The server-generated time for the authentication URL is 2024-07-15 15:43:06 (UTC+8), converted to hexadecimal (Unix timestamp) format is 6694d30a.
When the Node Server receives a request from the client via the encrypted URL, it extracts the timestamp parameter from the URL, adds the configured Effective duration of "1 second", and compares it to the current time:
1. exceed the "timestamp + effective duration" time, the request is not expired, continue to step 2.
2. The Node Server calculates the md5hash value using the obtained authentication parameters and compares it with the md5hash value carried in the request URL. If the values are the same, authentication passes and the request is responded to; if the values are different, authentication fails, returning 403.