File security access management method, system and device for public data open platform and medium
By setting download-restricted identifiers for files and mandating verification of one-time tokens, the problem of unauthorized downloads caused by file ID leakage or credential reuse in public data open platforms is solved, and secure and controllable access to restricted files is achieved.
Patent Information
- Application Number
- CN202511154152.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-18
- Publication Date
- 2025-12-09
AI Technical Summary
In existing public data open platforms, there is a lack of effective access control mechanisms to address issues such as unauthorized and unauthorized downloads caused by leaked file IDs or reusable access credentials.
Secure access to restricted files is ensured by setting download-restricted flags for files and requiring verification of valid one-time tokens generated only by whitelisted applications and valid only once.
It effectively prevents unauthorized downloads caused by leaked download links or reuse of credentials, ensuring the security and controllability of file resource downloads and preventing unauthorized multiple uses and abuse.
Smart Images

Figure CN121098545A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data security access control technology, specifically to a method, system, device, and medium for managing secure file access on a public data open platform. Background Technology
[0002] Public data open platforms host massive amounts of data resources, including both unconditionally accessible resources that users can freely access and conditionally accessible resources that require specific application and approval processes. How to securely and controllably manage these data resources, especially download access permissions for file-based resources, has become a key requirement for the platform's construction and operation.
[0003] Existing public data open platforms generally employ a modular design approach to manage file resources. This includes a file management module responsible for basic operations such as physical storage, uploading, and downloading files, and a business management module responsible for handling user requests and performing business logic checks (such as user authentication and data access condition verification). When a user requests to download a conditionally accessible file, the business management module, after approval, typically provides the user with a download link for the file or directly triggers the download operation in the file management module. This design attempts to control file access through pre-approval by the business module.
[0004] However, existing technical solutions have significant shortcomings. First, for conditionally open file resources that have been approved, once the download link based on the file ID is obtained or leaked, any user who obtains the link could bypass the business approval process and directly download the file, posing a serious risk of unauthorized access. Second, even if the business module dynamically generates access credentials after approval, if the credentials lack strict single-use validity control, there is still a possibility of them being used multiple times or disseminated secondaryly, leading to unauthorized downloads. Finally, if the interface used to generate file access credentials itself lacks an effective caller identity and permission verification mechanism, any application aware of the interface could attempt to call it to illegally obtain file access permissions. Summary of the Invention
[0005] To address the technical problem that existing public data open platforms cannot effectively prevent unauthorized file downloads by bypassing business approval processes through leaked file IDs or reusable access credentials, this application provides a file security access management method, system, device, and medium for public data open platforms. By mandating the verification of files marked as restricted for download using a one-time token generated by a whitelist application that is valid only once, secure and controllable access to download paths of conditionally open file resources is achieved, effectively preventing unauthorized file downloads.
[0006] Firstly, this application provides a method for managing secure file access on a public data open platform, comprising the following steps: S1. Upload the file to the file storage system and record the file attribute information, which includes the file ID and a download restriction identifier. The download restriction identifier is set to restricted or unrestricted based on the file's open type. S2. Receive a file download request from the requesting application and determine whether the file download request contains a file ID: If the result is negative, the download will be rejected. If the result is yes, proceed to step S3; S3. Retrieve the download restriction identifier for the file corresponding to the file ID, and determine whether it is restricted: If the result is negative, the download operation for the corresponding file will be executed directly using the file ID; If the result is yes, proceed to step S4; S4. Verify that the file download request contains a valid one-time token: If the result is negative, the download will be rejected. If the result is yes, the corresponding file download operation is performed using the one-time token, and the current one-time token is invalidated after the download operation is completed. The one-time token is generated by the requesting application by calling the token acquisition interface, which can only be called by applications in a pre-set whitelist.
[0007] It should be further noted that in step S1, the file attribute information also includes file type, storage path, file hash value, file size, and file status.
[0008] It should be further noted that in step S1, the file download restriction flag can be updated based on a file open type change request initiated by the system administrator.
[0009] It should be further noted that the request to change the open type includes changing the download restricted identifier from restricted to unrestricted, or changing the download restricted identifier from unrestricted to restricted.
[0010] It should be further noted that the token acquisition interface call process in step S4 includes: The application is requested to submit a token generation request containing the file ID; Verify whether the requesting application is on the call whitelist; If the verification passes, a one-time token bound to the file ID is generated and returned to the requesting application.
[0011] It should be further noted that in step S4, invalidating the current one-time token includes: marking the token status of the current one-time token as used, and rejecting subsequent download requests based on the one-time token.
[0012] It should be further noted that when a download is refused, a download refusal notification is sent to the requesting application, specifying the reason for the refusal.
[0013] It should be further noted that the reasons for refusing to download include: The file download request does not include a file ID; The file download request did not contain a valid one-time token.
[0014] Secondly, this application provides a file security access management system for a public data open platform, used to implement the above-mentioned file security access management method, including: The file management module includes: The file upload interface is used to upload files and record file attribute information. A file storage system used to store files and file attribute information; The file download interface is used to perform operations based on the download restriction flag: If it is marked as unrestricted, directly execute the download operation of the corresponding file in the file storage system; If the token is marked as restricted, verify its validity. If the verification is successful, execute the download operation of the corresponding file in the file storage system and immediately invalidate the token. The token acquisition interface is available for applications on the whitelist to call and is used to generate one-time tokens; The business management module includes: The file upload unit is used to call the upload interface of the file management module and set a download restriction flag based on the file open type; The file download unit is used to call the file download interface.
[0015] It should be further noted that the file management module also includes a download restriction flag update interface, which is used to receive file open type change requests initiated by the system administrator and update the download restriction flag.
[0016] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described file secure access management method.
[0017] Fourthly, this application provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the above-described file security access management method.
[0018] As can be seen from the above technical solutions, this application has the following advantages: 1. This application solves the problem of unauthorized downloads caused by the leakage of download links (or equivalent credentials) in existing technologies by setting download-restricted identifiers for files and mandating the verification of a valid one-time token for files identified as restricted during the file download request processing flow. For restricted files, simply possessing the file ID is insufficient to complete the download; an additional one-time valid token generated by a trusted source must be provided, thus achieving strictly controlled access to download paths for conditionally open file resources.
[0019] 2. This application solves the security problem caused by the multiple use or dissemination of access credentials in the prior art by immediately invalidating the currently used one-time token after performing a restricted file download operation, so that each token can only successfully trigger a download operation once. This effectively prevents the abuse of issued access permissions and ensures the independence and controllability of each download operation.
[0020] 3. This application addresses the system-level risk that unauthorized applications may abuse the interface used to obtain file access permissions in the prior art by requiring one-time tokens to be generated by applications located on a pre-set call whitelist through a specific token acquisition interface. This ensures that only authorized and trusted business applications can generate tokens for downloading restricted files, thereby strengthening the security of access control from the source of the call. Attached Figure Description
[0021] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a file security access management method for a public data open platform in one embodiment of this application.
[0023] Figure 2 This is a schematic block diagram of a file security access management system for a public data open platform in one embodiment of this application.
[0024] Figure 3 This is a schematic diagram of the hardware structure of an electronic device in one embodiment of this application. Detailed Implementation
[0025] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] The document security access management method involved in this application will be described in detail below. Specific details such as particular system architectures and technologies are presented for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details.
[0027] In the document security access management method disclosed in this application, the term "comprising" indicates the presence of the described feature, whole, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0028] To facilitate a clear description of the technical solutions of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0029] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0030] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0031] The file security access management method provided in this application embodiment is executed by a computer device, and correspondingly, the file security access management system of the public data open platform runs on the computer device.
[0032] Figure 1This is a flowchart illustrating a file security access management method for a public data open platform according to an embodiment of this application. Figure 1 The executing entity can be a file security access management system. Depending on different requirements, the order of the steps in this flowchart can be changed, and some can be omitted.
[0033] like Figure 1 As shown, the file security access management method of this public data open platform includes: Step S1: Upload the file to the file storage system and record the file attribute information. The file attribute information includes the file ID and the download restriction identifier. The download restriction identifier is set to restricted or unrestricted based on the file's open type.
[0034] By recording file attribute information, including file ID and download restriction identifier, when uploading files, basic data support is provided for access control decisions based on this identifier in the subsequent file download process.
[0035] In some specific embodiments, the file attribute information also includes file type, storage path, file hash value, file size, and file status.
[0036] By limiting the content of file attribute information, the comprehensiveness and standardization of file metadata management are ensured, providing a richer data foundation for auxiliary management functions such as file retrieval, status monitoring, and integrity verification.
[0037] In some specific embodiments, the file download restriction flag can be updated based on a file open type change request initiated by the system administrator.
[0038] By clarifying the update rules for file download restriction indicators, the platform's ability to dynamically adjust its file access policy has been improved, ensuring that file access control rules can flexibly adapt to changes in business needs.
[0039] In some specific embodiments, the open type change request includes changing the download restricted identifier from restricted to unrestricted, or changing the download restricted identifier from unrestricted to restricted.
[0040] By defining the specific operational content of the open type change request, the boundaries and scope of the document open type change operation are clarified, ensuring the accurate communication and execution of management operational intentions.
[0041] Step S2: Receive a file download request from the requesting application and determine whether the file download request contains a file ID. If the result is negative, the download will be rejected. If the result is yes, proceed to step S3.
[0042] By forcibly checking whether a file ID is included in the file download request when it is received, invalid or illegal requests that lack this key identifier are immediately intercepted and rejected, thus achieving an effective initial screening of download requests.
[0043] Step S3: Retrieve the download restriction identifier for the file corresponding to the file ID, and determine whether it is restricted. If the result is negative, the download operation for the corresponding file will be executed directly using the file ID; If the result is yes, proceed to step S4.
[0044] By retrieving the download restriction identifier corresponding to the file ID and performing a direct download operation when there is no restriction, convenient and efficient access to unconditionally open file resources is ensured, meeting the need for convenient access to open data.
[0045] Step S4, verify whether the file download request contains a valid one-time token: If the result is negative, the download will be rejected. If the result is yes, the corresponding file download operation is performed using the one-time token, and the current one-time token is invalidated after the download operation is completed. The one-time token is generated by the requesting application by calling the token acquisition interface, which can only be called by applications in a pre-set whitelist.
[0046] By forcibly verifying whether the download request for files marked as restricted contains a valid one-time token (this token is generated only by whitelisted applications and is immediately invalidated after download), precise and one-time authorization control of download permissions for conditionally open file resources is achieved, fundamentally eliminating the risk of unauthorized downloads caused by token reuse or leakage.
[0047] In some specific embodiments, the process of calling the token acquisition interface includes: The application is requested to submit a token generation request containing the file ID; Verify whether the requesting application is on the call whitelist; If the verification passes, a one-time token bound to the file ID is generated and returned to the requesting application.
[0048] By defining the call process of the token acquisition interface, a secure and controlled token generation mechanism is established, ensuring that only authorized applications can generate valid tokens for specific restricted files.
[0049] In some specific embodiments, invalidating the current one-time token includes: marking the token status of the current one-time token as used and rejecting subsequent download requests based on the one-time token.
[0050] By clearly defining the specific steps to invalidate a one-time token, the token's strict one-time use characteristic is ensured, effectively preventing the token from being reused for unauthorized downloads.
[0051] In some specific embodiments, when a download is refused, a download refusal notification is sent to the requesting application, specifying the reason for the download refusal.
[0052] By proposing to send a notification containing the reason for the download rejection to the requesting application, the system's interactivity and traceability are improved, making it easier for the requesting application to understand the reason for the operation failure and take appropriate action.
[0053] In some specific embodiments, the reasons for refusing to download include: The file download request does not include a file ID; The file download request did not contain a valid one-time token.
[0054] By specifying the exact types of reasons for download rejection, standardized and identifiable error messages are provided for download rejection notifications, enhancing the clarity and guidance of system feedback.
[0055] In one specific embodiment, the steps of the file security access management method for a public data open platform include: Step S1: Upload the file to the file storage system and record the file attribute information. The file attribute information includes file ID, download restriction flag, file type, storage path, file hash value, file size and file status. The download restriction flag is set to restricted or unrestricted based on the file's open type. The download restriction label of a file can be updated based on a file open type change request initiated by the system administrator. The open type change request includes changing the download restriction label from restricted to unrestricted, or changing the download restriction label from unrestricted to restricted.
[0056] Step S2: Receive a file download request from the requesting application and determine whether the file download request contains a file ID. If the result is negative, the download will be rejected. If the result is yes, proceed to step S3.
[0057] Step S3: Retrieve the download restriction identifier for the file corresponding to the file ID, and determine whether it is restricted. If the result is negative, the download operation for the corresponding file will be executed directly using the file ID; If the result is yes, proceed to step S4.
[0058] Step S4, verify whether the file download request contains a valid one-time token: If the result is negative, the download will be rejected. If the result is yes, the download operation of the corresponding file is performed using the one-time token. After the download operation is completed, the current one-time token is invalidated, including: marking the token status of the current one-time token as used and rejecting subsequent download requests based on the one-time token; The one-time token is generated by the requesting application by calling the token acquisition interface. The token acquisition interface can only be called by applications in a pre-set whitelist. The token acquisition interface call process includes: The application is requested to submit a token generation request containing the file ID; Verify whether the requesting application is on the call whitelist; If the verification passes, a one-time token bound to the file ID is generated and returned to the requesting application; When a download is refused, a download refusal notification is sent to the requesting application, specifying the reason for the refusal. Reasons for refusal include: The file download request does not include a file ID; The file download request did not contain a valid one-time token.
[0059] The following are embodiments of the file security access management system of the public data open platform provided in this application. The file security access management system of the public data open platform and the file security access management method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the file security access management system, please refer to the embodiments of the file security access management method of the public data open platform.
[0060] like Figure 2 As shown, the file security access management system of the public data open platform includes: The file management module includes: The file upload interface is used to upload files and record file attribute information. A file storage system used to store files and file attribute information; The file download interface is used to perform operations based on the download restriction flag: If it is marked as unrestricted, directly execute the download operation of the corresponding file in the file storage system; If the token is marked as restricted, verify its validity. If the verification is successful, execute the download operation of the corresponding file in the file storage system and immediately invalidate the token. The token acquisition interface is available for applications on the whitelist to call and is used to generate one-time tokens; The download restricted flag update interface is used to receive file open type change requests initiated by system administrators and update the download restricted flag. The business management module includes: The file upload unit is used to call the upload interface of the file management module and set a download restriction flag based on the file open type; The file download unit is used to call the file download interface.
[0061] The file security access management system in this embodiment is used to implement the file security access management method of the public data open platform.
[0062] This application also provides an electronic device for implementing the various embodiments of this application. Figure 3 To illustrate the hardware structure of an electronic device according to various embodiments of this application, as shown in the following diagram... Figure 3 As shown, the electronic device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
[0063] Those skilled in the art will understand that the electronic device structure involved in the embodiments of this application does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0064] In embodiments of this application, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0065] In this application embodiment, the processor can be implemented using at least one of an Application-Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a processor, a controller, a microcontroller, a microprocessor, or an electronic unit designed to perform the functions described herein. In some cases, such implementations can be implemented within a controller. For software implementations, implementations such as processes or functions can be implemented with separate software modules that allow the performance of at least one function or operation. The software code can be implemented by a software application (or program) written in any suitable programming language, and the software code can be stored in memory and executed by the controller.
[0066] In addition, the electronic device includes some functional modules not shown, which will not be described in detail here.
[0067] Those skilled in the art will understand that the various aspects of the electronic device provided in this application can be implemented as a system, method, or program product. Therefore, the various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0068] This application also provides a storage medium storing a program product capable of implementing a file secure access management method for a public data open platform. In some possible implementations, various aspects of this application can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this application.
[0069] The storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0070] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for managing secure file access on a public data open platform, characterized in that, include: S1. Upload the file to the file storage system and record the file attribute information, which includes the file ID and download restriction identifier. The download restriction identifier is set to restricted or unrestricted based on the file's open type. S2. Receive a file download request from the requesting application and determine whether the file download request contains a file ID: If the result is negative, the download will be rejected. If the result is yes, proceed to step S3; S3. Retrieve the download restriction identifier for the file corresponding to the file ID, and determine whether it is restricted: If the result is negative, the download operation for the corresponding file will be executed directly using the file ID; If the result is yes, proceed to step S4; S4. Verify that the file download request contains a valid one-time token: If the result is negative, the download will be rejected. If the result is yes, the corresponding file download operation is performed using the one-time token, and the current one-time token is invalidated after the download operation is completed. The one-time token is generated by the requesting application by calling the token acquisition interface, which can only be called by applications in a pre-set whitelist.
2. The file security access management method as described in claim 1, characterized in that, In step S1, the file attribute information also includes file type, storage path, file hash value, file size, and file status.
3. The file security access management method as described in claim 1, characterized in that, In step S1, the file download restriction flag can be updated based on a file open type change request initiated by the system administrator.
4. The file security access management method as described in claim 3, characterized in that, Requests to change the open type include changing the download restricted flag from restricted to unrestricted, or changing the download restricted flag from unrestricted to restricted.
5. The file security access management method as described in claim 1, characterized in that, In step S4, the process of calling the token acquisition interface includes: The application is requested to submit a token generation request containing the file ID; Verify whether the requesting application is on the call whitelist; If the verification passes, a one-time token bound to the file ID is generated and returned to the requesting application.
6. The file security access management method as described in claim 1, characterized in that, In step S4, invalidating the current one-time token includes: marking the token status of the current one-time token as used, and rejecting subsequent download requests based on the one-time token.
7. The file security access management method as described in claim 1, characterized in that, When a download is refused, a download refusal notification is sent to the requesting application, specifying the reason for the refusal.
8. A file security access management system for a public data open platform, characterized in that, To implement the file security access management method as described in any one of claims 1-7, the method includes: The file management module includes: The file upload interface is used to upload files and record file attribute information. A file storage system used to store files and file attribute information; The file download interface is used to perform operations based on the download restriction flag: If it is marked as unrestricted, directly execute the download operation of the corresponding file in the file storage system; If the token is marked as restricted, verify its validity. If the verification is successful, execute the download operation of the corresponding file in the file storage system and immediately invalidate the token. The token acquisition interface is available for applications on the whitelist to call and is used to generate one-time tokens; The business management module includes: The file upload unit is used to call the upload interface of the file management module and set a download restriction flag based on the file open type; The file download unit is used to call the file download interface.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the steps of the file security access management method as described in any one of claims 1-7 when executing a computer program.
10. A storage medium storing a computer program, characterized in that, When a computer program is executed by a processor, it implements the steps of the file security access management method as described in any one of claims 1-7.