Formats of the encrypted URL for user access
Encrypted URL structure: domain name/URL generation time (accurate to minutes) (timestamp)/md5 value (md5hash)/real path of the source server (FileName). The URL validity period is 1,800 s.
PrivateKeyis set by CDN clients.
- * Validity period of 1,800 seconds: The user fails the authentication if attempting to access the client source server 1,800 seconds (specified in the Timestamp field) later than the preset access time. For example, if the preset access time is 15:00:00 on August 15, 2020, the link expires at 15:30:00 on the same day.
|DomainName||CDN client domain name.|
|timestamp||Resource failure time, as part of the URL and as a factor in the calculation of
|md5hash||//md5hash: The "timestamp", "FileName", and preset "PrivateKey" are used in the MD5
algorithm to get this string, i.e., (
|FileName||The actual URL of the origin access. Note that FileName must start with a slash (/) in authentication.|
- Back-to-source request object.
- The key is set to aliyuncdnexp1234 (user-defined).
- The time for the user to access the client source server is 201508150800 (format: YYYYMMDDHHMM).
- The CDN server constructs a signature string used to calculate the "md5hash":
- The CDN server calculates the "md5hash" according to the signature string:
md5hash = md5sum("aliyuncdnexp1234201508150800/4/44/44c0909bcfc20a01afaf256ca99a8b8b.mp3") = 9044548ef1527deadafa49a890a377f0
- The URL to request CDN:
The calculated "md5hash" is the same as the "md5hash = 9044548ef1527deadafa49a890a377f0" value in the user request, so the request passes authentication