WO2015143596A1 - 文件下载方法、装置和系统 - Google Patents

文件下载方法、装置和系统 Download PDF

Info

Publication number
WO2015143596A1
WO2015143596A1 PCT/CN2014/073931 CN2014073931W WO2015143596A1 WO 2015143596 A1 WO2015143596 A1 WO 2015143596A1 CN 2014073931 W CN2014073931 W CN 2014073931W WO 2015143596 A1 WO2015143596 A1 WO 2015143596A1
Authority
WO
WIPO (PCT)
Prior art keywords
download
control list
access control
server
key
Prior art date
Application number
PCT/CN2014/073931
Other languages
English (en)
French (fr)
Inventor
谢青冬
徐开富
李晓明
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US15/128,614 priority Critical patent/US10212166B2/en
Priority to CN201480001805.6A priority patent/CN104471918B/zh
Priority to PCT/CN2014/073931 priority patent/WO2015143596A1/zh
Publication of WO2015143596A1 publication Critical patent/WO2015143596A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/33User authentication using certificates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/33User authentication using certificates
    • G06F21/335User authentication using certificates for accessing specific resources, e.g. using Kerberos tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a file downloading method, a server, a download access node, and a distributed storage system. Background technique
  • the access authority is used to restrict the terminal from downloading files from the distributed storage system to prevent theft of the file, for example, by determining the request source of the download request, the client, the IP (Internet Protocol, the protocol interconnected between the Internet) segments, and the download. Conditions such as expiration date to prevent the emergence of stolen chains.
  • the download permission is stored in the server.
  • the download access node needs to send the download request to the server for authentication by the server, or the download access node needs to request the download permission from the server.
  • the authentication is completed, so that in the process of authentication, the load of the server is increased, and the authentication speed and the response speed of the file download are also reduced.
  • Embodiments of the present invention provide a file downloading method, a server, a download access node, and a distributed storage system, which can reduce the load of the server, improve the authentication speed, and the response speed of the file download.
  • the present invention provides a file downloading method, including: a server acquiring a set download right, and generating an access control list parameter of the download right;
  • the server issues a download link including the access control list parameter, so that the terminal acquires the download link and generates a download request including the access control list parameter begging.
  • the method further includes:
  • the server obtains a file parameter of the uploaded file, and generates an original download link of the uploaded file;
  • the server obtains the set download permission, and generates an access control list parameter of the download permission, including:
  • the server obtains the set download permission
  • the server generates an access control list according to the download permission
  • the server encrypts the access control list according to a first key agreed with the download access node, and forms an access control list parameter;
  • the server hashes the original download link, the access control list parameter, and a second key agreed with the download access node to generate a hash value, the hash value, and the original download The link is included in the download link.
  • the access control list includes at least one control item, where the access control list parameter is Include at least one control item parameter, wherein one control item parameter corresponds to one control item;
  • control item parameter is formed by the control item after being encrypted according to the first key.
  • the method further includes:
  • the server updates the first key and the second key in consultation with the download access node when a predetermined time threshold is reached.
  • the server acquires user information when uploading a file
  • the server according to the user information, negotiates with the download access node to generate at least one of the first key and the second key.
  • the server is configured to send a download link that includes the access control list parameter , including:
  • the server receives a download link acquisition request of the terminal
  • the server sends the download link to the terminal.
  • the present invention provides a file downloading method, including:
  • the download access node authenticates the download request according to the access control list parameter and the download parameter
  • the download access node sends an authentication result to the terminal.
  • the downloading access node according to the access control list parameter and the download parameter, authenticating the download request, including:
  • the download access node verifies the integrity of the original download link, the access control list parameter, and the second key according to the hash value, and the original download link is generated by the server according to the file parameter of the uploaded file,
  • the hash value is generated by the server hashing the original download link, the access control list parameter, and the second key;
  • the download access node When the at least one of the original download link, the access control list parameter, and the second key is determined to be modified according to the second key, the download access node notifies the terminal that the terminal cannot enter Line download
  • the download access node Determining, according to the second key, that the original download link, the access control list parameter, and the second key are not modified, the download access node according to a first secret agreed with the server Decrypting the access control list parameter and parsing the access control list; the download access node authenticating the download request by using the access control list and the download parameter.
  • the downloading the access node sending the authentication result to the terminal,
  • the download access node notifies the terminal that the download of the uploaded file cannot be performed;
  • the downloading access node When the download parameter satisfies the download permission included in the access control list, the downloading access node sends the upload file identified by the original download link to the terminal.
  • the present invention further provides a server applied to a distributed storage system, including: a receiving unit, configured to acquire a set download permission;
  • a generating unit configured to generate an access control list parameter according to the download permission
  • a sending unit configured to publish a download link that includes the access control list parameter, so that the terminal obtains the download link and generates a download request that includes the access control list parameter.
  • the receiving unit is further configured to obtain a file parameter of the uploaded file
  • the generating unit includes:
  • a generating module configured to generate an access control list according to the downloading permission; and generate an original download link of the uploaded file according to the file parameter of the uploaded file;
  • an encryption module configured to encrypt the access control list according to a first key agreed with the download access node, and form an access control list parameter; the original download link, the access control list parameter, and the Download the second key agreed by the access node to perform a hash operation to generate a hash
  • the value, the hash value and the original download link are included in the download link.
  • the access control list includes at least one control item, where the access control list parameter is Include at least one control item parameter, wherein one control item parameter corresponds to one control item;
  • the server further includes a negotiation unit;
  • the negotiating unit is configured to, when the predetermined time threshold is reached, negotiate with the download access node to update the first key and the second key.
  • the receiving unit is further configured to acquire user information when uploading a file; And a unit, configured to generate, according to the user information, at least one of the first key and the second key by using a user to negotiate with the download access node.
  • the receiving unit is further configured to receive the download of the terminal Link acquisition request
  • the sending unit is specifically configured to send the download link to the terminal.
  • the present invention discloses a download access node applied to a distributed storage system, including:
  • a receiving unit configured to receive a download request initiated by the terminal according to the download link issued by the server, where the download link includes an access control list parameter generated by the server according to the set download authority, where the download request includes the Access control list parameters and download parameters of the terminal;
  • An authentication unit configured to authenticate the download request according to the access control list parameter and the download parameter;
  • a sending unit configured to send an authentication result to the terminal.
  • the authentication unit includes a decryption module and an authentication module
  • a decryption module configured to verify, according to a hash value, an integrity of the original download link, the access control list parameter, and the second key, where the original download link is generated by the server according to a file parameter of the uploaded file, where the The column value is generated by the server hashing the original download link, the access control list parameter, and the second key; decrypting the access control list parameter according to the first key agreed with the server And parsing out the access control list;
  • the sending unit is further configured to notify the terminal that downloading is impossible when at least one of the original download link, the access control list parameter, and the second key is modified according to the second key.
  • the download access node according to the first agreement with the server Decrypting the access control list parameter by the key, and parsing the access control list;
  • the authentication unit further includes:
  • An authentication module configured to authenticate the download request by using the access control list and the download parameter.
  • the sending unit is further configured to: when the download parameter does not meet the access control list When the downloaded permission is included, the terminal is notified that the uploading of the uploaded file cannot be performed; when the downloading parameter satisfies the downloading right included in the access control list, the uploaded file identified by the original download link is Send to the terminal.
  • the present invention provides a distributed storage system, including the server of any of the above, and the download access node of any of the foregoing.
  • the present invention provides a server for a distributed storage system, including a receiver, a processor, and a transmitter;
  • the receiver is configured to obtain a set download permission;
  • the processor is configured to generate an access control list parameter according to the download permission
  • the sender is configured to issue a download link that includes the access control list parameter, so that the terminal acquires the download link and generates a download request including the access control list parameter.
  • the receiver is further configured to obtain a file parameter of the uploaded file
  • the processor is specifically configured to generate an access control list according to the download permission; generate an original download link of the file according to the file parameter of the uploaded file; and according to a first key pair agreed with the download access node Encrypting the access control list and forming an access control list parameter; performing hashing on the original download link, the access control list parameter, and a second key agreed with the download access node to generate a hash The value, the hash value and the original download link are included in the download link.
  • the access control list includes at least one control item, where the access control list parameter includes at least one a control item parameter, wherein one control item parameter corresponds to one control item; and the control item parameter is formed by the control item after being encrypted according to the first key.
  • the processor is further configured to: when the predetermined time threshold is reached, pass the transmitter And updating, by the receiver, the first key and the second key in agreement with the download access node.
  • the receiver is further configured to acquire user information when uploading a file
  • the processor is further configured to: according to the user information, generate, by using the sender and the receiver, a first key and a second key in a negotiation with a download access node for a user At least one of them.
  • the receiver is further configured to receive a download link acquisition request of the terminal;
  • the transmitter is specifically configured to send the download link to the terminal.
  • the present invention provides a download access node for a distributed storage system, including a receiver, a processor, and a transmitter;
  • the receiving device is configured to receive a download request initiated by the terminal according to the download link issued by the server, where the download link includes an access control list parameter generated by the server according to the set download permission, where the download request includes The access control list parameter and the download parameter of the terminal;
  • the processor is configured to authenticate the download request according to the access control list parameter and the download parameter;
  • the transmitter is configured to send an authentication result to the terminal.
  • the processor is configured to verify an original download link, the access control list parameter, and a first The integrity of the second key, the original download link is generated by the server according to the file parameter of the uploaded file, and the hash value is used by the server to the original download link, the access control list parameter, and the second secret Decrypting the key by the key; decrypting the access control list parameter according to the first key agreed with the server, and parsing the access control list;
  • the transmitter is further configured to notify the terminal that downloading is impossible when at least one of the original download link, the access control list parameter, and the second key is modified according to the second key.
  • the download access node according to the first agreement with the server Decrypting the access control list parameter by the key, and parsing the access control list;
  • the processor is further configured to authenticate the download request by using the access control list and the download parameter.
  • the transmitter is further configured to: when the download parameter does not meet the access control list When the download permission is included, the terminal is notified that the download of the uploaded file cannot be performed; or, when the download parameter satisfies the download permission included in the access control list, the original download link is identified The upload file is sent to the terminal.
  • the invention discloses a file downloading method, a server, a download access node and a distributed storage system.
  • the server generates an access control list parameter that limits the download permission, and publishes the access permission control list parameter with the download link, when the terminal
  • the obtained access permission control list parameter is appended to the download request, so that the download access node can download and control the access control list parameters according to the download request.
  • the parameter authenticates the download request and informs the terminal of the authentication result, thereby reducing the load on the server, improving the authentication speed, and speeding up the response speed of the file download.
  • FIG. 1 is a schematic structural diagram of a distributed storage system according to the present invention.
  • FIG. 2 is a flowchart of a file downloading method of a server according to the present invention.
  • FIG. 3 is a flowchart of another file downloading method of the server according to the present invention.
  • FIG. 5 is a flowchart of a file downloading method for downloading an access node according to the present invention
  • FIG. 6 is a flowchart of another file downloading method for downloading an access node according to the present invention
  • FIG. 8 is a flowchart of a file downloading method according to an embodiment of the present invention
  • FIG. 9 is a flowchart of another file downloading method according to an embodiment of the present invention
  • 10 is a flowchart of another file downloading method according to an embodiment of the present invention
  • FIG. 11 is a schematic structural diagram of a server according to the present invention.
  • FIG. 12 is a schematic structural diagram of a download access node according to the present invention.
  • Figure 13 is a schematic diagram of a server according to the present invention.
  • FIG. 14 is a schematic diagram of a download access node according to the present invention.
  • the invention provides a file downloading method for use in a distributed storage system.
  • the distributed storage system 1 such as a network disk and a cloud storage system, as shown in FIG. 1 , includes a server 100 and a download access node 200 .
  • the server 100 is connected to the download access node 200 through the wide area network 400, and the download access node 200 is connected to the terminal 300.
  • the server 100 is connected to the download access node 200 that is located closer to the user's terminal 300 through the wide area network 400.
  • the download access node 200 can respectively connect multiple terminals 300 and receive and forward each terminal 300 respectively.
  • the message accessing node 200 may be a self-built edge node or a purchased CDN.
  • the data message can be received and forwarded through the edge node and the CDN, and the file can also be downloaded.
  • a cache server (not shown) for storing files is obtained, from which a user can obtain a file to be downloaded, and the cache server can be regarded as
  • the download access node 200 is the same device.
  • the download access node 200 is generally provided in a large number and is arranged in various places so that the user can access the nearest one.
  • the terminal 300 can be a tablet 300A, a personal computer 300B, a portable computer 300C, etc., and the type of the terminal 300 is not limited herein.
  • the user When the user needs to upload to the distributed storage system 1, the user first needs to pass through the terminal 300.
  • the installed client accesses the distributed storage system 1 through the browser, and uploads the uploaded and shared uploaded files to the distributed storage system 1.
  • the terminal establishes a connection with the download access node 200 and uploads the file to the download access node 200.
  • the device stores the file uploaded by the user, and the server 100 generates an original download link for storing the file, the original download link being used to identify the location of the file.
  • the user can set the range for allowing the file to be downloaded, that is, set the download permission.
  • the download permission includes the blacklist and white list of the request source, the black and white list of the client, the black and white list of the IP segment, and the validity period of the download.
  • the download permission includes the blacklist and white list of the request source, the black and white list of the client, the black and white list of the IP segment, and the validity period of the download.
  • the above points only can be part of the download permission. Users can also set other types of download permissions for different needs. There is no restriction here.
  • the file downloading method includes:
  • the server acquires the set download permission, and generates an access control list parameter of the download permission.
  • the server 100 generates and stores an access control list of the download permission according to the setting of the user, where the access control list includes a black and white list of the request source set in the download authority, a black and white list of the client, a black and white list of the IP segment, and a download permission. Validity period, etc.
  • the server issues a download link that includes the access control list parameter, so that the terminal acquires the download link and generates a download request that includes the access control list parameter, so that the download access node receives the
  • the initiated download request is used to authenticate the download request according to the download parameter of the terminal and the access control list parameter, and send the authentication result to the terminal.
  • the server 100 After generating the access control list of the download authority, the server 100 transcodes the access control list to form an access control list parameter.
  • the server 100 appends the access control list parameters to the download link for publishing.
  • the posting mentioned here may be that the server 100 directly sends the download link to the terminal to display on the browser page of the terminal for the user to publish on the Internet, or after sending the download link acquisition request to the server 100 through the client on the terminal.
  • Server 100 is based on The download link acquisition request sends a download link to the terminal.
  • the download link received at the terminal includes an original download link identifying the location of the file to be downloaded, an access control list parameter restricting download permission, and other information, and may include, for example, a hash value to be described later.
  • a download request for the file is generated based on the download link, and the download request includes at least an original download link and an access control list parameter, and may also include a hash value to be described later.
  • the download request is parsed to obtain the access control list parameter therein.
  • the access control list parameter is transcoded, the information including the download permission is obtained.
  • the access control list, the download parameter of the terminal is obtained from the download request, and the download parameter includes information such as request source information, client information, IP segment, and request time; by comparing the download parameter and the information in the access control list, Thereby determining whether the download request satisfies the set download authority.
  • the server issues a download link that includes the access control list parameter, including:
  • the server receives a download link acquisition request of the terminal.
  • the server sends the download link to the terminal.
  • server 100 automatically generates a download item in distributed storage system 1.
  • the client initiates a download link acquisition request to the server 100 to obtain the original download link or original download link, access control list parameters, and hash value required to complete the file download.
  • the server 100 When the other user operates the client installed on the terminal 300 to download, the server 100 receives the download link acquisition request for the file download, and the server 100 sends the original download link and the access control list to the terminal 300 according to the download link acquisition request. parameter. At this time, in other users When requesting a file download, the client will make a download request based on the original download link and access control list parameters just obtained.
  • the client can customize the download request in the HTTP protocol according to the HTTP protocol (HTTP-Hypertext transfer protocol), that is, a parameter can be set in the client for storing the access control list parameter as needed.
  • HTTP-Hypertext transfer protocol HTTP-Hypertext transfer protocol
  • the access control list containing the download permission needs to be encrypted.
  • This encryption is achieved by a key, which is formed by the agreement between the server 100 and the download access node 200. After the key is formed, the server 100 and the download access node 200 store the keys separately.
  • the key can be set according to the actual situation, one key is used for reversible encryption, and the other key is used for hash operation to obtain the hash value. When setting, you can choose either one of them, or encrypt them by two keys.
  • the key mentioned here can be set in various forms, for example, can be formed through negotiation between the server 100 and the download access node 200 when the distributed storage system 1 is established; or a distributed storage system can be used for each one.
  • the user setting key of 1 is that when the user logs in to the distributed storage system 1, the user information is marked by the login, thereby forming a key for one user; and a key can be formed for each uploaded file. .
  • the access access node 200 accesses all the terminals accessing it through the key for authentication and license download.
  • the generated key may be negotiated between the server 100 and the download access node 200 in various manners as described above, and is not limited herein.
  • the method before the server obtains the set download permission and generates the access control list parameter of the download permission, the method further includes:
  • the server acquires a file parameter of the uploaded file, and generates an original download link of the file.
  • the distributed storage system 1 After the distributed storage system 1 obtains the uploaded file, the uploaded file is stored, and At the same time, the file parameter of the uploaded file is stored, and the file parameter can identify the location, name, and the like of the uploaded file. After the uploaded file is stored, the original download link identifying the location is generated based on the file parameters of the uploaded file.
  • the server obtains the set download permission, and generates an access control list parameter of the download permission, including:
  • the server acquires the set download permission.
  • the server generates an access control list according to the download permission.
  • the server 100 After obtaining the download permission, the server 100 generates an access control list according to the download permission, and directly identifies which download rights exist in the access control list.
  • the server encrypts the access control list according to a first key agreed with the download access node, and forms an access control list parameter.
  • the server 100 After generating the access control list, the server 100 reversibly encrypts the access control list based on the first key. Before performing reversible encryption, the server 100 first compresses the production access control list and converts the access control list into binary data. After the conversion is completed, the binary data formed by the conversion is reversibly encrypted according to the first key agreed between the server 100 and the download access node 200.
  • Reversible encryption here refers to the logical operation of binary data according to the first key, so that the person who does not know the key cannot parse the access control list. The logical operation used in the encryption may be performed according to the existing manner, and details are not described herein again.
  • the server 100 After completing the encryption of the access control list, the server 100 transcodes the encrypted access control list to form an access control list parameter suitable for communication.
  • S104 The server hashes the original download link, the access control list parameter, and a second key agreed with the download access node to generate a hash value.
  • the hash value and the original download link are included in the download link.
  • the second key based on the agreement is based on the URI (Uniform Resource Identifier) in the original download link according to the hash algorithm.
  • Hash with the resource identifier After the hash, a hash value is formed. Through the formed hash value, it can be determined whether the access control list parameter is maliciously modified.
  • the hash algorithm generally uses MD5 (Message Digest Algorithm 5) and SHA-1 (Secure Hash Algorithm 1).
  • MD5 Message Digest Algorithm 5
  • SHA-1 Secure Hash Algorithm 1
  • Hashing can be performed by other hashing algorithms based on the original download link, the access control list parameter, and the second key.
  • the object of the hash is the URI of the original download link, the access control list parameter, and the second key agreed between the server 100 and the download access node 200.
  • the URI in the hashed object can also be changed to something else, such as a URL. Since the hashed object can be set according to actual needs when hashing, the hashed object is not limited to this. However, it should be noted that because the domain name may change during the download request, it may also be based on multiple protocols, such as the http protocol or the https protocol. These differences will result in different URLs. However, in the above case, the URL The URI is generally not changed, so when performing a hash operation, it is preferable to take the URI, the access control list parameter, and the second key as objects.
  • the server 100 After completing the generation of the hash value, the server 100 splices the original download link, the access control list parameter, and the hash value to form a final download link.
  • the final download link posted by the user can be copied and pasted into the browser's address bar to access the distributed storage system 1 for file download.
  • the access control list includes at least one control item, where the access control list parameter includes at least one control item parameter, where one control item parameter corresponds to one control item; and the control item parameter is used by the control item. Formed after encryption according to the first key. Include at least one control item in the access control list. For example, it may include at least one of a request source for allowing/disabling downloading, a client allowing/disabling downloading, an IP segment allowing/disabling downloading, and a validity period for allowing downloading, of course, in addition to the control items provided above, Other control items may be included, and the types and the number of control items may be increased or decreased according to the actual needs of the user. After the user sets the download permission and generates the access control list, the server 100 may split the control items one by one to form respective control items corresponding to the access control list.
  • the server 100 performs reversible encryption for each control item and generates at least one control item parameter by transcoding.
  • the splicing is performed in a prescribed manner to form a character string of at least one control item parameter.
  • the prescribed manner may be ascending order, descending order or other agreed-upon manner, and no limitation is imposed here.
  • the server 100 After completing the reversible encryption of the respective control items, the server 100 splices the original download link, the at least one control item parameter, and the hash value to form a download link.
  • step S112 when the sending of the download link is performed in step S112, in the HTTP header of the customized download request, a plurality of items may be added, each item corresponding to one of the control items in the access control list.
  • the download request is made, the obtained encrypted at least one control item is loaded into the HTTP header according to the download request, and sent to the download access node 200 for authentication.
  • the method further includes:
  • the server negotiates with the download access node to update the first key and the second key.
  • the server 100 and the download access node 200 negotiate again to update the key, at the time of the update. You can also set to update only one of the first key and the second key, or all of them.
  • the invention discloses a file downloading method in a distributed storage system, and the server generates a pair of files.
  • the access control list parameter with the permission is restricted, and the access permission control list parameter is advertised with the download link.
  • the terminal sends a download request to the download access node according to the download link, the obtained access permission control list parameter is attached to the download.
  • the downloading access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and notify the terminal of the authentication result, thereby reducing the load of the server and improving the authentication. Speed and speed up the response of file downloads.
  • the downloading access node when authenticating by the above method, does not need to cache the access control list parameter, but obtains the access control list parameter and the download parameter in the download request from the download request for authentication, so that It also saves memory resources consumed by downloading access nodes.
  • a file downloading method corresponding to the server 100 described above is described below by taking the download access node 200 as an example.
  • the distributed storage system 1 see FIG. 1 , includes the server 100 . And downloading the access node 200;
  • the method see Figure 5, includes:
  • the download access node receives a download request initiated by the terminal according to a download link issued by the server.
  • the download access node authenticates the download request according to the access control list parameter and the download parameter.
  • the download link includes an access control list parameter generated by the server 100 according to the set download authority, and the download request includes the access control list parameter and the download parameter of the terminal.
  • the download request After the download access node 200 receives the download request, the download request is decoded, and the download parameter and the access control list parameter about the terminal in the download request are obtained. Since the download parameter is attached to the HTTP protocol according to the HTTP protocol and is not encrypted based on the key, the download access node 200 can directly obtain the download parameter.
  • the download parameter also includes information such as the request source of the terminal, the used client, the IP segment, and the download time. Since the download request is generated according to the HTTP protocol, the content included in the download request can refer to the existing content. The download request in the HTTP protocol will not be described here.
  • the download request may be made through the browser, or may be performed by a client pre-installed on the terminal 300.
  • the download parameter is authenticated according to the download permission recorded in the access control list.
  • the download access node sends an authentication result to the terminal.
  • the terminal 300 can download the file.
  • the download request does not satisfy the download permission, for example, the time limit set by the user is exceeded, and the download request is sent through other websites or the client in the blacklist is used.
  • downloading, etc., file downloading is not possible.
  • the access node 200 is authenticated by the download access node 200. At this time, the download access node 200 can obtain the storage according to the original download link of the uploaded file included in the download request. Uploading the file to the cache server, and sending the uploaded file to the terminal to complete the file download process.
  • the download access node 200 decrypts and performs integrity check on the download request based on the key agreed with the server 100 in advance, thereby acquiring the access control list included in the download request.
  • the download link is also encrypted.
  • the download access node 200 also needs to decrypt and verify the download request according to the key agreed in advance with the server 100, thereby obtaining the access control list included in the download request.
  • the process of performing integrity check and decryption is interchangeable.
  • the process of integrity check is preferably performed first, because if the download request has been maliciously modified, the access control list obtained even after decryption cannot be used any more. In this way, the integrity check and decryption are performed first to ensure that the download access node 200 can perform authentication of the download request more efficiently.
  • the downloading access node performs authentication on the download request according to the access control list parameter and the download parameter, including:
  • the download access node verifies the integrity of the original download link, the access control list parameter, and the second key according to the hash value.
  • the original download link is generated by the server 100 according to file parameters of the uploaded file, and the file parameter generally includes related information such as the location, name, and time of the uploaded file. In a distributed storage system, this will be generated directly after the upload of the uploaded file is completed.
  • the hash value is generated by the server 100 hashing the original download link, the access control list parameter, and the second key.
  • the download access node 200 obtains the download parameter in the download request, and parses the download request to obtain the original download link, the access control list parameter, and the hash value, wherein the hash value is calculated by the server 100 according to the original download.
  • the link, the access control list parameter and the second key are formed after performing a hash operation, and the hash value is used to determine whether the access control list parameter is maliciously modified by others.
  • a hashing algorithm is used, generally MD5 and SHA-1 are used.
  • the hashing algorithm used is not limited to the above two types, and the original download link and access can be accessed through other hashing algorithms.
  • the control list parameter and the second key are hashed.
  • the hash value is a value uniquely formed after the URI of the original download link, the access control list parameter, and the second key are hashed, when someone has the original download link, the access control list parameter, and the second key When any one of the changes is made, the integrity check cannot be passed.
  • the download access node 200 verifies the original download link, the access control list parameter, and the second key based on the hash value that has been acquired, and obtains a check result. When at least one of the original download link, the access control list parameter, and the second key is modified, the integrity check cannot be passed. Then, in the case of being tampered with, the download access node 200 informs the terminal that the download process cannot be completed.
  • the download access node is configured according to an agreement with the server.
  • a key decrypts the access control list parameter and parses the access control list.
  • the download request may pass the integrity check. Thereafter, the download access node 200 decodes the access control list parameters to obtain an access control list that is reversibly encrypted according to the first key.
  • the download access node 200 decrypts the reversibly encrypted access control list according to the first key agreed with the server 100, that is, the inverse operation of the logical operation according to the first key, where the logical operation should be with the server 100 Logical operations correspond.
  • the access control list is binary data. In this case, the binary data needs to be decompressed, so that the access control list containing the download permission can be obtained.
  • the download access node authenticates the download request by using the access control list and the download parameter.
  • the authentication process is similar to that described in step S210, and the download parameters are compared one by one according to the download permission defined in the access control list to determine whether the terminal that sends the download request satisfies the download permission of the uploaded file.
  • the download access node 200 sends the authentication result to the terminal to inform whether it can download the uploaded file. Specifically, the downloading the access node sends the authentication result to the terminal, including: S221. When the download parameter does not meet the download permission included in the access control list, the download access node notifies the terminal that downloading of the uploaded file cannot be performed;
  • the download access node sends the upload file identified by the original download link to the terminal.
  • the terminal When one of the download parameters does not satisfy the download permission in the access control list, the terminal does not have the right to download the uploaded file. At this time, the download access node 200 notifies the terminal that the download cannot be completed.
  • the download access node 200 can find the uploaded file located in the cache server according to the original download link, and forward the uploaded file to the terminal, so that the terminal completes the download process.
  • the access control list parameter includes at least one control item parameter, so that the control item parameters need to be decrypted one by one to obtain corresponding control items, and the access control list can be obtained according to the control items. Because, by splitting the access control list in advance, the item that the user does not set the download permission can be omitted, for example, only the validity period of the download permission is set, and then the control parameter corresponding to the other download permission is not required in the transmission process. The authentication speed can be further improved when performing authentication.
  • the hash value is formed by the server after hashing according to the original download link, at least one control item parameter, and the second key.
  • the download access node 200 proceeds for each control item parameter to generate a corresponding at least one encrypted control item.
  • the download access node 200 integrates and generates an access control list based on at least one control item that has been acquired.
  • the access control list is split into multiple control items for reversible encryption, so when decrypting, the download access node 200 is also performed for each encrypted control item, so that it can be obtained. Access at least one control item in the control list.
  • the download link is spliced by the original download link, at least one control item parameter, and the hash value, and in the process of disassembling the download link, each control item parameter needs to be split one by one to complete sexual verification, decoding, decryption and other processes.
  • the downloading method performed by the access node 200 may also set a predetermined time threshold, such as one day, one week or one month. And, and setting, when the predetermined time threshold is reached, causing the download access node 200 to negotiate with the server 100 again to update the key, the key including at least one of the first key and the second key. .
  • the key can also be negotiated in the following ways.
  • the key may be formed by the negotiation between the download access node 200 and the server 100 when the distributed storage system 1 is established; or the key may be set for each user who uses the distributed storage system 1, that is, the user logs in to the distributed When the system 1 is stored, the user information is recorded by the login, thereby forming a key for one user; and a key can be formed for each uploaded file.
  • the generated key may be negotiated between the downloading node 200 and the server 100 in various manners as described above, and is not limited herein.
  • the invention discloses a file downloading method
  • the server generates an access control list parameter that limits download rights, and publishes the access right control list parameter with a download link, when the terminal sends a download request to the download access node according to the download link. And appending the obtained access control list parameter to the download request, so that the downloading access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and the authentication is performed.
  • the result informs the terminal, thereby reducing the load on the server, improving the authentication speed and speeding up the response of the file download.
  • the distributed storage system 2 includes a central server 110 and an access node 210; the user accesses the central server through the browser on the first terminal 31 OA to upload and set the uploaded file. Download rights, other users download through the second terminal 310B.
  • the file downloading method includes:
  • the central server and the access node negotiate to generate a first key and a second key.
  • the central server 110 and the access node 210 negotiate to generate a first key and a second key for encryption and decryption.
  • the first terminal uploads an upload file that the user needs to share to the central server, and the central server stores the uploaded file and generates an original download link.
  • the user selects an upload file to be uploaded in the browser page, and the selected upload file is uploaded to the access node 210 for storage, and generates file parameters, and generates an original download link according to the file parameters of the uploaded file.
  • the user sets the download permission of the uploaded file, and the central server generates an access control list according to the download permission.
  • the user sets the download authority through the terminal 310A, that is, sets the black/white list of the request source, the black/white list of the client that allows the download, the black/white list of the IP segment, and the validity period of the download permission.
  • the center server 110 acquires the download authority and generates and stores an access control list according to the download authority.
  • the central server compresses the access control list.
  • the central server 110 compresses the access control list to generate a binary character string.
  • the central server performs reversible encryption on the compressed access control list according to the first key.
  • the central server 110 performs a logical operation based on the binary character string generated by the first key and the compressed access control list to form an encrypted access control list.
  • the central server transcodes the encrypted access control list to generate an access control list parameter.
  • the central server 110 the encrypted access control list to convert the communication access control applicable to a bad) table parameters.
  • the central server performs a hash operation according to the original download link, the access control list parameter, and the second key to obtain a hash value.
  • the center server 110 hashes the URI of the original download link, the access control list parameter, and the second key according to the SHA-1 algorithm to obtain a hash value.
  • the central server splices the original download link, the access control list parameter, and the hash value to form a download link, and displays it on the first terminal.
  • the center server 110 splices the generated original download link, the access control list parameter, and the hash value to form a download link, and transmits the download link to the first terminal 310A for display.
  • the user copies the download link and publishes it on the Internet.
  • the user copies the download link displayed on the terminal 310A and posts the download link on the Internet according to his or her preference.
  • the second terminal of the other user forms a download request according to the download link.
  • the second terminal sends the download request to the access node.
  • the access node obtains a download parameter, an original download link, an access control list parameter of the access control list, and a hash value from the download request.
  • the second terminal 310B sends a download request to the access node 210, and the access node 210 obtains the download parameters, the original download link, the access control list parameters, and the hash value from the download request.
  • the download parameters include information such as the request source of the download request, the IP segment, and the request time.
  • the access node determines, according to the hash value, whether the original download link, the access control list parameter, and the download link formed by the second key splicing satisfy the integrity check.
  • the access node can be made to determine if someone has maliciously modified the download link.
  • step S23 is performed.
  • the access node decodes the access control list parameter to generate an encrypted access control column. Table.
  • the access node decrypts the encrypted access control list according to the first key and integrates and generates an access control list.
  • the access node 210 After the integrity check is completed, the access node 210 performs an inverse operation of the encrypted access control list according to the first key, and generates an access control list including download rights set by the user.
  • the access node determines, according to the download permission included in the access control list and the download parameter in the download request, whether the download request satisfies the condition for downloading the file.
  • the access node 210 compares the download permission and the download parameter. When any one of the request source, the IP segment, and the download time in the download parameter does not meet the setting of the user in the download permission, the download request is discarded, and the terminal is discarded. 310B returns the information that the authentication failed, and cannot be downloaded.
  • step S26 is performed.
  • the access node requests a file from the central server, and the central server sends the uploaded file to the second terminal used by another user by using the access node.
  • the central server and the access node set the first key for encryption, and the second key performs integrity verification, so that the authentication work can be completed at the access node 200. There is no need to authenticate the download request through the central server, which improves the authentication speed and the speed at which files are downloaded.
  • step S17, step S18, and step S19 need not be performed, but after step S16, as shown in FIG. Also shown, it also includes:
  • the central server caches the original download link, the access control list parameter, and the hash value and generates a file-related download item.
  • the central server 110 generates a download item regarding the file uploaded by the user on the web page corresponding to the distributed storage system 2, and establishes an association between the download item and the original download link, the access control list parameter, and the hash value.
  • the client on the terminal 310B Send a download link to the central server to get the request.
  • the central server receives a download link acquisition request sent by the second terminal of another user, and sends the stored original download link, the access control list parameter, and the hash value to other user terminals.
  • the access control list parameters and the hash value are set in the header of the HTTP protocol download request.
  • the header of the download request can be customized according to the need, and then the access control is performed. More controls can be added to the list to make the settings for download permissions more diverse.
  • the access control list includes at least one control item.
  • Another distributed storage system 2 see Figure 10, includes:
  • the central server and the access node negotiate to generate a first key and a second key.
  • the central server 110 and the access node 210 negotiate to generate a first key and a second key for encryption and decryption.
  • the first terminal uploads an upload file that the user needs to share to the central server, and the central server stores the uploaded file and generates an original download link.
  • the user selects an upload file to be uploaded in the browser page, and the selected upload file is uploaded to the access node 210 for storage, and generates file parameters, and generates an original download link according to the file parameters of the uploaded file.
  • the user sets the download permission of the uploaded file, and the central server generates an access control list according to the download permission.
  • the user sets the download authority through the terminal 310A, that is, sets the black/white list of the request source, the black/white list of the client that allows the download, the black/white list of the IP segment, and the validity period of the download permission.
  • the center server 110 acquires the download authority and generates and stores an access control list according to the download authority.
  • the central server splits the access control list item by item, and forms at least one control item, wherein one control item corresponds to one download right, for example, one control item is a black/white list of the request source, then Corresponding to the download permission set by the user about the request source.
  • Steps S13-S17 performed by the corresponding central server 110 are respectively as follows: S 13a.
  • the central server compresses at least one control item.
  • the central server reversibly encrypts the compressed at least one control item according to the first key.
  • the central server transcodes at least one encrypted control item to generate at least one control item parameter.
  • the central server performs a hash operation according to the original download link, the at least one control item parameter, and the second key to obtain a hash value.
  • the central server splices the original download link, the at least one control item parameter, and the hash value to form a download link, and displays the first terminal.
  • the user copies the download link and publishes it on the Internet.
  • the user copies the download link displayed on the terminal 310A and posts the download link on the Internet according to his or her preference.
  • the second terminal of the other user forms a download request according to the download link.
  • the second terminal sends the download request to the access node.
  • steps S22-S25 performed by the access node 210 specifically:
  • the access node obtains, from the download request, the download parameter, the original download link, the at least one control item parameter of the access control list, and the hash value.
  • the access node determines, according to the hash value, whether the original download link, the at least one control item parameter, and the download link formed by the second key splicing satisfy the integrity check.
  • step S24a is performed.
  • the access node decodes at least one control item parameter to generate at least one encrypted control item.
  • the access node decrypts the at least one encrypted control item according to the first key to generate at least one control item and integrates to generate an access control list.
  • the access node 210 After the integrity check is completed, the access node 210 performs an inverse operation of the at least one encrypted control item according to the first key, generates at least one control item, and integrates at least one control item to form a download including the user setting. Access control list for permissions.
  • the item that the user does not set the download permission may be omitted, for example, only the validity period of the download permission is set, then the control item parameter corresponding to the other download authority is not included in the transmission process, and the authentication may be further performed during the authentication. Improve the speed of authentication.
  • the central server 110 may not splicing and publishing the original download link, the at least one control item parameter, and the hash value, that is, step S17a, step S18, and step S19 need not be performed, but After step S16a, as shown in FIG. 11, the method further includes:
  • the central server caches the original download link, at least one control parameter and the hash value, and generates a file-related download item.
  • the central server receives the download link acquisition request sent by the terminal, and sends the stored original download link, the at least one control item parameter, and the hash value to the second terminal of the other user.
  • the access node determines, according to the download permission included in the access control list and the download parameter in the download request, whether the download request satisfies the condition for downloading the file.
  • the access node 210 compares the download permission and the download parameter. When any one of the request source, the IP segment, and the download time in the download parameter does not meet the setting of the user in the download permission, the download request is discarded, and the terminal is discarded. 310B returns the information that the authentication failed, and cannot be downloaded.
  • step S26 is performed.
  • the access node sends the uploaded file to the second terminal used by other users.
  • the sharing and downloading of uploaded files can be completed.
  • the first key is set by the central server and the access node for encryption, and the second key is used for integrity.
  • the verification in this way, the authentication work can be completed at the access node 200 without the need to authenticate the download request through the central server, thereby improving the authentication speed and the speed at which the file is downloaded.
  • a predetermined time threshold may also be set.
  • the timing in the distributed storage system reaches the preset time threshold, the first key and the second key are updated by another negotiation between the central server and the access node or the CDN.
  • first and second keys may be generated for each user negotiation according to different users.
  • the present invention also discloses a central server and a download access node.
  • a server 500 for a distributed storage system includes: a receiving unit 510, configured to acquire a set download permission;
  • a generating unit 520 configured to generate an access control list parameter according to the download permission
  • the sending unit 530 is configured to publish a download link that includes the access control list parameter, so that the terminal acquires the download link and generates a download request that includes the access control list parameter.
  • the receiving unit 510 is further configured to obtain a file parameter of the uploaded file.
  • the generating unit 520 includes:
  • a generating module 521 configured to generate an access control list according to the download permission; and generate an original download link of the uploaded file according to the file parameter of the uploaded file;
  • the encryption module 522 is configured to encrypt the access control list according to a first key agreed with the download access node, and form an access control list parameter; the original download link, the access control list parameter, and The second key agreed with the download access node is hashed to generate a hash value, and the hash value and the original download link are included in the download link.
  • the access control list includes at least one control item, where the access control list parameter includes at least one control item parameter, where one control item parameter corresponds to one control item, and the control item is according to the first
  • the control item parameters are formed after the key is reversibly encrypted.
  • the server 500 further includes a negotiating unit 540;
  • the negotiating unit 540 is configured to, when the predetermined time threshold is reached, negotiate with the download access node to update the first key and the second key.
  • the receiving unit 510 is further configured to: obtain the user information when the file is uploaded; the negotiating unit 540 is further configured to: according to the user information, generate, by the user, the user and the download access node to generate the At least one of the first key and the second key.
  • the receiving unit 510 is further configured to receive a download link acquisition request of the terminal, where the sending unit 530 is specifically configured to send the download link to the terminal.
  • the invention discloses a server, which generates an access control list parameter that limits download rights, and publishes the access right control list parameter with a download link, when the terminal sends a download request to the download access node according to the download link, Appending the obtained access control list parameter to the download request, so that the download access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and the authentication result is obtained. Inform the terminal, thereby reducing the load on the server, improving the authentication speed and speeding up the response of the file download.
  • the present invention also discloses a download access node applied to a distributed storage system, where the distributed storage system further includes a server;
  • the download access node 600 includes:
  • the receiving unit 610 is configured to receive a download request initiated by the terminal according to the download link issued by the server, where the download link includes an access control list parameter generated by the server according to the set download authority, where the download request includes Determining an access control list parameter and a download parameter of the terminal;
  • the authentication unit 620 is configured to perform authentication on the download request according to the access control list parameter and the download parameter.
  • the sending unit 630 is configured to send an authentication result to the terminal.
  • the authentication unit 620 includes a decryption module 621 and an authentication module 622:
  • the decrypting module 621 is configured to verify the integrity of the original download link, the access control list parameter, and the second key according to the hash value, where the original download link is generated by the server according to the file parameter of the uploaded file.
  • the hash value is generated by the server hashing the original download link, the access control list parameter, and the second key; and the access control list is paired according to a first key agreed with the server
  • the parameter is decrypted, and the access control list is parsed;
  • the sending unit 630 is further configured to notify the terminal that the terminal cannot be performed when it is determined that the original download link, the access control list parameter, and the second key are modified according to the second key. Downloading; when determining that the original download link, the access control list parameter, and the second key are not modified according to the second key, the download access node according to an agreement with the server Decrypting the access control list parameter by a key, and parsing the access control list;
  • the authentication module 622 is configured to authenticate the download request by using the access control list and the download parameter.
  • the sending unit 630 is further configured to: when the download parameter does not meet the download permission included in the access control list, notify the terminal that the uploading of the uploaded file cannot be performed; when the downloading When the parameter satisfies the download permission included in the access control list, the upload file identified by the original download link is sent to the terminal.
  • the invention discloses a download access node, the server generates an access control list parameter that limits the download permission, and publishes the access permission control list parameter with the download link, and the terminal sends a download request to the download access node according to the download link. And appending the obtained access control list parameter to the download request, so that the download access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and The result of the right is informed to the terminal, thereby reducing the load on the server, improving the authentication speed and speeding up the response of the file download.
  • the invention also discloses a distributed storage system, comprising the above server 500 and The download access node 600 is described.
  • the invention discloses a server, which generates an access control list parameter that limits download rights, and publishes the access right control list parameter with a download link, when the terminal sends a download request to the download access node according to the download link, Appending the obtained access control list parameter to the download request, so that the download access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and the authentication result is obtained. Inform the terminal, thereby reducing the load on the server, improving the authentication speed and speeding up the response of the file download.
  • a server for a distributed storage system see FIG. 12, including a receiver, a processor, and a transmitter;
  • the receiver is configured to obtain a set download permission
  • the processor is configured to generate an access control list parameter according to the download permission
  • the sender is configured to issue a download link that includes the access control list parameter, so that the terminal acquires the download link and generates a download request including the access control list parameter.
  • the receiver is further configured to obtain a file parameter of the uploaded file.
  • the processor is specifically configured to generate an access control list according to the download permission; generate an original download link of the file according to the file parameter of the uploaded file; and according to a first key pair agreed with the download access node Encrypting the access control list and forming an access control list parameter; performing hashing on the original download link, the access control list parameter, and a second key agreed with the download access node to generate a hash The value, the hash value and the original download link are included in the download link.
  • the access control list includes at least one control item, where the access control list parameter includes at least one control item parameter, where one control item parameter corresponds to one control item; and the control item parameter is used by the control item.
  • the processor is further configured to, when the predetermined time threshold is reached, negotiate, by the sender and the receiver, to update the first key and the second with the download access node. Key.
  • the receiver is further configured to obtain user information when uploading a file;
  • the processor is further configured to: according to the user information, generate, by using the sender and the receiver, a first key and a second key in a negotiation with a download access node for a user At least one of them.
  • the receiver is further configured to receive a download link acquisition request of the terminal, where the sender is specifically configured to send the download link to the terminal.
  • the invention discloses a server, which generates an access control list parameter that limits download rights, and publishes the access right control list parameter with a download link, when the terminal sends a download request to the download access node according to the download link, Appending the obtained access control list parameter to the download request, so that the download access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and the authentication result is obtained. Inform the terminal, thereby reducing the load on the server, improving the authentication speed and speeding up the response of the file download.
  • the present invention also discloses a download access node applied to a distributed storage system, see FIG. 13, including a receiver, a processor, and a transmitter;
  • the receiving device is configured to receive a download request initiated by the terminal according to the download link issued by the server, where the download link includes an access control list parameter generated by the server according to the set download permission, where the download request includes The access control list parameter and the download parameter of the terminal;
  • the processor is configured to authenticate the download request according to the access control list parameter and the download parameter;
  • the transmitter is configured to send an authentication result to the terminal.
  • the processor is configured to verify, according to a hash value, an integrity of the original download link, the access control list parameter, and the second key, where the original download link is uploaded by the server according to the file.
  • File parameter generation the hash value is generated by the server hashing the original download link, the access control list parameter, and the second key; according to the first key pair agreed with the server Decrypting the access control list parameter, and parsing the access control list;
  • the transmitter is further configured to notify the terminal that downloading is impossible when at least one of the original download link, the access control list parameter, and the second key is modified according to the second key.
  • the download access node according to the first agreement with the server Decrypting the access control list parameter by the key, and parsing the access control list;
  • the processor is further configured to authenticate the download request by using the access control list and the download parameter.
  • the sender is further configured to: when the download parameter does not meet the download permission included in the access control list, notify the terminal that the uploading of the uploaded file cannot be performed; or, when When the download parameter satisfies the download permission included in the access control list, the upload file identified by the original download link is sent to the terminal.
  • the invention discloses a download access node, the server generates an access control list parameter that limits the download permission, and publishes the access permission control list parameter with the download link, and the terminal sends a download request to the download access node according to the download link. And appending the obtained access control list parameter to the download request, so that the download access node can authenticate the download request according to the access control list parameter and the download parameter in the download request, and The result of the right is informed to the terminal, thereby reducing the load on the server, improving the authentication speed and speeding up the response of the file download.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or unit, and may be in an electrical, mechanical or other form.
  • the components displayed for the unit may or may not be physical units, ie may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种文件下载方法、服务器、下载接入节点和分布式存储系统,属于通信技术领域,为解决现有技术中增加了服务器的负载,降低了鉴权速度和文件下载的响应速度的问题而设计。一种文件下载方法,包括:服务器获取设置的下载权限,生成下载权限的访问控制列表参数;服务器发布包含访问控制列表参数的下载链接,以便于终端获取下载链接并生成包含访问控制列表参数的下载请求。

Description

文件下载方法、 装置和系统 技术领域 本发明属于通信技术领域, 尤其涉及一种文件下载方法、 服务器、 下载 接入节点和分布式存储系统。 背景技术
随着互联网通信技术的不断普及, 网盘、 云存储系统等各类分布式存储 系统逐渐被越来越多的用户使用。 在分布式存储系统中, 带宽和服务器资源 都是有限的, 如何更好地保护分布式存储系统开发者的利益以及如何为用户 创造良好的用户体验被视为一个热点问题。 通过访问权限来限制终端从分布 式存储系统下载文件从而实现防止盗链的作用, 例如可以通过判定下载请求 的请求源、 客户端、 IP ( Internet Protocol , 互联网之间互连的协议)段、 下载 有效期等条件来防止盗链的出现。
在现有技术中, 下载权限存储在服务器中, 在进行文件下载时, 需要下 载接入节点将下载请求发送至服务器以通过服务器进行鉴权, 或者, 下载接 入节点需要向服务器请求下载权限以完成鉴权, 这样一来, 在进行鉴权的过 程中, 增加了服务器的负载, 也降低了鉴权速度和文件下载的响应速度。 发明内容
本发明的实施例提供一种文件下载方法、 服务器、 下载接入节点和分布 式存储系统, 能够降低服务器的负载, 提升鉴权速度和文件下载的响应速度。
为达到上述目的, 本发明的实施例采用如下技术方案:
第一方面, 本发明提供了一种文件下载方法, 包括: 服务器获取设置的下载权限, 生成所述下载权限的访问控制列表参 数;
所述服务器发布包含所述访问控制列表参数的下载链接, 以便于所 述终端获取所述下载链接并生成包含所述访问控制列表参数的下载请 求。
结合本发明的第一方面, 在本发明第一方面的第一种可能的实现方 式中, 在所述服务器获取设置的下载权限, 生成所述下载权限的访问控 制列表参数之前, 还包括:
所述服务器获取上传文件的文件参数, 生成所述上传文件的原始下 载链接;
所述服务器获取设置的下载权限, 生成所述下载权限的访问控制列 表参数, 包括:
所述服务器获取设置的下载权限;
所述服务器根据所述下载权限生成访问控制列表;
所述服务器根据与所述下载接入节点约定的第一密钥对所述访问 控制列表进行加密, 并形成访问控制列表参数;
所述服务器对所述原始下载链接、 所述访问控制列表参数和与所述 下载接入节点约定的第二密钥进行散列运算, 生成散列值, 所述散列值 和所述原始下载链接包含于所述下载链接中。
结合本发明第一方面的第一种可能的实现方式, 在本发明第一方面的第 二种可能的实现方式中, 所述访问控制列表中包含至少一个控制项, 所述访 问控制列表参数中包括至少一个控制项参数, 其中一个控制项参数对应一个 控制项;
所述控制项参数由所述控制项在根据所述第一密钥进行加密后形成。 结合本发明第一方面的第一种可能的实现方式, 在本发明第一方面的第 三种可能的实现方式中, 所述方法还包括:
当到达预定时间阔值时, 所述服务器与所述下载接入节点协商更新所述 第一密钥和所述第二密钥。
结合本发明第一方面的第一种可能的实现方式, 在本发明第一方面的第 四种可能的实现方式中, 在所述服务器获取上传文件的文件参数, 生成所述 上传文件的原始下载链接之前, 还包括:
所述服务器获取上传文件时的用户信息;
所述服务器根据所述用户信息, 针对一个用户与所述下载接入节点协商 生成所述第一密钥和所述第二密钥中的至少一个。
结合本发明第一方面或上述第一方面的任一种可能的实现方式, 在本发 明第一方面的第五种可能的实现方式中, 所述服务器发布包含所述访问控制 列表参数的下载链接, 包括:
所述服务器接收所述终端的下载链接获取请求;
所述服务器将所述下载链接发送给所述终端。
第二方面, 本发明提供了一种文件下载方法, 包括:
下载接入节点接收终端根据所述服务器发布的下载链接发起的下 载请求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的 访问控制列表参数, 所述下载请求中包含所述访问控制列表参数和所述 终端的下载参数;
所述下载接入节点根据所述访问控制列表参数和所述下载参数对 所述下载请求进行鉴权;
所述下载接入节点将鉴权结果发送给所述终端。
结合第二方面, 在本发明第二方面的第一种可能的实现方式中, 所述下 载接入节点根据所述访问控制列表参数和所述下载参数对所述下载请求进行 鉴权, 包括:
所述下载接入节点根据散列值校验原始下载链接、 所述访问控制列表参 数和第二密钥的完整性, 所述原始下载链接由所述服务器根据上传文件的文 件参数生成, 所述散列值由所述服务器对所述原始下载链接、 所述访问控制 列表参数和第二密钥进行散列运算生成;
当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表参数和 所述第二密钥中至少一个被修改时, 所述下载接入节点通知所述终端无法进 行下载;
当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表参数和 所述第二密钥中未被修改时, 所述下载接入节点根据与所述服务器约定的第 一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制列表; 所述下载接入节点通过所述访问控制列表和所述下载参数对所述下载请 求进行鉴权。
结合第二方面的第一种可能的实现方式, 在本发明第二方面的第二种可 能的实现方式中, 所述下载接入节点将鉴权结果发送给所述终端, 包括: 当所述下载参数未满足所述访问控制列表中所包含的下载权限时, 所述 下载接入节点通知所述终端无法进行上传文件的下载;
或者,
当所述下载参数满足所述访问控制列表中所包含的下载权限时, 所述下 载接入节点将所述原始下载链接所标识的上传文件发送给所述终端。
第三方面, 本发明还提供了一种应用于分布式存储系统的服务器, 包括: 接收单元, 用于获取设置的下载权限;
生成单元, 用于根据所述下载权限生成访问控制列表参数;
发送单元, 用于发布包含所述访问控制列表参数的下载链接, 以便于终 端获取所述下载链接并生成包含所述访问控制列表参数的下载请求。
结合第三方面, 在本发明第三方面的第一种可能的实现方式中, 所述接 收单元, 还用于获取上传文件的文件参数;
所述生成单元包括:
生成模块, 用于根据所述下载权限生成访问控制列表; 根据所述上传文 件的文件参数生成所述上传文件的原始下载链接;
加密模块, 用于根据与下载接入节点约定的第一密钥对所述访问控制列 表进行加密, 并形成访问控制列表参数; 对所述原始下载链接、 所述访问控 制列表参数和与所述下载接入节点约定的第二密钥进行散列运算, 生成散列 值, 所述散列值和所述原始下载链接包含于所述下载链接中。
结合本发明第三方面的第一种可能的实现方式, 在本发明第三方面的第 二种可能的实现方式中, 所述访问控制列表中包含至少一个控制项, 所述访 问控制列表参数中包括至少一个控制项参数, 其中一个控制项参数对应一个 控制项;
所述控制项在根据所述第一密钥进行可逆加密后形成所述控制项参数。 结合本发明第三方面的第一种可能的实现方式, 在本发明第三方面的第 三种可能的实现方式中, 所述服务器还包括协商单元;
所述协商单元, 用于当到达预定时间阔值时, 与所述下载接入节点协商 更新所述第一密钥和所述第二密钥。
结合本发明第三方面的第三种可能的实现方式, 在本发明第三方面的第 四种可能的实现方式中, 所述接收单元, 还用于获取上传文件时的用户信息; 所述协商单元, 还用于根据所述用户信息, 针对一个用户与所述下载接 入节点协商生成所述第一密钥和所述第二密钥中的至少一个。
结合本发明第三方面或上述第三方面的任一种可能的实现方式, 在本发 明第三方面的第四种可能的实现方式中, 所述接收单元, 还用于接收所述终 端的下载链接获取请求;
所述发送单元, 具体用于将所述下载链接发送给所述终端。
第四方面, 本发明公开了一种应用于分布式存储系统的下载接入节点, 包括:
接收单元, 用于接收终端根据所述服务器发布的下载链接发起的下载请 求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的访问控制 列表参数, 所述下载请求中包含所述访问控制列表参数和所述终端的下载参 数;
鉴权单元, 用于根据所述访问控制列表参数和所述下载参数对所述下载 请求进行鉴权; 发送单元, 用于将鉴权结果发送给所述终端。
结合本发明的第四方面, 在本发明第四方面的第一种可能的实现方式中, 所述鉴权单元包括解密模块和鉴权模块;
解密模块, 用于根据散列值校验原始下载链接、 所述访问控制列表参数 和第二密钥的完整性, 所述原始下载链接由所述服务器根据上传文件的文件 参数生成, 所述散列值由所述服务器对所述原始下载链接、 所述访问控制列 表参数和第二密钥进行散列运算生成; 根据与所述服务器约定的第一密钥对 所述访问控制列表参数进行解密, 并解析出所述访问控制列表;
所述发送单元, 还用于当根据所述第二密钥确定所述原始下载链接、 所 述访问控制列表参数和所述第二密钥中至少一个被修改时, 通知所述终端无 法进行下载; 当根据所述第二密钥确定所述原始下载链接、 所述访问控制列 表参数和所述第二密钥中未被修改时, 所述下载接入节点根据与所述服务器 约定的第一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制 列表;
所述鉴权单元还包括:
鉴权模块, 用于通过所述访问控制列表和所述下载参数对所述下载请求 进行鉴权。
结合第四方面的第一种可能的实现方式, 在本发明第四方面的第二种可 能的实现方式中, 所述发送单元, 还用于当所述下载参数未满足所述访问控 制列表中所包含的下载权限时, 通知所述终端无法进行所述上传文件的下载; 当所述下载参数满足所述访问控制列表中所包含的下载权限时, 将所述原始 下载链接所标识的上传文件发送给所述终端。
第五方面, 本发明还提供了一种分布式存储系统, 包括上述任一种的服 务器和上述任一种的下载接入节点。
第六方面, 本发明还提供了一种应用于分布式存储系统的服务器, 包括 接收器、 处理器和发送器; 所述接收器, 用于获取设置的下载权限;
所述处理器, 用于根据所述下载权限生成访问控制列表参数;
所述发送器, 用于发布包含所述访问控制列表参数的下载链接, 以便于 终端获取所述下载链接并生成包含所述访问控制列表参数的下载请求。
结合第六方面, 在本发明第六方面的第一种可能的实现方式中, 所述接 收器, 还用于获取上传文件的文件参数;
所述处理器, 具体用于根据所述下载权限生成访问控制列表; 根据所述 上传文件的文件参数生成所述文件的原始下载链接; 根据与所述下载接入节 点约定的第一密钥对所述访问控制列表进行加密, 并形成访问控制列表参数; 对所述原始下载链接、 所述访问控制列表参数和与所述下载接入节点约定的 第二密钥进行散列运算, 生成散列值, 所述散列值和所述原始下载链接包含 于所述下载链接中。
结合第六方面的第一种可能的实现方式, 在本发明第六方面的第二种可 能的实现方式中, 所述访问控制列表中包含至少一个控制项, 所述访问控制 列表参数中包括至少一个控制项参数, 其中一个控制项参数对应一个控制项; 所述控制项参数由所述控制项在根据所述第一密钥进行加密后形成。 结合第六方面的第一种可能的实现方式, 在本发明第六方面的第三种可 能的实现方式中, 所述处理器, 还用于当到达预定时间阔值时, 通过所述发 送器和所述接收器与所述下载接入节点协商更新所述第一密钥和所述第二密 钥。
结合第六方面的第三种可能的实现方式, 在本发明第六方面的第四种可 能的实现方式中, 所述接收器, 还用于获取上传文件时的用户信息;
所述处理器, 还用于根据所述用户信息, 通过所述发送器和所述接收器 针对一个用户与所述下载接入节点协商生成所述第一密钥和所述第二密钥中 的至少一个。
结合第六方面或第六方面的任一种可能的实现方式, 在本发明第六方面 的第五种可能的实现方式中, 所述接收器, 还用于接收所述终端的下载链接 获取请求;
所述发送器, 具体用于将所述下载链接发送给所述终端。
第七方面, 本发明还提供了一种应用于分布式存储系统的下载接入节点, 包括接收器、 处理器和发送器;
所述接收器, 用于接收终端根据所述服务器发布的下载链接发起的下载 请求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的访问控 制列表参数, 所述下载请求中包含所述访问控制列表参数和所述终端的下载 参数;
所述处理器, 用于根据所述访问控制列表参数和所述下载参数对所述下 载请求进行鉴权;
所述发送器, 用于将鉴权结果发送给所述终端。
结合本发明的第七方面, 在本发明第七方面的第一种可能的实现方式中, 所述处理器, 具体用于根据散列值校验原始下载链接、 所述访问控制列表参 数和第二密钥的完整性, 所述原始下载链接由所述服务器根据上传文件的文 件参数生成, 所述散列值由所述服务器对所述原始下载链接、 所述访问控制 列表参数和第二密钥进行散列运算生成; 根据与所述服务器约定的第一密钥 对所述访问控制列表参数进行解密, 并解析出所述访问控制列表;
所述发送器, 还用于当根据所述第二密钥确定所述原始下载链接、 所述 访问控制列表参数和所述第二密钥中至少一个被修改时, 通知所述终端无法 进行下载; 当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表 参数和所述第二密钥中未被修改时, 所述下载接入节点根据与所述服务器约 定的第一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制列 表;
所述处理器, 还用于通过所述访问控制列表和所述下载参数对所述下载 请求进行鉴权。 结合本发明第七方面第一种可能的实现方式, 在本发明第七方面第二种 可能的实现方式中, 所述发送器, 还用于当所述下载参数未满足所述访问控 制列表中所包含的下载权限时, 通知所述终端无法进行所述上传文件的下载; 或者, 当所述下载参数满足所述访问控制列表中所包含的下载权限时, 将所 述原始下载链接所标识的上传文件发送给所述终端。
本发明公开了一种文件下载方法、 服务器、 下载接入节点和分布式存储 系统, 服务器生成对下载权限进行限制的访问控制列表参数, 并随下载链接 公布所述访问权限控制列表参数, 当终端根据下载链接向下载接入节点发送 下载请求时, 将所获取的访问权限控制列表参数附加在下载请求中, 这样一 来, 下载接入节点便可以根据该下载请求中的访问控制列表参数和下载参数 对下载请求进行鉴权, 并将鉴权结果告知终端, 从而降低服务器的负载, 提 升鉴权速度和加快文件下载的响应速度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附 图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创 造性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明所述的分布式存储系统的结构示意图;
图 2为本发明所述的服务器的一种文件下载方法的流程图;
图 3为本发明所述的服务器的另一种文件下载方法的流程图;
图 4为本发明所述的服务器的另一种文件下载方法的流程图;
图 5为本发明所述的下载接入节点的一种文件下载方法的流程图; 图 6为本发明所述的下载接入节点的另一种文件下载方法的流程图; 图 7为本发明所述的实施例中所述的一种结构示意图;
图 8为本发明所述的实施例中所述的一种文件下载方法的流程图; 图 9为本发明所述的实施例中所述的另一种文件下载方法的流程图; 图 10为本发明所述的实施例中所述的另一种文件下载方法的流程图; 图 11为本发明所述的服务器的结构示意图;
图 12为本发明所述的下载接入节点的结构示意图;
图 13为本发明所述的服务器的示意图;
图 14为本发明所述的下载接入节点的示意图。
具体实施方式
下面结合附图对本发明实施例的文件下载方法、 服务器、 下载接入节点 和分布式存储系统进行详细描述。
应当明确, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的 实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明提供了一种文件下载方法, 应用于分布式存储系统中。 该分布式 存储系统 1 , 例如网盘、 云存储系统, 如图 1所示, 包括服务器 100、 下载接 入节点 200。 其中, 服务器 100通过广域网 400连接下载接入节点 200, 下载 接入节点 200连接终端 300。 需要说明的是,服务器 100通过广域网 400与分 布在距离用户的终端 300较近的下载接入节点 200连接;该下载接入节点 200 可以分别连接多台终端 300, 并分别接收并转发各个终端 300的报文等; 该下 载接入节点 200, 可以为自建的边缘节点, 也可以是所购买的 CDN。 通过边 缘节点和 CDN可以对数据报文进行接收和转发, 也可以提供文件的下载。 一 般来说, 在分布式存储系统 1 中, 还会包括用来存储文件的緩存服务器 (未 图示), 用户可以从该緩存服务器获取所需下载的文件, 该緩存服务器可以视 为与所述下载接入节点 200是相同的设备。 该下载接入节点 200的一般会设 置有很多, 并且配置于各地, 以便用户可以就近接入。 另外, 该终端 300可 以为平板电脑 300A、 个人电脑 300B和便携电脑 300C等, 在此不对终端 300 的类型进行限制。
当用户需要向分布式存储系统 1 中上传, 则首先需要通过终端 300上所 安装的客户端或通过浏览器对分布式存储系统 1 进行访问, 并将需要进行存 储、 共享的上传文件上传至分布式存储系统 1中。
终端与下载接入节点 200建立连接, 将文件上传至下载接入节点 200中。 该设备对用户所上传的文件进行存储, 并由服务器 100生成存储该文件的原 始下载链接, 该原始下载链接用于标识文件所在的位置。 在文件上传完成后, 用户可以针对允许下载该文件的范围进行设置, 即设置下载权限, 该下载权 限中包括请求源的黑白名单、 客户端的黑白名单、 IP段的黑白名单和允许下 载的有效期等, 但上面指出的只是可以作为下载权限的部分内容, 用户还可 以针对不同的需求设置其他类型的下载权限, 在此不做限制。
本发明提供的一种文件下载方法实施例, 以该方法应用于服务器 200为 例进行说明, 参见图 2所示, 该文件下载方法包括:
S100、 所述服务器获取设置的下载权限, 生成所述下载权限的访问 控制列表参数。
服务器 100根据用户的设置生成并存储下载权限的访问控制列表, 在该 访问控制列表中包含有上述下载权限中所设置的请求源的黑白名单、 客户端 的黑白名单、 IP段的黑白名单和允许下载的有效期等。
S110、 所述服务器发布包含所述访问控制列表参数的下载链接, 以 便于所述终端获取所述下载链接并生成包含所述访问控制列表参数的 下载请求, 以便于所述下载接入节点接收所发起的下载请求并根据所述 终端的下载参数和所述访问控制列表参数对所述下载请求进行鉴权并 将鉴权结果发送给所述终端。
在生成下载权限的访问控制列表后, 服务器 100会对访问控制列表进行 转码, 以形成访问控制列表参数。 服务器 100会将该访问控制列表参数附加 到下载链接中进行发布。 此处所说的发布可以是服务器 100将下载链接直接 发送到终端, 以在终端的浏览器页面上显示供用户在互联网上发布, 或者通 过终端上的客户端向服务器 100发送下载链接获取请求后, 服务器 100根据 该下载链接获取请求将下载链接发送给该终端。
在终端接收到的下载链接中包含有标识需要下载的文件的位置的原始下 载链接、 限制下载权限的访问控制列表参数以及其他信息, 例如还可以包含 后述的散列值。 根据该下载链接生成针对于文件的下载请求, 在该下载请求 中至少包含原始下载链接和访问控制列表参数, 也还可以包含后述的散列值。
在下载接入节点 200接收到终端的下载请求后, 会对该下载请求进行解 析, 从而获得其中的访问控制列表参数; 对该访问控制列表参数进行转码等 操作后, 获取包含下载权限的信息的访问控制列表, 从该下载请求获取终端 的下载参数, 该下载参数中包含有请求源信息、 客户端信息、 IP段和请求时 间等信息; 通过比对下载参数和访问控制列表中的信息, 从而确定该下载请 求是否满足所设置的下载权限。
可选的, 参见图 3 , 所述服务器发布包含所述访问控制列表参数的下载链 接, 包括:
S 111、 所述服务器接收所述终端的下载链接获取请求;
S112、 所述服务器将所述下载链接发送给所述终端。
当用户通过终端上的客户端进行上传和下载权限设置时, 用户无需将原 始下载链接或最终下载链接在互联网上进行公布, 而只需要对上传文件进行 上传并设置下载权限。 此时, 服务器 100会自动生成分布式存储系统 1 中的 下载项目。 当其他用户通过客户端选择该下载项目时,客户端会向服务器 100 发起下载链接获取请求, 以获取完成文件下载所需要的原始下载链接或原始 下载链接、 访问控制列表参数和散列值。
当其他用户通过客户端向服务器 100发起下载链接获取请求时, 根据不 同的方式会进行不同的处理。
当其他用户操作终端 300上所安装的客户端进行下载时, 服务器 100会 接收到该文件下载的下载链接获取请求, 则服务器 100根据该下载链接获取 请求向终端 300发送原始下载链接和访问控制列表参数。 此时, 在其他用户 请求文件下载时, 客户端会根据刚刚获取的原始下载链接和访问控制列表参 数进行下载请求。
此时,因为客户端可以根据 HTTP协议( HTTP-Hypertext transfer protocol, 超文本传送协议)进行 HTTP协议中的下载请求的定制, 即针对需要可以在 客户端中设置一项用于存储访问控制列表参数。 在进行下载请求时, 将获取 的访问控制列表参数加载到根据下载请求的 HTTP 头部, 并将其发送到下载 接入节点 200进行鉴权。
为了避免不满足下载权限的用户获知下载权限, 则需要对包含有下载权 限的访问控制列表进行加密。 该加密通过密钥来实现, 此处的密钥是由服务 器 100和下载接入节点 200约定形成的。 在该密钥形成后, 服务器 100和下 载接入节点 200会分别对密钥进行存储。 该密钥可以根据实际的情况进行设 置, 一种密钥用于进行可逆加密, 另一种密钥用于进行散列运算以获取散列 值。 在设置时, 可以选择其中的任意一种, 或分别通过两种密钥进行加密。
这里所说的密钥可以通过多种形式进行设置, 例如可以在分布式存储系 统 1建立的时候, 通过服务器 100和下载接入节点 200之间协商形成; 也可 以针对每一个使用分布式存储系统 1 的用户设置密钥, 即在用户登陆分布式 存储系统 1 的时候, 通过登陆时的用户信息进行标记, 从而形成针对一个用 户使用的密钥; 还可以针对每一个上传的文件形成一个密钥。 在密钥协商形 成后, 接入该下载接入节点 200对所有接入其的终端都通过此密钥进行鉴权 和许可下载。 在此, 在服务器 100和下载接入节点 200之间可以通过上述的 多种方式协商形成生成的密钥, 在此不做限制。
具体来说, 所述方法, 参见图 4, 在所述服务器获取设置的下载权限, 生成所述下载权限的访问控制列表参数之前, 还包括:
S 100A , 所述服务器获取所述上传文件的文件参数, 生成所述文件 的原始下载链接。
在分布式存储系统 1获取上传文件后, 会对上传文件进行存储, 并 同时存储该上传文件的文件参数, 该文件参数可以标识上传文件的位 置, 名称等信息。 在上传文件存储完毕后, 会根据上传文件的文件参数 生成标识该位置的原始下载链接。
所述服务器获取设置的下载权限, 生成所述下载权限的访问控制列 表参数, 包括:
S 101、 所述服务器获取设置的下载权限;
S 102、 所述服务器根据所述下载权限生成访问控制列表。
服务器 100在获取下载权限后, 根据下载权限生成一个访问控制列 表, 在该访问控制列表中直接标识出存在哪些下载权限。
5103、所述服务器根据与所述下载接入节点约定的第一密钥对所述 访问控制列表进行加密, 并形成访问控制列表参数。
在生成访问控制列表后, 服务器 100根据第一密钥对访问控制列表 进行可逆加密。 在进行可逆加密之前, 服务器 100会先对生产的访问控 制列表进行压缩,将访问控制列表转换成二进制的数据。在转换完成后, 根据服务器 100和下载接入节点 200之间约定的第一密钥对转换形成的 二进制的数据进行可逆加密。 此处的可逆加密指根据第一密钥对二进制 数据进行逻辑运算, 这样一来, 使不知道密钥的人无法解析出访问控制 列表。其中,在进行加密时所使用的逻辑运算可以根据现有的方式进行, 在此不再赘述。
在完成访问控制列表的加密后, 服务器 100对加密后的访问控制列 表转码, 从而形成适用于通信的访问控制列表参数。
5104、 所述服务器对所述原始下载链接、 所述访问控制列表参数和 与所述下载接入节点约定的第二密钥进行散列运算, 生成散列值。
所述散列值和所述原始下载链接包含于所述下载链接中。
在完成转码并生成访问控制列表参数之后, 基于约定的第二密钥根 据散列算法对原始下载链接中的 URI ( Uniform Resource Identifier, 通 用资源标识符)、 访问控制列表参数进行散列。 在散列之后, 会形成一 个散列值。 通过形成的散列值, 可以判断访问控制列表参数是否被恶意 修改。 此处的散列算法, 一般采用 MD5 ( Message Digest Algorithm 5 , 内容摘要算法) 和 SHA- 1 ( Secure Hash Algorithm 1 , 安全散列算法), 当然所采用的散列算法不仅限于上述两种, 也可以通过其他的散列算法 根据原始下载链接、 访问控制列表参数和第二密钥进行散列。
在这个过程中, 在进行散列时, 该散列的对象是原始下载链接的 URI、 访问控制列表参数和服务器 100与下载接入节点 200之间约定的 第二密钥。 该散列的对象中的 URI也可以换为其他, 比如 URL等。 因 为在进行散列时, 散列的对象是可以根据实际的需要进行设置的, 所以 散列的对象也不限于此。 但是需要说明的是, 因为在进行下载请求时, 域名可能出现变化, 也可能基于多种协议, 例如 http协议或 https协议, 这些的不同都会导致 URL的不同, 然而,上面的情况中, URL中的 URI 一般是不会改变的, 所以在进行散列运算时, 优选的还是将 URI、 访问 控制列表参数和第二密钥作为对象。
在完成生成散列值后, 服务器 100将原始下载链接、 访问控制列表参数 和散列值进行拼接, 从而形成最终下载链接。 当其他用户通过浏览器进行下 载时, 则可以对用户所发布的最终下载链接进行复制, 并粘贴到浏览器的地 址栏以访问分布式存储系统 1进行文件的下载。
可选的, 所述访问控制列表中包含至少一个控制项, 所述访问控制列表 参数中包括至少一个控制项参数, 其中一个控制项参数对应一个控制项; 所述控制项参数由所述控制项在根据所述第一密钥进行加密后形成。 在访问控制列表中包含至少一个控制项。 例如, 可以包括允许 /禁止下载 的请求源、 允许 /禁止下载的客户端、 允许 /禁止下载的 IP段和允许下载的有 效期中的至少一项, 当然, 除了上面所提供的控制项外, 还可以包括其他的 控制项, 控制项的种类和个数可以根据用户的实际需求进行增减。 在用户设置完成下载权限, 并以此生成了访问控制列表后, 服务器 100 可以对控制项进行逐条拆分, 形成了该访问控制列表所对应的各个控制项。
服务器 100针对每一个控制项进行可逆加密, 并通过转码生成至少一个 控制项参数。
在生成了至少一个控制项参数后, 通过规定方式进行拼接, 形成至少一 个控制项参数的字符串。 该规定方式可以为升序、 降序或其他约定好的方式, 在此不做限制。
通过预先将访问控制列表进行拆分, 可以省去用户未设置下载权限的项 目, 例如仅设置允许下载的有效期, 那么在传输过程中则无需包含其他的下 载权限所对应的控制项参数, 在进行鉴权时也可以进一步的提高鉴权的速度。
在完成各个控制项的可逆加密后, 服务器 100对原始下载链接、 至少一 个控制项参数和散列值进行拼接, 形成下载链接。
相对应的, 在步骤 S112中进行下载链接的发送时, 在定制的下载请求的 HTTP头部中,可以增加多个项,每一个项对应访问控制列表中的一个控制项。 在进行下载请求时, 将获取的加密后的至少一个控制项加载到根据下载请求 的 HTTP头部, 并将其发送到下载接入节点 200进行鉴权。
对于服务器 100和下载接入节点 200之间所协商生成的密钥, 如果长时 间使用相同的密钥, 则提高了该密钥被破解的可能性。 为了进一步提高密钥 的安全性, 所述方法, 还包括:
S105、 当到达预定时间阔值时, 所述服务器与所述下载接入节点协 商更新所述第一密钥和所述第二密钥。
通过设定预定时间阈值, 例如一天, 一个星期, 或者一个月, 并设置当 到达预定时间阔值时, 服务器 100和下载接入节点 200再一次地进行协商, 对密钥进行更新, 在更新时, 也可以设置只更新第一密钥和第二密钥中的一 个, 或全部进行更新。
本发明公开了一种分布式存储系统中的文件下载方法, 服务器生成对下 载权限进行限制的访问控制列表参数, 并随下载链接公布所述访问权限控制 列表参数, 当终端根据下载链接向下载接入节点发送下载请求时, 将所获取 的访问权限控制列表参数附加在下载请求中, 这样一来, 下载接入节点便可 以根据该下载请求中的访问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终端, 从而降低服务器的负载, 提升鉴权速度和加快文件 下载的响应速度。
另外, 因为在现有技术中, 在进行鉴权时, 需要进行下载接入节点和服 务器之间的进行通信以完成鉴权, 所以在通信的过程中则有可能出现下载接 入节点和服务器之间的网络不通而导致下载异常的情况。 这样一来, 通过本 发明上述方法, 直接通过下载接入节点进行鉴权, 则可以省去下载接入节点 和服务器之间的通信的过程, 从而避免网络不通的情况下出现的下载异常, 提高了分布式存储系统的可靠性。
并且, 通过上述方法进行鉴权时, 下载接入节点也无需将访问控制列表 参数进行緩存, 而是通过从下载请求中获取访问控制列表参数和下载请求中 的下载参数进行鉴权, 这样一来, 也节省了下载接入节点所消耗的内存资源。
与上面所描述的、 对应于服务器 100 的一种文件下载方法, 下面以下载 接入节点 200为例进行一种文件下载方法的描述, 所述分布式存储系统 1 , 参 见图 1 , 包括服务器 100和下载接入节点 200;
所述方法, 参见图 5 , 包括:
S200, 所述下载接入节点接收终端根据所述服务器发布的下载链接 发起的下载请求。
S210、 所述下载接入节点根据所述访问控制列表参数和所述下载参 数对所述下载请求进行鉴权。
所述下载链接中包含由所述服务器 100根据设置的下载权限生成的 访问控制列表参数, 所述下载请求中包含所述访问控制列表参数和所述 终端的下载参数。 在下载接入节点 200接收到该下载请求后, 对下载请求进行解码, 获取 下载请求中关于终端的下载参数和访问控制列表参数。 因为在下载请求中, 下载参数是根据 HTTP协议附加在其中的, 并没有基于密钥进行加密, 下载 接入节点 200可以直接获取下载参数。 该下载参数中还包含有终端的请求源、 所使用的客户端、 IP段和下载时间等信息, 因为该下载请求是根据 HTTP协 议生成的, 所以在下载请求中所包含的内容可以参考现有 HTTP协议中的下 载请求, 在此不再赘述。
在此, 需要说明的是, 在终端 300发送下载请求时, 可以通过浏览器进 行下载请求, 也可以通过在终端 300上预先安装的客户端进行。
在下载接入节点 200获取了下载参数和访问控制列表之后, 根据访问控 制列表中所记载的下载权限对下载参数进行鉴权。
S220, 所述下载接入节点将鉴权结果发送给所述终端。
在下载请求满足下载权限时, 则终端 300可以进行文件的下载, 在下载 请求不满足下载权限时, 例如出现了超出用户所设置的时限, 通过其他网站 发送下载请求或通过黑名单中的客户端进行下载等情况, 则无法进行文件下 载。
当终端的下载参数所设置的所有下载权限时,则会通过下载接入节点 200 对于终端的鉴权, 此时, 下载接入节点 200 可以根据下载请求中包含的上传 文件的原始下载链接获取存储于緩存服务器的上传文件, 并将该上传文件发 送给终端, 以完成文件下载的过程。
此时, 下载接入节点 200根据预先与服务器 100约定的密钥对下载请求 进行解密和完整性校验, 从而获取在下载请求中所包含的访问控制列表。
进一步的, 在服务器 100生成下载链接的过程中, 为了保证访问控制列 表参数的保密性, 还会对下载链接进行加密。 相对应的, 下载接入节点 200 也需要根据预先与服务器 100约定的密钥对下载请求进行解密和完整性校验, 从而获取在下载请求中所包含的访问控制列表。 在下载接入节点 200处, 进行完整性校验和进行解密的过程是可以互相 调换的。 但是优选地会先进行完整性校验的过程, 因为如果下载请求已经被 人恶意修改, 那么即使经过解密后获取的访问控制列表也无法继续使用。 这 样一来, 先进行完整性校验再进行解密则可以保证下载接入节点 200可以更 有效地进行下载请求的鉴权。
具体来说, 参见图 6, 所述下载接入节点根据所述访问控制列表参数 和所述下载参数对所述下载请求进行鉴权, 包括:
5211、 所述下载接入节点根据散列值校验原始下载链接、 所述访问 控制列表参数和第二密钥的完整性。
所述原始下载链接由所述服务器 100 根据上传文件的文件参数生 成, 该文件参数一般包含上传文件的位置、 名称、 时间等相关信息。 在 分布式存储系统中, 该在完成上传文件的上传后, 会直接生成。 所述散 列值由所述服务器 100对所述原始下载链接、 所述访问控制列表参数和 第二密钥进行散列运算生成。
在下载接入节点 200获取下载请求中的下载参数, 并对下载请求中进行 解析, 获取其中的原始下载链接、 访问控制列表参数和散列值, 其中, 散列 值是由服务器 100根据原始下载链接、 访问控制列表参数和第二密钥进行散 列运算后形成的, 该散列值用于判断访问控制列表参数是否被他人恶意修改。 在进行散列运算的过程中, 会使用散列算法, 一般采用 MD5和 SHA-1 , 当然 所采用的散列算法不仅限于上述两种, 也可以通过其他的散列算法对原始下 载链接、 访问控制列表参数和第二密钥进行散列运算。
因为散列值是对原始下载链接的 URI、 访问控制列表参数和第二密钥进 行散列运算后唯一地形成的值, 所以当有人对原始下载链接、 访问控制列表 参数和第二密钥中的任意一个进行改动时, 则无法通过完整性校验。
5212、 当根据所述第二密钥确定所述原始下载链接、 所述访问控制 列表参数和所述第二密钥中至少一个被修改时, 所述下载接入节点通知 所述终端无法进行下载。
下载接入节点 200根据已经获取的散列值, 对原始下载链接、 访问控制 列表参数和第二密钥进行校验后, 会得到一个校验结果。 当原始下载链接、 访问控制列表参数和第二密钥中的至少一个被修改时, 无法通过完整性校验。 那么, 在被篡改的情况下, 下载接入节点 200会告知终端无法完成下载过程。
5213、 当根据所述第二密钥确定所述原始下载链接、 所述访问控制 列表参数和所述第二密钥中未被修改时, 所述下载接入节点根据与所述 服务器约定的第一密钥对所述访问控制列表参数进行解密, 并解析出所 述访问控制列表。
当所述原始下载链接、 所述访问控制列表参数和所述第二密钥中未 被修改时, 则该下载请求便可以通过完整性校验。 此后, 下载接入节点 200 对访问控制列表参数进行解码, 从而获取根据第一密钥进行可逆加密后的访 问控制列表。
下载接入节点 200根据与服务器 100约定的第一密钥, 对可逆加密后的 访问控制列表进行解密, 即根据第一密钥的逻辑运算的逆运算, 此处的逻辑 运算应与服务器 100 的逻辑运算相对应。 逆运算后, 访问控制列表呈二进制 的数据, 此时, 还需要进行该二进制数据的解压, 这样一来, 便可以获取包 含下载权限的访问控制列表。
5214、 所述下载接入节点通过所述访问控制列表和所述下载参数对 所述下载请求进行鉴权。
鉴权过程与步骤 S210 中所描述的相类似, 根据访问控制列表中所 限定的下载权限对下载参数进行逐一对比, 以判断发送下载请求的终端 是否满足上传文件的下载权限。
根据鉴权过程, 下载接入节点 200会将鉴权结果发送给终端, 以告 知其是否可以进行上传文件的下载。 具体来说, 所述下载接入节点将鉴 权结果发送给所述终端, 包括: S221、 当所述下载参数未满足所述访问控制列表中所包含的下载权 限时, 所述下载接入节点通知所述终端无法进行上传文件的下载;
或者,
S222、 当所述下载参数满足所述访问控制列表中所包含的下载权限 时, 所述下载接入节点将所述原始下载链接所标识的上传文件发送给所 述终端。
当下载参数中有一项未满足访问控制列表中的下载权限时, 则终端无权 下载该上传文件。 此时, 下载接入节点 200会通知终端无法完成下载。
如果下载参数全部满足访问控制列表中的下载权限时, 则可知终端在允 许的下载权限之内, 可以完成下载。 此时, 下载接入节点 200可以根据原始 下载链接找到位于緩存服务器中的上传文件, 并将上传文件转发给终端, 使 终端完成下载过程。
另外, 访问控制列表参数, 包括至少一个控制项参数, 这样一来, 则需 要逐个控制项参数进行解密, 从而获取对应的控制项, 根据这些控制项便可 以获取访问控制列表。 因为, 通过预先将访问控制列表进行拆分, 可以省去 用户未设置下载权限的项目, 例如仅设置允许下载的有效期, 那么在传输过 程中则无需包含其他的下载权限所对应的控制项参数, 在进行鉴权时也可以 进一步的提高鉴权的速度。
需要说明的是, 所述散列值由所述服务器根据所述原始下载链接、 至少 一个控制项参数和第二密钥进行散列后形成。 在进行解码时, 下载接入节点 200针对每个控制项参数进行, 从而生成对应的至少一个加密后的控制项。 下 载接入节点 200根据所已经获取了的至少一个控制项, 整合生成访问控制列 表。
因为在下载请求中, 访问控制列表被拆分成了多个控制项进行可逆加密, 所以在进行解密时, 下载接入节点 200也是针对每一个加密后的控制项进行, 这样一来便可以获取访问控制列表中的至少一个控制项。 此时, 下载链接由原始下载链接、 至少一个控制项参数和散列值进行拼 接而成, 并且在对下载链接进行拆解的过程中, 需要逐个拆分出每一个控制 项参数, 以进行完整性校验、 解码、 解密等流程。
与服务器 100 中的流程相对应的, 为了进一步提高密钥的安全性, 下载 接入节点 200所执行的文件下载方法中, 还可以设定一个预定时间阔值, 例 如一天、 一个星期或一个月等, 并设置当到达预定时间阔值时, 使下载接入 节点 200与服务器 100再一次地进行协商, 对密钥进行更新, 该密钥包括第 一密钥和第二密钥中的至少一个。
当然, 对于密钥还可以通过以下几种方式协商形成。 密钥可以在分布式 存储系统 1建立的时候, 通过下载接入节点 200和服务器 100之间协商形成; 也可以针对每一个使用分布式存储系统 1 的用户设置密钥, 即在用户登陆分 布式存储系统 1 的时候, 通过登陆时的用户信息进行记录, 从而形成针对一 个用户使用的密钥; 还可以针对每一个上传文件形成一个密钥。 在此, 在下 载接入节点 200和服务器 100之间可以通过上述的多种方式协商形成生成的 密钥, 在此不做限制。
本发明公开了一种文件下载方法, 服务器生成对下载权限进行限制的访 问控制列表参数, 并随下载链接公布所述访问权限控制列表参数, 当终端根 据下载链接向下载接入节点发送下载请求时, 将所获取的访问权限控制列表 参数附加在下载请求中, 这样一来, 下载接入节点便可以根据该下载请求中 的访问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终 端, 从而降低服务器的负载, 提升鉴权速度和加快文件下载的响应速度。
为了本领域技术人员更好地理解本发明提供的文件下载方法的技术方 案, 下面通过具体的实施例对本发明提供的文件下载方法进行详细说明。
在本发明实施例中, 分布式存储系统 2, 如图 7 所示, 包括中心服务器 110和接入节点 210; 用户通过第一终端 31 OA上的浏览器访问中心服务器进 行上传文件的上传、 设置下载权限, 其他用户通过第二终端 310B进行下载。 本实施例中, 文件下载方法, 如图 8所示, 包括:
510、 中心服务器和接入节点协商生成第一密钥和第二密钥。
在分布式存储系统 2建立时, 中心服务器 110和接入节点 210之间协商 生成用于加密和解密的第一密钥和第二密钥。
511、 第一终端上传用户需要进行共享的上传文件至中心服务器, 中心服 务器对上传文件进行存储并生成原始下载链接。
用户在浏览器的页面中选择需要上传的上传文件, 被选中的上传文件上 传至接入节点 210进行存储, 并生成文件参数, 根据上传文件的文件参数生 成原始下载链接。
512、 用户设置上传文件的下载权限, 中心服务器根据下载权限生成访问 控制列表。
用户通过终端 310A进行下载权限的设置, 即设置请求源的黑 /白名单、 允许下载的客户端的黑 /白名单、 IP段的黑 /白名单和允许下载的有效期。 中心 服务器 110获取该下载权限, 并根据下载权限生成并存储访问控制列表。
513、 中心服务器对访问控制列表进行压缩。
中心服务器 110在生成访问控制列表之后, 对该访问控制列表进行压缩, 生成二进制的字符串。
514、 中心服务器根据第一密钥对压缩后的访问控制列表进行可逆加密。 中心服务器 110根据第一密钥与压缩后的访问控制列表而生成的二进制 字符串进行逻辑运算, 形成加密后的访问控制列表。
515、 中心服务器对加密后的访问控制列表进行转码, 生成访问控制列表 参数。
中心服务器 110将加密后的访问控制列表转换成适用于通信的访问控制 歹1)表参数。
516、 中心服务器根据原始下载链接、 访问控制列表参数和第二密钥进行 散列运算, 获取散列值。 中心服务器 110根据 SHA-1算法对原始下载链接的 URI、 访问控制列表 参数和第二密钥进行散列运算, 获得散列值。
517、中心服务器将原始下载链接、访问控制列表参数和散列值进行拼接, 形成下载链接, 并在第一终端上显示。
中心服务器 110将生成的原始下载链接、 访问控制列表参数和散列值进 行拼接, 形成下载链接, 并将该下载链接发送给第一终端 310A进行显示。
518、 用户复制下载链接, 并在互联网上进行发布。
用户将终端 310A上所显示的下载链接复制下来,并根据自己的喜好在互 联网上发布该下载链接。
519、 其他用户的第二终端根据下载链接形成下载请求。
其他用户根据其使用的第二终端 310B 对互联网上发布的下载链接进行 复制, 并在浏览器的地址栏中粘贴并访问该下载链接, 以进行下载请求。
520、 第二终端将该下载请求发送至接入节点。
521、 接入节点从下载请求中获取下载参数、 原始下载链接、 访问控制列 表的访问控制列表参数和散列值。
第二终端 310B将下载请求发送至接入节点 210, 接入节点 210从下载请 求中获取下载参数、 原始下载链接、 访问控制列表参数和散列值。
该下载参数包括下载请求的请求源、 IP段和请求时间等信息。
522、 接入节点根据散列值判断原始下载链接、 访问控制列表参数和第二 密钥拼接形成的下载链接是否满足完整性校验。
通过完整性校验, 可以使接入节点确定是否有人对下载链接进行了恶意 修改。
如果未满足完整性校验则向终端 310B返回错误代码,提示其无法访问或 无法完成下载。
如果满足完整性校验, 则进行步骤 S23。
523、 接入节点对访问控制列表参数进行解码, 生成加密后的访问控制列 表。
S24、接入节点根据第一密钥对加密后的访问控制列表进行解密并整合生 成访问控制列表。
完成完整性校验后, 接入节点 210根据第一密钥进行加密后的访问控制 列表的逆运算, 生成包含有用户设置的下载权限的访问控制列表。
S25、接入节点根据访问控制列表中所包含的下载权限和下载请求中的下 载参数判断下载请求是否满足下载文件的条件。
接入节点 210对下载权限和下载参数进行比较, 当下载参数里的请求源、 IP段和下载时间任意一项不符合用户在下载权限中的设置时, 则丟弃该下载 请求, 并向终端 310B返回鉴权未通过的信息, 无法进行下载。
当所有下载参数都满足下载权限时, 则进行步骤 S26。
S26、 接入节点向中心服务器请求文件, 中心服务器通过接入节点将上传 文件发送给其他用户所使用的第二终端。
通过上述过程便可以完成了上传文件的共享和下载。 在本实施例中, 通 过中心服务器和接入节点设置第一密钥进行加密, 通过第二密钥进行完整性 校验, 这样一来, 鉴权的工作便可以在接入节点 200处完成, 而无需通过中 心服务器进行下载请求的鉴权, 提高了鉴权速度和下载文件时的速度。
可选择的, 中心服务器 110对原始下载链接、 访问控制列表参数和散列 值进行发布时, 则可以通过, 即无需执行步骤 S17、 步骤 S18和步骤 S19, 而 是在步骤 S16之后, 如图 9所示, 还包括:
S271、 中心服务器对原始下载链接、 访问控制列表参数和散列值进行緩 存并生成与文件相关的下载项目。
中心服务器 110在分布式存储系统 2所对应的网页上生成一个关于用户 上传的文件的下载项目, 并且建立下载项目与原始下载链接、 访问控制列表 参数和散列值之间的关联。
当其他用户根据这一页面选择该下载项目时,通过终端 310B上的客户端 向中心服务器发送下载链接获取请求。
S272、 中心服务器接收其他用户的第二终端发送的下载链接获取请求, 将存储的原始下载链接、 访问控制列表参数和散列值发送给其他用户终端。
对于接入节点 210而言, 因为第二终端 310B分别接收到原始下载链接、 访问控制列表参数和散列值, 那么就无需用户在互联网上发布下载链接。 另 外, 通过客户端进行文件下载时, 访问控制列表参数和散列值都会设置在 HTTP协议的下载请求的头部,这个下载请求的头部可以根据需要认为的进行 定制, 那么其中就在访问控制列表中便可以增加更多的控制项, 从而使下载 权限的设置更加多样化。
在本发明实施例中, 访问控制列表中包含有至少一个控制项。 另一种分 布式存储系统 2, 参见图 10, 包括:
510、 中心服务器和接入节点协商生成第一密钥和第二密钥。
在分布式存储系统 2建立时, 中心服务器 110和接入节点 210之间协商 生成用于加密和解密的第一密钥和第二密钥。
511、 第一终端上传用户需要进行共享的上传文件至中心服务器, 中心服 务器对上传文件进行存储并生成原始下载链接。
用户在浏览器的页面中选择需要上传的上传文件, 被选中的上传文件上 传至接入节点 210进行存储, 并生成文件参数, 根据上传文件的文件参数生 成原始下载链接。
512、 用户设置上传文件的下载权限, 中心服务器根据下载权限生成访问 控制列表。
用户通过终端 310A进行下载权限的设置, 即设置请求源的黑 /白名单、 允许下载的客户端的黑 /白名单、 IP段的黑 /白名单和允许下载的有效期。 中心 服务器 110获取该下载权限, 并根据下载权限生成并存储访问控制列表。
S12a、 中心服务器逐项拆分访问控制列表, 形成至少一个控制项, 其中 一个控制项对应一种下载权限, 例如一个控制项为请求源的黑 /白名单, 那么 对应的便是用户所设置的关于请求源的下载权限。
相对应的中心服务器 110所执行的步骤 S13-S17中, 分别具体为: S 13a、 中心服务器对至少一个控制项进行压缩。
S 14a、 中心服务器根据第一密钥对压缩后的至少一个控制项进行可逆加 密。
S 15a、 中心服务器对至少一个加密后的控制项进行转码, 生成至少一个 控制项参数。
S 16a、 中心服务器根据原始下载链接、 至少一个控制项参数和第二密钥 进行散列运算, 获取散列值。
S 17a、 中心服务器将原始下载链接、 至少一个控制项参数和散列值进行 拼接, 形成下载链接, 并在第一终端上显示。
518、 用户复制下载链接, 并在互联网上进行发布。
用户将终端 310A上所显示的下载链接复制下来,并根据自己的喜好在互 联网上发布该下载链接。
519、 其他用户的第二终端根据下载链接形成下载请求。
其他用户根据其使用的第二终端 310B 对互联网上发布的下载链接进行 复制, 并在浏览器的地址栏中粘贴并访问该下载链接, 以进行下载请求。
520、 第二终端将该下载请求发送至接入节点。
对应于接入节点 210所执行的步骤 S22-S25 , 具体为:
S21a、 接入节点从下载请求中获取下载参数、 原始下载链接、 访问控制 列表的至少一个控制项参数和散列值。
S22a、 接入节点根据散列值判断原始下载链接、 至少一个控制项参数和 第二密钥拼接形成的下载链接是否满足完整性校验。
如果未满足完整性校验则向终端 310B返回错误代码,提示其无法访问或 无法完成下载。
如果满足完整性校验, 则进行步骤 S24a。 S23a、 接入节点对至少一个控制项参数进行解码, 生成至少一个加密后 的控制项。
S24a、 接入节点根据第一密钥对至少一个加密后的控制项进行解密生成 至少一个控制项并进行整合生成访问控制列表。
完成完整性校验后, 接入节点 210根据第一密钥进行至少一个加密后的 控制项的逆运算, 生成至少一个控制项, 并对至少一个控制项进行整合, 形 成包含有用户设置的下载权限的访问控制列表。
通过上述方式, 可以省去用户未设置下载权限的项目, 例如仅设置允许 下载的有效期, 那么在传输过程中则无需包含其他的下载权限所对应的控制 项参数, 在进行鉴权时也可以进一步的提高鉴权的速度。
在本实施例中, 可选择的, 中心月良务器 110 可以不对原始下载链接、 至 少一个控制项参数和散列值进行拼接和公布,即无需执行步骤 S17a、步骤 S18 和步骤 S19, 而是在步骤 S16a之后, 如图 11所示, 还包括:
S271a、 中心服务器对原始下载链接、 至少一个控制项参数和散列值进行 緩存并生成与文件相关的下载项目。
S272b、 中心服务器接收终端发送的下载链接获取请求, 将存储的原始下 载链接、 至少一个控制项参数和散列值发送给其他用户的第二终端。
S25、接入节点根据访问控制列表中所包含的下载权限和下载请求中的下 载参数判断下载请求是否满足下载文件的条件。
接入节点 210对下载权限和下载参数进行比较, 当下载参数里的请求源、 IP段和下载时间任意一项不符合用户在下载权限中的设置时, 则丟弃该下载 请求, 并向终端 310B返回鉴权未通过的信息, 无法进行下载。
当所有下载参数都满足下载权限时, 则进行步骤 S26。
S26、 接入节点将上传文件发送给其他用户所使用的第二终端。
通过上述过程便可以完成了上传文件的共享和下载。 在本实施例中, 通 过中心服务器和接入节点设置第一密钥进行加密, 通过第二密钥进行完整性 校验, 这样一来, 鉴权的工作便可以在接入节点 200处完成, 而无需通过中 心服务器进行下载请求的鉴权, 提高了鉴权速度和下载文件时的速度。
通过预先将访问控制列表进行拆分, 可以省去用户未设置下载权限的项 目, 例如仅设置允许下载的有效期, 那么在传输过程中则无需包含其他的下 载权限所对应的控制项参数, 在进行鉴权时也可以进一步的提高鉴权的速度。
在上述实施例中, 其中的第一密钥和第二密钥在生成后, 还可以设置预 定时间阔值。 当分布式存储系统中的计时到达该预设时间阔值的情况下, 则 通过中心服务器和接入节点或 CDN之间进行再一次的协商,从而更新第一密 钥和第二密钥。
另外, 还可以根据用户的不同, 针对每一个用户协商生成不同的第一密 钥和第二密钥。
与上述一种文件下载方法相对应, 本发明还公开了一种中心服务器和一 种下载接入节点。
一种应用于分布式存储系统的服务器 500, 参见图 11 , 包括: 接收单元 510, 用于获取设置的下载权限;
生成单元 520, 用于根据所述下载权限生成访问控制列表参数;
发送单元 530, 用于发布包含所述访问控制列表参数的下载链接, 以便于 终端获取所述下载链接并生成包含所述访问控制列表参数的下载请求。
可选的, 所述接收单元 510, 还用于获取上传文件的文件参数;
所述生成单元 520包括:
生成模块 521 , 用于根据下载权限生成访问控制列表; 根据所述上传文件 的文件参数生成所述上传文件的原始下载链接;
加密模块 522,用于根据与所述下载接入节点约定的第一密钥对所述访问 控制列表进行加密, 并形成访问控制列表参数; 对所述原始下载链接、 所述 访问控制列表参数和与所述下载接入节点约定的第二密钥进行散列运算, 生 成散列值, 所述散列值和所述原始下载链接包含于所述下载链接中。 可选的, 所述访问控制列表中包含至少一个控制项, 所述访问控制列表 参数中包括至少一个控制项参数, 其中一个控制项参数对应一个控制项; 所述控制项在根据所述第一密钥进行可逆加密后形成所述控制项参数。 可选的, 所述服务器 500还包括协商单元 540;
所述协商单元 540, 用于当到达预定时间阔值时, 与所述下载接入节点协 商更新所述第一密钥和所述第二密钥。
可选的, 所述接收单元 510, 还用于获取上传文件时的用户信息; 所述协商单元 540,还用于根据所述用户信息,针对一个用户与所述下载 接入节点协商生成所述第一密钥和所述第二密钥中的至少一个。
可选的, 所述接收单元 510, 还用于接收所述终端的下载链接获取请求; 所述发送单元 530, 具体用于将所述下载链接发送给所述终端。
本发明公开了一种服务器, 该服务器生成对下载权限进行限制的访问控 制列表参数, 并随下载链接公布所述访问权限控制列表参数, 当终端根据下 载链接向下载接入节点发送下载请求时, 将所获取的访问权限控制列表参数 附加在下载请求中, 这样一来, 下载接入节点便可以根据该下载请求中的访 问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终端, 从而降低服务器的负载, 提升鉴权速度和加快文件下载的响应速度。
相对应的, 本发明还公开了一种应用于分布式存储系统的下载接入节点, 所述分布式存储系统还包括服务器;
所述下载接入节点 600, 参见图 11 , 包括:
接收单元 610,用于接收终端根据所述服务器发布的下载链接发起的下载 请求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的访问控 制列表参数, 所述下载请求中包含所述访问控制列表参数和所述终端的下载 参数;
鉴权单元 620,用于根据所述访问控制列表参数和所述下载参数对所述下 载请求进行鉴权; 发送单元 630, 用于将鉴权结果发送给所述终端。
可选的, 所述鉴权单元 620包括解密模块 621和鉴权模块 622:
所述解密模块 621 , 用于根据散列值校验原始下载链接、 所述访问控制列 表参数和第二密钥的完整性, 所述原始下载链接由所述服务器根据上传文件 的文件参数生成, 所述散列值由所述服务器对所述原始下载链接、 所述访问 控制列表参数和第二密钥进行散列运算生成; 根据与所述服务器约定的第一 密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制列表;
所述发送单元 630, 还用于当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表参数和所述第二密钥中至少一个被修改时, 通知所述终端 无法进行下载; 当根据所述第二密钥确定所述原始下载链接、 所述访问控制 列表参数和所述第二密钥中未被修改时, 所述下载接入节点根据与所述服务 器约定的第一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控 制列表;
所述鉴权模块 622,用于通过所述访问控制列表和所述下载参数对所述下 载请求进行鉴权。
可选的, 所述发送单元 630,还用于当所述下载参数未满足所述访问控制 列表中所包含的下载权限时, 通知所述终端无法进行所述上传文件的下载; 当所述下载参数满足所述访问控制列表中所包含的下载权限时, 将所述原始 下载链接所标识的上传文件发送给所述终端。
本发明公开了一种下载接入节点, 服务器生成对下载权限进行限制的访 问控制列表参数, 并随下载链接公布所述访问权限控制列表参数, 当终端根 据下载链接向下载接入节点发送下载请求时, 将所获取的访问权限控制列表 参数附加在下载请求中, 这样一来, 下载接入节点便可以根据该下载请求中 的访问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终 端, 从而降低服务器的负载, 提升鉴权速度和加快文件下载的响应速度。
本发明还公开了一种分布式存储系统, 包括上述的服务器 500 和上 述的下载接入节点 600。
本发明公开了一种服务器, 该服务器生成对下载权限进行限制的访问控 制列表参数, 并随下载链接公布所述访问权限控制列表参数, 当终端根据下 载链接向下载接入节点发送下载请求时, 将所获取的访问权限控制列表参数 附加在下载请求中, 这样一来, 下载接入节点便可以根据该下载请求中的访 问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终端, 从而降低服务器的负载, 提升鉴权速度和加快文件下载的响应速度。
一种应用于分布式存储系统的服务器, 参见图 12 , 包括接收器、 处理器 和发送器;
所述接收器, 用于获取设置的下载权限;
所述处理器, 用于根据所述下载权限生成访问控制列表参数;
所述发送器, 用于发布包含所述访问控制列表参数的下载链接, 以便于 终端获取所述下载链接并生成包含所述访问控制列表参数的下载请求。
可选的, 所述接收器, 还用于获取上传文件的文件参数;
所述处理器, 具体用于根据所述下载权限生成访问控制列表; 根据所述 上传文件的文件参数生成所述文件的原始下载链接; 根据与所述下载接入节 点约定的第一密钥对所述访问控制列表进行加密, 并形成访问控制列表参数; 对所述原始下载链接、 所述访问控制列表参数和与所述下载接入节点约定的 第二密钥进行散列运算, 生成散列值, 所述散列值和所述原始下载链接包含 于所述下载链接中。
可选的, 所述访问控制列表中包含至少一个控制项, 所述访问控制列表 参数中包括至少一个控制项参数, 其中一个控制项参数对应一个控制项; 所述控制项参数由所述控制项在根据所述第一密钥进行加密后形成。 可选的, 所述处理器, 还用于当到达预定时间阔值时, 通过所述发送器 和所述接收器与所述下载接入节点协商更新所述第一密钥和所述第二密钥。
可选的, 所述接收器, 还用于获取上传文件时的用户信息; 所述处理器, 还用于根据所述用户信息, 通过所述发送器和所述接收器 针对一个用户与所述下载接入节点协商生成所述第一密钥和所述第二密钥中 的至少一个。
可选的, 所述接收器, 还用于接收所述终端的下载链接获取请求; 所述发送器, 具体用于将所述下载链接发送给所述终端。
本发明公开了一种服务器, 该服务器生成对下载权限进行限制的访问控 制列表参数, 并随下载链接公布所述访问权限控制列表参数, 当终端根据下 载链接向下载接入节点发送下载请求时, 将所获取的访问权限控制列表参数 附加在下载请求中, 这样一来, 下载接入节点便可以根据该下载请求中的访 问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终端, 从而降低服务器的负载, 提升鉴权速度和加快文件下载的响应速度。
本发明还公开一种应用于分布式存储系统的下载接入节点, 参见图 13 , 包括接收器、 处理器和发送器;
所述接收器, 用于接收终端根据所述服务器发布的下载链接发起的下载 请求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的访问控 制列表参数, 所述下载请求中包含所述访问控制列表参数和所述终端的下载 参数;
所述处理器, 用于根据所述访问控制列表参数和所述下载参数对所述下 载请求进行鉴权;
所述发送器, 用于将鉴权结果发送给所述终端。
可选的, 所述处理器, 具体用于根据散列值校验原始下载链接、 所述访 问控制列表参数和第二密钥的完整性, 所述原始下载链接由所述服务器根据 上传文件的文件参数生成, 所述散列值由所述服务器对所述原始下载链接、 所述访问控制列表参数和第二密钥进行散列运算生成; 根据与所述服务器约 定的第一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制列 表; 所述发送器, 还用于当根据所述第二密钥确定所述原始下载链接、 所述 访问控制列表参数和所述第二密钥中至少一个被修改时, 通知所述终端无法 进行下载; 当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表 参数和所述第二密钥中未被修改时, 所述下载接入节点根据与所述服务器约 定的第一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制列 表;
所述处理器, 还用于通过所述访问控制列表和所述下载参数对所述下载 请求进行鉴权。
可选的, 所述发送器, 还用于当所述下载参数未满足所述访问控制列表 中所包含的下载权限时, 通知所述终端无法进行所述上传文件的下载; 或者, 当所述下载参数满足所述访问控制列表中所包含的下载权限时, 将所述原始 下载链接所标识的上传文件发送给所述终端。
本发明公开了一种下载接入节点, 服务器生成对下载权限进行限制的访 问控制列表参数, 并随下载链接公布所述访问权限控制列表参数, 当终端根 据下载链接向下载接入节点发送下载请求时, 将所获取的访问权限控制列表 参数附加在下载请求中, 这样一来, 下载接入节点便可以根据该下载请求中 的访问控制列表参数和下载参数对下载请求进行鉴权, 并将鉴权结果告知终 端, 从而降低服务器的负载, 提升鉴权速度和加快文件下载的响应速度。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间 的耦合或直接耦合或通信连接可以是通过一些通信接口, 装置或单元的间接 耦合或通信连接, 可以是电性, 机械或其它的形式。 为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或 者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中 , 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在一个单 元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用 时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的 技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可 以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者 网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前述的 存储介质包括: U盘、 移动硬盘、 只读存储器(ROM, Read-Only Memory )、 随机存取存储器(RAM, Random Access Memory ),磁碟或者光盘等各种可以 存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权利 要求 书
1、 一种文件下载方法, 其特征在于, 包括:
服务器获取设置的下载权限, 生成所述下载权限的访问控制列表 参数;
所述服务器发布包含所述访问控制列表参数的下载链接, 以便于 所述终端获取所述下载链接并生成包含所述访问控制列表参数的下载 请求。
2、 根据权利要求 1所述的方法, 其特征在于, 在所述服务器获取 设置的下载权限, 生成所述下载权限的访问控制列表参数之前, 还包 括:
所述服务器获取上传文件的文件参数, 生成所述上传文件的原始 下载链接;
所述服务器获取设置的下载权限, 生成所述下载权限的访问控制 列表参数, 包括:
所述服务器获取设置的下载权限;
所述服务器根据所述下载权限生成访问控制列表;
所述服务器根据与下载接入节点约定的第一密钥对所述访问控制 列表进行加密, 并形成访问控制列表参数;
所述服务器对所述原始下载链接、 所述访问控制列表参数和与所 述下载接入节点约定的第二密钥进行散列运算, 生成散列值, 所述散 列值和所述原始下载链接包含于所述下载链接中。
3、 根据权利要求 2所述的方法, 其特征在于, 所述访问控制列表 中包含至少一个控制项, 所述访问控制列表参数中包括至少一个控制 项参数, 其中一个控制项参数对应一个控制项;
所述控制项参数由所述控制项在根据所述第一密钥进行加密后形 成。
4、 根据权利要求 2所述的方法, 其特征在于, 还包括:
当到达预定时间阔值时, 所述服务器与所述下载接入节点协商更 新所述第一密钥和所述第二密钥。
5、 根据权利要求 2所述的方法, 其特征在于, 在所述服务器获取 上传文件的文件参数, 生成所述上传文件的原始下载链接之前, 还包 括:
所述服务器获取上传文件时的用户信息;
所述服务器根据所述用户信息, 针对一个用户与所述下载接入节 点协商生成所述第一密钥和所述第二密钥中的至少一个。
6、 根据权利要求 1 -5任一所述的方法, 其特征在于, 所述服务器 发布包含所述访问控制列表参数的下载链接, 包括:
所述服务器接收所述终端的下载链接获取请求;
所述服务器将所述下载链接发送给所述终端。
7、 一种文件下载方法, 其特征在于,
下载接入节点接收终端根据服务器发布的下载链接发起的下载请 求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的访 问控制列表参数, 所述下载请求中包含所述访问控制列表参数和所述 终端的下载参数;
所述下载接入节点根据所述访问控制列表参数和所述下载参数对 所述下载请求进行鉴权;
所述下载接入节点将鉴权结果发送给所述终端。
8、 根据权利要求 7所述的方法, 其特征在于, 所述下载接入节点 根据所述访问控制列表参数和所述下载参数对所述下载请求进行鉴 权, 包括:
所述下载接入节点根据散列值校验原始下载链接、 所述访问控制 列表参数和第二密钥的完整性, 所述原始下载链接由所述服务器根据 上传文件的文件参数生成, 所述散列值由所述服务器对所述原始下载 链接、 所述访问控制列表参数和第二密钥进行散列运算生成;
当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表 参数和所述第二密钥中至少一个被修改时, 所述下载接入节点通知所 述终端无法进行下载;
当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表 参数和所述第二密钥中未被修改时, 所述下载接入节点根据与所述服 务器约定的第一密钥对所述访问控制列表参数进行解密, 并解析出所 述访问控制列表;
所述下载接入节点通过所述访问控制列表和所述下载参数对所述 下载请求进行鉴权。
9、 根据权利要求 8所述的方法, 其特征在于, 所述下载接入节点 将鉴权结果发送给所述终端, 包括:
当所述下载参数未满足所述访问控制列表中所包含的下载权限 时, 所述下载接入节点通知所述终端无法进行上传文件的下载;
或者,
当所述下载参数满足所述访问控制列表中所包含的下载权限时, 所述下载接入节点将所述原始下载链接所标识的上传文件发送给所述 终端。
10、 一种应用于分布式存储系统的服务器, 其特征在于, 包括: 接收单元, 用于获取设置的下载权限;
生成单元, 用于根据所述下载权限生成访问控制列表参数; 发送单元, 用于发布包含所述访问控制列表参数的下载链接, 以 便于终端获取所述下载链接并生成包含所述访问控制列表参数的下载 请求。
11、 根据权利要求 10所述的服务器, 其特征在于, 所述接收单元, 还用于获取上传文件的文件参数;
所述生成单元包括:
生成模块, 用于根据所述下载权限生成访问控制列表; 根据所述 上传文件的文件参数生成所述上传文件的原始下载链接;
加密模块, 用于根据与下载接入节点约定的第一密钥对所述访问 控制列表进行加密, 并形成访问控制列表参数; 对所述原始下载链接、 所述访问控制列表参数和与所述下载接入节点约定的第二密钥进行散 列运算, 生成散列值, 所述散列值和所述原始下载链接包含于所述下 载链接中。
12、 根据权利要求 11所述的服务器, 其特征在于, 所述访问控制 列表中包含至少一个控制项, 所述访问控制列表参数中包括至少一个 控制项参数, 其中一个控制项参数对应一个控制项;
所述控制项在根据所述第一密钥进行可逆加密后形成所述控制项 参数。
13、 根据权利要求 11所述的服务器, 其特征在于, 还包括协商单 元;
所述协商单元, 用于当到达预定时间阔值时, 与所述下载接入节 点协商更新所述第一密钥和所述第二密钥。
14、 根据权利要求 13所述的服务器, 其特征在于, 所述接收单元, 还用于获取上传文件时的用户信息;
所述协商单元, 还用于根据所述用户信息, 针对一个用户与所述 下载接入节点协商生成所述第一密钥和所述第二密钥中的至少一个。
15、 根据权利要求 10- 14任一所述的服务器, 其特征在于, 所述接收单元, 还用于接收所述终端的下载链接获取请求; 所述发送单元, 具体用于将所述下载链接发送给所述终端。
16、 一种应用于分布式存储系统的下载接入节点, 其特征在于, 包括:
接收单元, 用于接收终端根据服务器发布的下载链接发起的下载 请求, 所述下载链接中包含由所述服务器根据设置的下载权限生成的 访问控制列表参数, 所述下载请求中包含所述访问控制列表参数和所 述终端的下载参数;
鉴权单元, 用于根据所述访问控制列表参数和所述下载参数对所 述下载请求进行鉴权;
发送单元, 用于将鉴权结果发送给所述终端。
17、 根据权利要求 16所述的下载接入节点, 其特征在于, 所述鉴 权单元包括解密模块和鉴权模块;
所述解密模块, 用于根据散列值校验原始下载链接、 所述访问控 制列表参数和第二密钥的完整性, 所述原始下载链接由所述服务器根 据上传文件的文件参数生成, 所述散列值由所述服务器对所述原始下 载链接、 所述访问控制列表参数和第二密钥进行散列运算生成; 根据 与所述服务器约定的第一密钥对所述访问控制列表参数进行解密, 并 解析出所述访问控制列表;
所述发送单元, 还用于当根据所述第二密钥确定所述原始下载链 接、 所述访问控制列表参数和所述第二密钥中至少一个被修改时, 通 知所述终端无法进行下载; 当根据所述第二密钥确定所述原始下载链 接、 所述访问控制列表参数和所述第二密钥中未被修改时, 所述下载 接入节点根据与所述服务器约定的第一密钥对所述访问控制列表参数 进行解密, 并解析出所述访问控制列表;
所述鉴权模块, 用于通过所述访问控制列表和所述下载参数对所 述下载请求进行鉴权。
18、 根据权利要求 17所述的下载接入节点, 其特征在于, 所述发送单元, 还用于当所述下载参数未满足所述访问控制列表 中所包含的下载权限时, 通知所述终端无法进行所述上传文件的下载; 或者, 当所述下载参数满足所述访问控制列表中所包含的下载权限时, 将所述原始下载链接所标识的上传文件发送给所述终端。
19、 一种分布式存储系统, 其特征在于, 包括权利要求 10- 15所述 的服务器和权利要求 16- 18所述的下载接入节点。
20、 一种应用于分布式存储系统的服务器, 其特征在于, 包括接 收器、 处理器和发送器;
所述接收器, 用于获取设置的下载权限;
所述处理器, 用于根据所述下载权限生成访问控制列表参数; 所述发送器, 用于发布包含所述访问控制列表参数的下载链接, 以便于终端获取所述下载链接并生成包含所述访问控制列表参数的下 载请求。
21、 根据权利要求 20所述的服务器, 其特征在于,
所述接收器, 还用于获取上传文件的文件参数;
所述处理器, 具体用于根据所述下载权限生成访问控制列表; 根 据所述上传文件的文件参数生成所述文件的原始下载链接; 根据与所 述下载接入节点约定的第一密钥对所述访问控制列表进行加密, 并形 成访问控制列表参数; 对所述原始下载链接、 所述访问控制列表参数 和与所述下载接入节点约定的第二密钥进行散列运算, 生成散列值, 所述散列值和所述原始下载链接包含于所述下载链接中。
22、 根据权利要求 21所述的服务器, 其特征在于, 所述访问控制 列表中包含至少一个控制项, 所述访问控制列表参数中包括至少一个 控制项参数, 其中一个控制项参数对应一个控制项;
所述控制项参数由所述控制项在根据所述第一密钥进行加密后形 成。
23、 根据权利要求 21所述的服务器, 其特征在于,
所述处理器, 还用于当到达预定时间阔值时, 通过所述发送器和 所述接收器与所述下载接入节点协商更新所述第一密钥和所述第二密 钥。
24、 根据权利要求 23所述的服务器, 其特征在于,
所述接收器, 还用于获取上传文件时的用户信息;
所述处理器, 还用于根据所述用户信息, 通过所述发送器和所述 接收器针对一个用户与所述下载接入节点协商生成所述第一密钥和所 述第二密钥中的至少一个。
25、 根据权利要求 20-24所述的服务器, 其特征在于,
所述接收器, 还用于接收所述终端的下载链接获取请求; 所述发送器, 具体用于将所述下载链接发送给所述终端。
26、 一种应用于分布式存储系统的下载接入节点, 其特征在于, 所述下载接入节点包括接收器、 处理器和发送器;
所述接收器, 用于接收终端根据所述服务器发布的下载链接发起 的下载请求, 所述下载链接中包含由所述服务器根据设置的下载权限 生成的访问控制列表参数, 所述下载请求中包含所述访问控制列表参 数和所述终端的下载参数;
所述处理器, 用于根据所述访问控制列表参数和所述下载参数对 所述下载请求进行鉴权;
所述发送器, 用于将鉴权结果发送给所述终端。
27、 根据权利要求 26所述的下载接入节点, 其特征在于, 所述处理器, 具体用于根据散列值校验原始下载链接、 所述访问 控制列表参数和第二密钥的完整性, 所述原始下载链接由所述服务器 根据上传文件的文件参数生成, 所述散列值由所述服务器对所述原始 下载链接、 所述访问控制列表参数和第二密钥进行散列运算生成; 根 据与所述服务器约定的第一密钥对所述访问控制列表参数进行解密, 并解析出所述访问控制列表;
所述发送器, 还用于当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表参数和所述第二密钥中至少一个被修改时, 通知所 述终端无法进行下载; 当根据所述第二密钥确定所述原始下载链接、 所述访问控制列表参数和所述第二密钥中未被修改时, 所述下载接入 节点根据与所述服务器约定的第一密钥对所述访问控制列表参数进行 解密, 并解析出所述访问控制列表;
所述处理器, 还用于通过所述访问控制列表和所述下载参数对所 述下载请求进行鉴权。
28、 根据权利要求 27所述的下载接入节点, 其特征在于, 所述发送器, 还用于当所述下载参数未满足所述访问控制列表中 所包含的下载权限时, 通知所述终端无法进行所述上传文件的下载; 或者, 当所述下载参数满足所述访问控制列表中所包含的下载权限时, 将所述原始下载链接所标识的上传文件发送给所述终端。
PCT/CN2014/073931 2014-03-24 2014-03-24 文件下载方法、装置和系统 WO2015143596A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US15/128,614 US10212166B2 (en) 2014-03-24 2014-03-24 File downloading method, apparatus, and system
CN201480001805.6A CN104471918B (zh) 2014-03-24 2014-03-24 文件下载方法、装置和系统
PCT/CN2014/073931 WO2015143596A1 (zh) 2014-03-24 2014-03-24 文件下载方法、装置和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/073931 WO2015143596A1 (zh) 2014-03-24 2014-03-24 文件下载方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2015143596A1 true WO2015143596A1 (zh) 2015-10-01

Family

ID=52915487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/073931 WO2015143596A1 (zh) 2014-03-24 2014-03-24 文件下载方法、装置和系统

Country Status (3)

Country Link
US (1) US10212166B2 (zh)
CN (1) CN104471918B (zh)
WO (1) WO2015143596A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391792A (zh) * 2015-11-26 2016-03-09 上海贝锐信息科技有限公司 客户端批量远程控制方法及系统

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10318754B2 (en) * 2014-06-02 2019-06-11 Robert Bosch Gmbh System and method for secure review of audit logs
US9692826B2 (en) 2015-04-17 2017-06-27 Dropbox, Inc. Collection folder for collecting file submissions via a customizable file request
US10885209B2 (en) 2015-04-17 2021-01-05 Dropbox, Inc. Collection folder for collecting file submissions in response to a public file request
US10091296B2 (en) 2015-04-17 2018-10-02 Dropbox, Inc. Collection folder for collecting file submissions
US10621367B2 (en) 2015-04-17 2020-04-14 Dropbox, Inc. Collection folder for collecting photos
CN106453448A (zh) * 2015-08-06 2017-02-22 北京奇虎科技有限公司 用于下载目标文件的方法及装置
CN106469281B (zh) * 2015-08-18 2020-01-17 华为技术有限公司 一种云中数据文件的管理方法、云管理点和系统
US10713966B2 (en) 2015-12-31 2020-07-14 Dropbox, Inc. Assignments for classrooms
CN105635186B (zh) * 2016-03-28 2018-07-24 浪潮通用软件有限公司 一种基于http传输协议文件读写服务的下载方法
CN107872442B (zh) * 2016-09-28 2021-12-31 杭州海康威视数字技术股份有限公司 一种应用软件的授权控制方法及装置
US20180115512A1 (en) * 2016-10-25 2018-04-26 American Megatrends, Inc. Methods and systems for downloading a file
CN106528248B (zh) * 2016-11-30 2021-06-22 惠州Tcl移动通信有限公司 一种移动终端基于软件完整性的下载方法及系统
US11334852B2 (en) * 2016-12-08 2022-05-17 Airwatch Llc Secured attachment management
US10587621B2 (en) * 2017-06-16 2020-03-10 Cisco Technology, Inc. System and method for migrating to and maintaining a white-list network security model
CN107295018A (zh) * 2017-08-14 2017-10-24 北京连云决科技有限公司 一种云盘文件的安全存储及分享方法
CN107566362A (zh) * 2017-08-29 2018-01-09 深圳乐信软件技术有限公司 一种图片的访问方法及装置
CN107967412B (zh) * 2017-11-27 2020-06-26 宝信软件(武汉)有限公司 一种控制pdf文件受限访问的方法
CN108055265A (zh) * 2017-12-13 2018-05-18 常州卡灵克软件有限公司 车载appStore下载鉴权机制及系统
CN109218415B (zh) * 2018-08-28 2021-06-29 浪潮电子信息产业股份有限公司 一种分布式节点管理的方法、节点及存储介质
CN109474668B (zh) * 2018-10-16 2022-03-04 平安科技(深圳)有限公司 Cdn服务切换方法、装置、计算机设备及存储介质
CN109347828B (zh) * 2018-10-22 2019-11-26 北京达佳互联信息技术有限公司 文件上传下载方法、装置、电子设备及存储介质
US20200153889A1 (en) * 2018-11-12 2020-05-14 Asd Korea Method for uploading and downloading file, and server for executing the same
CN111314403B (zh) * 2018-12-12 2022-09-02 阿里巴巴集团控股有限公司 资源一致性的校验方法和装置
US11593504B1 (en) * 2019-07-17 2023-02-28 Workday, Inc. Systems and methods for manipulating pruned tree sets to determine access regions in a hypercube
CN112449216A (zh) * 2019-08-27 2021-03-05 华为技术有限公司 一种根据授权获取文件的方法
CN110457612B (zh) * 2019-10-14 2020-01-10 江苏金恒信息科技股份有限公司 一种终端页面访问方法及系统
CN111294396A (zh) * 2020-01-20 2020-06-16 咪咕数字传媒有限公司 文件传输方法、装置、电子设备及存储介质
US11709801B2 (en) * 2020-04-08 2023-07-25 Sap Se File-based sharing using content distributions network
CN113918845B (zh) * 2021-12-09 2022-03-15 天津联想协同科技有限公司 可识别状态的外链url的生成方法、装置及存储介质
US20230237245A1 (en) * 2022-01-21 2023-07-27 Docusign, Inc. Identification of document access by a message scanning system
CN114866348B (zh) * 2022-07-06 2022-09-20 深圳市金政软件技术有限公司 基于浏览器的数据传输方法、装置、设备及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859115A (zh) * 2006-01-24 2006-11-08 华为技术有限公司 一种网络数据的分布式存储下载系统、设备及方法
CN103248680A (zh) * 2013-04-26 2013-08-14 北京小米科技有限责任公司 一种分享网盘数据的方法及系统

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130212707A1 (en) * 2003-10-31 2013-08-15 James Donahue Document control system
CN1909557B (zh) 2005-08-02 2010-05-26 中国移动通信集团公司 音乐下载的处理方法
CN100562016C (zh) 2006-01-16 2009-11-18 北京北方烽火科技有限公司 一种web服务防盗链方法
CN101247409A (zh) 2008-03-21 2008-08-20 中国科学院电工研究所 一种基于p2p网络的直播流媒体的鉴权方法
CN201256399Y (zh) 2008-03-31 2009-06-10 中国网通集团宽带在线有限公司 一种下载平台、下载终端及下载系统
CN101771532B (zh) 2008-12-31 2012-07-18 华为技术有限公司 实现资源共享的方法、装置及系统
CN101815061B (zh) 2009-02-23 2015-01-07 传线网络科技(上海)有限公司 互联网内容发布网络防盗链系统
CN102055752A (zh) 2009-10-29 2011-05-11 腾讯科技(深圳)有限公司 一种防盗链的方法及终端
CN102118323B (zh) 2010-01-04 2016-01-20 中兴通讯股份有限公司 内容分发网络服务器及内容下载方法
CN101800985B (zh) 2010-02-10 2014-12-17 中兴通讯股份有限公司 鉴权方法及系统、终端、服务器与数据下载方法及装置
CN102045348B (zh) 2010-12-01 2013-08-07 北京迅捷英翔网络科技有限公司 一种防盗链系统及方法
CN102624752B (zh) 2011-01-26 2014-06-18 天脉聚源(北京)传媒科技有限公司 一种m3u8直播流防盗链方法和系统
CN102111750A (zh) 2011-02-25 2011-06-29 中兴通讯股份有限公司 一种实现内容下载的方法及系统
CN102263828B (zh) 2011-08-24 2013-08-07 北京蓝汛通信技术有限责任公司 一种负载均衡分配方法及设备
CN102523495A (zh) 2011-12-15 2012-06-27 四川长虹电器股份有限公司 一种iptv系统及实现播放防盗链的方法
CN102752300B (zh) 2012-06-28 2015-05-27 用友网络科技股份有限公司 动态防盗链系统和动态防盗链方法
CN103067409B (zh) 2013-01-21 2015-10-14 中国科学院信息工程研究所 一种web盗链防护方法及其网关系统
CN103248695A (zh) 2013-05-07 2013-08-14 北京奇虎科技有限公司 文件下载方法、系统及cdn中的服务器节点

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859115A (zh) * 2006-01-24 2006-11-08 华为技术有限公司 一种网络数据的分布式存储下载系统、设备及方法
CN103248680A (zh) * 2013-04-26 2013-08-14 北京小米科技有限责任公司 一种分享网盘数据的方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391792A (zh) * 2015-11-26 2016-03-09 上海贝锐信息科技有限公司 客户端批量远程控制方法及系统

Also Published As

Publication number Publication date
US20170111362A1 (en) 2017-04-20
US10212166B2 (en) 2019-02-19
CN104471918A (zh) 2015-03-25
CN104471918B (zh) 2017-11-03

Similar Documents

Publication Publication Date Title
WO2015143596A1 (zh) 文件下载方法、装置和系统
US10523707B2 (en) Secure transport channel using multiple cipher suites
US11038854B2 (en) Terminating SSL connections without locally-accessible private keys
JP7007985B2 (ja) 鍵を有するリソースロケーター
JP6612358B2 (ja) ネットワークアクセスデバイスをワイヤレスネットワークアクセスポイントにアクセスさせるための方法、ネットワークアクセスデバイス、アプリケーションサーバ、および不揮発性コンピュータ可読記憶媒体
CN109088889B (zh) 一种ssl加解密方法、系统及计算机可读存储介质
WO2019237796A1 (zh) 资源获取、分发、下载方法、装置、设备及存储介质
US8375420B2 (en) Challenge-response system and method
TW200307439A (en) Mechanism for supporting wired and wireless methods for client and server side authentication
US10230695B2 (en) Distribution of secure data with entitlement enforcement
WO2017096887A1 (zh) 防盗链的方法及装置
JP5458017B2 (ja) 通信ネットワークの端末間におけるデジタルデータの使用制御
WO2007025998A2 (en) Method and system for resource encryption and decryption
WO2020019478A1 (zh) 通信数据加密方法和装置
JP2010244432A (ja) ファイル共有システム、共有ファイルサーバ装置、ファイル共有方法、共有ファイルサーバ装置のアクセス制御方法、及びこれらのプログラム
US20130054965A1 (en) Usage Control of Digital Data Exchanged Between Terminals of a Telecommunications Network
CN110581829A (zh) 通信方法及装置
CN107026828B (zh) 一种基于互联网缓存的防盗链方法及互联网缓存
CN112753031A (zh) 媒体内容控制
WO2014154063A1 (zh) 一种控制应用软件赠送的方法、设备及系统
CN111327634A (zh) 网站访问监管方法、安全套接层代理装置、终端及系统
CN115412568A (zh) 分布式数据传输方法、装置及系统
WO2022022057A1 (zh) 会话票证的处理方法、装置、电子设备及计算机可读存储介质
CN113918971A (zh) 基于区块链的消息传输方法、装置、设备及可读存储介质
US9036822B1 (en) Methods for managing user information and devices thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14886869

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15128614

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14886869

Country of ref document: EP

Kind code of ref document: A1