A method, apparatus, device, and storage medium for configuring resource access permissions.
By encrypting the identification of third-party applications and government resources, the problems of resource unique identification leakage and low authority configuration efficiency in government authentication platforms are solved, and the secure and efficient configuration of resource access is achieved.
Patent Information
- Application Number
- CN202110912700.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-10
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-08-10
AI Technical Summary
In government authentication platforms, the immutability of resource unique identifiers causes third-party service providers to actively or passively disclose resource unique identifiers, resulting in illegal acquisition of sensitive information, and excessive permission configuration data during application access, reducing configuration efficiency .
Encrypt the application identifier of a third-party application and the resource identifier and version number of government resources, generate a unique access identifier, and issue the identifier to the application to configure its resource access rights to the government authentication platform.
Ensure that the access identifiers configured by each government resource on different third-party applications are different, improving the security and configuration efficiency of resource access rights, and preventing illegal access.
Smart Images

Figure CN113591121B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of permission configuration, and in particular, to a method, apparatus, device and storage medium for configuring resource access rights. Background Art
[0002] During the development of the government authentication platform, the government service system will form a corresponding organization tree according to the hierarchical relationship between each government resource in each government authentication platform (such as the government departments and personnel set up under the government authentication platform), which is used to store the unique identifier of the government resources at the corresponding level on each node. At this time, when an application accesses the government authentication platform, the government service system will inform the application of the highest accessible organization tree node, so that the application is configured with access rights to all resources stored in the highest organization tree node and its subordinate nodes. The application can recursively obtain detailed information on each resource by accessing the unique identifier of each resource with access rights. However, due to the immutability of the unique identifier of the resource, there may be active or passive leakage of the unique identifier of certain resources between third-party service providers, resulting in the illegal acquisition of sensitive information in the resource by applications that do not have access rights to the resource.
[0003] Currently, when each application is connected to the corresponding government authentication platform, the identifier of each resource accessible to the application will be saved in the database, thereby implementing the application's access permission configuration for each accessible resource. This results in excessive configuration data when the application is connected to the corresponding government authentication platform, reducing the efficiency of configuring resource access permissions when the application is connected to the corresponding government authentication platform. Summary of the invention
[0004] The embodiments of the present invention provide a method, apparatus, device and storage medium for configuring resource access rights, which improves the convenience and efficiency of configuring resource access rights. The access identifiers configured for each government resource on different third-party applications are different, ensuring the security of resource access.
[0005] In a first aspect, an embodiment of the present invention provides a method for configuring resource access rights, the method comprising:
[0006] In response to an access instruction from a third-party application to the government authentication platform, determine an application identifier of the third-party application, and a resource identifier and version number of each government resource associated with the government authentication platform;
[0007] For each government resource, encrypt the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for the third-party application;
[0008] The access identifier of each government resource is issued to the third-party application to configure the resource access rights of the third-party application to the government authentication platform.
[0009] In a second aspect, an embodiment of the present invention provides a device for configuring resource access rights, the device comprising:
[0010] An application access response module, used to respond to an access instruction from a third-party application to the government authentication platform, determine the application identifier of the third-party application, and the resource identifier and version number of each government resource associated with the government authentication platform;
[0011] An access identification determination module, used for encrypting the application identification and the resource identification and version number of each government resource to obtain an access identification of the government resource for the third-party application;
[0012] The access permission configuration module is used to issue the access identification of each government resource to the third-party application to configure the resource access permission of the third-party application to the government authentication platform.
[0013] In a third aspect, an embodiment of the present invention provides a computer device, the computer device comprising:
[0014] one or more processors;
[0015] A storage device for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for configuring resource access rights described in any embodiment of the present invention.
[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for configuring resource access rights described in any embodiment of the present invention.
[0018] The embodiments of the present invention provide a method, apparatus, device and storage medium for configuring resource access rights. After receiving an access instruction from a third-party application to a government affairs authentication platform, the method first determines the application identifier of the third-party application and the resource identifier and version number of each government affairs resource associated with the government affairs authentication platform. Then, for each government affairs resource, the application identifier and the resource identifier and version number of the government affairs resource are encrypted to obtain the access identifier of the government affairs resource to the third-party application, so that the access identifiers configured for each government affairs resource on different third-party applications are different, and the access identifier configured for a certain government affairs resource on a third-party application cannot enable another third-party application to access the government affairs resource, thereby ensuring the security of resource access. Furthermore, the access identifier of each government affairs resource is issued to the third-party application to realize the resource access permission configuration of the third-party application to the government affairs authentication platform, thereby improving the convenience and efficiency of resource access permission configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0020] Figure 1 A flowchart of a method for configuring resource access rights provided in Embodiment 1 of the present invention;
[0021] Figure 2 A flowchart of a method for configuring resource access rights provided in Embodiment 2 of the present invention;
[0022] Figure 3 A flowchart of a method for configuring resource access rights provided in Embodiment 3 of the present invention;
[0023] Figure 4 A schematic diagram of the structure of a device for configuring resource access rights provided in a fourth embodiment of the present invention;
[0024] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0026] Embodiment 1
[0027] Figure 1A flowchart of a method for configuring resource access rights provided in the first embodiment of the present invention. This embodiment can be applied to the case where any government authentication platform accesses a corresponding third-party application and configures resource access rights within the government authentication platform for the third-party application. The method for configuring resource access rights provided in this embodiment can be executed by a resource access rights configuration device provided in an embodiment of the present invention, which can be implemented by software and / or hardware and integrated in a computer device that executes this method.
[0028] Specifically, refer to Figure 1 , the method specifically comprises the following steps:
[0029] S110, in response to an access instruction from a third-party application to the government authentication platform, determining an application identifier of the third-party application, and a resource identifier and version number of each government resource associated with the government authentication platform.
[0030] Specifically, the government authentication platform is a pre-developed government system used to implement various government functions in any government field, supports access to different third-party applications, and authenticates the identities of third-party applications, so that different users can view government information under the corresponding government functions in the government authentication platform through the third-party applications accessed by the government authentication platform. For example, the government authentication platform can be a pre-developed Ministry of Education platform, and the third-party applications can be campus network applications developed by various schools that support access to the Ministry of Education platform.
[0031] Among them, each government authentication platform will be divided into corresponding government departments and personnel according to the hierarchy. Considering that third-party applications usually use the account and other identification information of a certain government department or personnel to view the government function information supported by the government department or personnel in the government authentication platform, that is, when a third-party application accesses the government authentication platform, it is necessary to open the operation permissions of the corresponding government departments and personnel set in the government authentication platform to the third-party application, so that the third-party application has the permission to enter the government authentication platform to view the various functional information. Therefore, in this embodiment, when a third-party application accesses the government authentication platform, the various government resources that need to be configured with access permissions in the third-party application can be the corresponding government departments and personnel set in the government authentication platform, and the third-party application uses the identification information of the corresponding government departments and personnel to enter the government authentication platform to view the various functional information supported.
[0032] At the same time, taking into account that the corresponding government departments and personnel set up in the government authentication platform will change, the access rights to government resources will also change. Therefore, in order to ensure the accuracy of the access rights to government resources, this embodiment will also record the version number of each government resource in real time to indicate the latest version of the government resource.
[0033] Moreover, in order to ensure the comprehensiveness of each government resource in the government authentication platform, the government service system will form a corresponding organizational structure tree according to the hierarchical relationship between each government resource in each government authentication platform (such as the government departments and personnel set up under the government authentication platform), and the identification information of the government resources at the corresponding level will be stored at each node of the organizational structure tree. At this time, when the government resources in the government authentication platform change, such as changes in the departments and personnel in the government authentication platform, the organizational structure tree formed on the government service system will also be updated accordingly to ensure the accuracy of each government resource in the government authentication platform.
[0034] In this embodiment, when a third-party application requests access to a certain government authentication platform, the government authentication platform will receive an access instruction sent by the third-party application. At this time, in order to configure the third-party application with access rights to various government resources within the government authentication platforms accessed, the government authentication platform in this embodiment will forward the received access instruction to the government service system, and the government service system will configure the third-party application's resource access rights to the government authentication platform based on the organizational structure tree pre-formed for the government authentication platform.
[0035] Specifically, in response to the access instruction of the third-party application to the government authentication platform, the resource identifier and version number of each government resource associated with the government authentication platform will first be found from the pre-formed organizational structure tree, so that the resource identifier and version number can be used to jointly configure the third-party application's access rights to each government resource in the government authentication platform. In addition, in order to avoid the leakage of access rights to a certain government resource between different third-party applications, so that third-party applications that do not have access rights can use the leaked access rights to illegally access the government resource, this embodiment will also determine the application identifier of the third-party application, and subsequently use the application identifier to jointly configure the third-party application's access rights to each government resource in the government authentication platform to ensure that different third-party applications have different access rights to the same government resource.
[0036] It should be noted that in this embodiment, the application identifier of the third-party application can be an 8-byte binary code, denoted as APP_ID; the resource identifier of any government resource can be a 24-byte binary code, denoted as UID, and the version number of the government resource can be a 4-byte binary code, which represents the self-incrementing serial number each time the government resource changes in the government authentication platform, denoted as U_V.
[0037] S120, for each government resource, encrypt the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for a third-party application.
[0038] Optionally, since the third-party application is required to access the information of each government resource associated with the government authentication platform after being connected to the government authentication platform, this embodiment will configure the third-party application's access rights to each government resource associated with the government authentication platform.
[0039] Specifically, for each government resource, this embodiment will use the application identifier of the third-party application and the resource identifier and version number of the government resource to jointly configure the third-party application's access rights to the government resource. Among them, the application identifier of the third-party application and the resource identifier and version number of the government resource can be jointly encrypted by the key generated by the third-party application to obtain the access identifier of the government resource for the third-party application. The third-party application can then use the access identifier to access the government resource. By performing the above operation for each government resource, you can obtain the access identifier of each government resource for the third-party application. At this time, since the access identifier carries the application identifier of the third-party application, the access identifiers of different third-party applications for the same government resource are also different. The access identifier configured for a certain government resource on a third-party application cannot enable another third-party application to access the government resource, thereby ensuring the security of resource access and avoiding illegal access to a certain government resource by a third-party application.
[0040] Exemplarily, in this embodiment, for each government resource, the application identifier of the third-party application and the resource identifier and version number of the government resource are merged, and the merged identification information of the government resource is encrypted to obtain the access identifier of the government resource for the third-party application. That is to say, in this embodiment, for each government resource, the application identifier of the third-party application and the resource identifier and version number of the government resource can be merged, such as the application identifier APP_ID is in the lower 8 bytes, the resource identifier UID of the government resource is in the middle 24 bytes, and the version number U_V of the government resource is in the upper 4 bytes, thereby splicing a new UID with a length of 36 bytes, and then using the key generated by the third-party application to encrypt the new UID, and after Base64 encoding, generate the access identifier of the government resource for the third-party application. The access identifier is a 48-byte binary code, recorded as APP_UID, which represents the identification code of the third-party application for the government resource.
[0041] S130, issuing access identifiers of each government resource to third-party applications to configure resource access rights of the third-party applications for the government authentication platform.
[0042] Optionally, after determining the access identifier of the third-party application for each government resource in the government authentication platform, the access identifier of each government resource will be directly issued to the third-party application, so that after the third-party application accesses the government authentication platform, it can store the access identifier of each government resource in the government authentication platform, so that the subsequent third-party application can use the access identifier of any government resource to view the functional information of the government resource in the government authentication platform, thereby realizing the resource access permission configuration of the third-party application for the government authentication platform.
[0043] For example, after receiving the access identifiers of various government resources, the third-party application can record the access identifiers of each government resource in a pre-set permission configuration table in the form of key-value pairs to configure the resource access rights of the third-party application to the government authentication platform. At this time, when it is necessary to view the functional information of a certain government resource by logging into the connected government authentication platform, the access identifier of the government resource can be directly obtained from the permission configuration table, and then the access identifier of the government resource can be used to log in to the government authentication platform.
[0044] The technical solution provided in this embodiment, after receiving the access instruction from the third-party application to the government authentication platform, first determines the application identifier of the third-party application, as well as the resource identifier and version number of each government resource associated with the government authentication platform, and then encrypts the application identifier and the resource identifier and version number of each government resource to obtain the access identifier of the government resource to the third-party application, so that the access identifiers configured for each government resource on different third-party applications are different, and the access identifier configured for a certain government resource on a third-party application cannot enable another third-party application to access the government resource, thereby ensuring the security of resource access; further, the access identifier of each government resource is issued to the third-party application, and the resource access permission configuration of the third-party application to the government authentication platform is realized, thereby improving the convenience and efficiency of resource access permission configuration.
[0045] Embodiment 2
[0046] Figure 2 A flowchart of a method for configuring resource access rights provided in Embodiment 2 of the present invention. Embodiments of the present invention are optimized on the basis of the above embodiments. Optionally, this embodiment mainly provides a detailed explanation of the specific configuration process and configuration update process of resource access rights for a third-party application facing a government authentication platform.
[0047] For details, see Figure 2 , the method of this embodiment may specifically include:
[0048] S210, in response to an access instruction from a third-party application to the government authentication platform, determine the application identifier of the third-party application, and the resource identifier and version number of each government resource associated with the government authentication platform.
[0049] S220, randomly generate an encryption key for the third-party application to encrypt the application identifier and the resource identifier and version number of each government resource.
[0050] Optionally, in order to facilitate the subsequent encryption of the application identifier of the third-party application and the resource identifier and version number of each government resource, this embodiment will first randomly generate an encryption key for the third-party application, which can be a 32-byte key, recorded as APP_K. Then, the encryption key pre-generated by the third-party application is stored in the corresponding storage system, so that the encryption key can be used to encrypt the application identifier and the resource identifier and version number of each government resource in the future.
[0051] S230, authenticating the government identity of the third-party application, and after the authentication is passed, encrypting the application identifier and the resource identifier and version number of each government resource.
[0052] In this embodiment, in order to ensure the legitimacy of each third-party application accessed by the government authentication platform, this embodiment first needs to authenticate the government identity of the third-party application before receiving the access instruction from the third-party application to the government authentication platform and configuring the resource access rights of the government authentication platform for the third-party application. For example, when a school's campus network application requests access to the Ministry of Education platform, it is first necessary to authenticate whether the school is a real school certified by the Ministry of Education. After the third-party application is authenticated, the application identifier and the resource identifier and version number of each government resource will be encrypted to configure the resource access rights of the third-party application to the government authentication platform.
[0053] S240, for each government resource, encrypt the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for a third-party application.
[0054] S250, issuing access identifiers of each government resource to third-party applications to configure resource access rights of third-party applications for the government authentication platform.
[0055] S260, in response to the resource update operation of the government authentication platform, or in response to the configuration update request of the third-party application, the access identifier of each government resource updated by the government authentication platform is issued to the third-party application to configure and update the resource access rights of the third-party application to the government authentication platform.
[0056] Optionally, when resources such as departments and personnel in the government authentication platform change, the organizational tree structure in the government service system will also change, so that the resource access rights configured in each application also need to be relatively adjusted. Therefore, this embodiment will update the resource access rights after configuring the resource access rights of the third-party application for the government authentication platform. At this time, this embodiment can respond to the resource update operation of the government authentication platform. When it detects that there are changes in the government resources in the government authentication platform, it will re-execute the above steps S210-S240, determine the third-party application's access identifier for each updated government resource in the government authentication platform, and then actively send the access identifier of each updated government resource of the government authentication platform to the third-party application, so as to configure and update the resource access rights of the third-party application for the government authentication platform. Alternatively, the third-party application may periodically report configuration update requests for resource access rights within the government authentication platform to the government service system. In response to the configuration update request of the third-party application, the government service system will re-execute the above steps S210-S240 to determine the access identifier of the third-party application for each updated government resource in the government authentication platform, and then issue the access identifier of each government resource updated by the government authentication platform to the third-party application, so as to regularly configure and update the resource access rights of the third-party application to the government authentication platform, thereby simplifying the complexity of resource access rights configuration and maintenance within the third-party application and improving the efficient and convenient maintenance of resource access rights configuration within the third-party application.
[0057] The technical solution provided in this embodiment, after receiving the access instruction from the third-party application to the government authentication platform, first determines the application identifier of the third-party application, as well as the resource identifier and version number of each government resource associated with the government authentication platform, and then encrypts the application identifier and the resource identifier and version number of each government resource to obtain the access identifier of the government resource to the third-party application, so that the access identifiers configured for each government resource on different third-party applications are different, and the access identifier configured for a certain government resource on a third-party application cannot enable another third-party application to access the government resource, thereby ensuring the security of resource access; further, the access identifier of each government resource is issued to the third-party application, and the resource access permission configuration of the third-party application to the government authentication platform is realized, thereby improving the convenience and efficiency of resource access permission configuration.
[0058] Embodiment 3
[0059] Figure 3A flowchart of a method for configuring resource access rights provided in Embodiment 3 of the present invention. Embodiments of the present invention are optimized on the basis of the above embodiments. Optionally, this embodiment mainly explains in detail the specific access process of a third-party application to a government resource within the government authentication platform after configuring the resource access rights of the third-party application to the government authentication platform.
[0060] For details, see Figure 3 , the method of this embodiment may specifically include:
[0061] S310, in response to an access instruction from a third-party application to the government authentication platform, determine the application identifier of the third-party application, and the resource identifier and version number of each government resource associated with the government authentication platform.
[0062] S320, for each government resource, encrypt the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for a third-party application.
[0063] S330, issuing access identifiers of each government resource to third-party applications to configure resource access rights of third-party applications for the government authentication platform.
[0064] S340 , in response to the access request of the third-party application to the target resource, decrypt the access identifier of the target resource to obtain the resource identifier of the target resource.
[0065] Optionally, after configuring resource access rights for the government authentication platform in a third-party application, the third-party application can access any government resource within the government authentication platform. At this time, the third-party application can report an access request to the target resource to the government authentication platform, and the government authentication platform forwards the access request to the government service system, which then views the detailed information of the target resource.
[0066] Specifically, in response to a third-party application's access request to a target resource, the government service system will first parse the access identifier of the target resource from the access request, and then decrypt the access identifier of the target resource to obtain the resource identifier of the target resource, so as to subsequently use the resource identifier of the target resource to find out the resource access information of the target resource and send it to the third-party application.
[0067] In addition, when decrypting the access identifier of the target resource, the decrypted result of the access identifier of the target resource may also include the corresponding target application identifier and target version number. At this time, in order to ensure the access security of the target resource, this embodiment will compare the target application identifier with the application identifier of the third-party application. If the two are consistent, the target version number and the version number of the target resource will continue to be compared. When the two are consistent, the resource identifier of the target resource is used to send the resource access information of the target resource to the third-party application; if the target application identifier and the application identifier of the third-party application are inconsistent, or the target version number and the version number of the target resource are inconsistent, then an illegal access message of the target resource is sent to the third-party application.
[0068] That is to say, the target application identifier in the access identifier of the target resource is used to verify the application identifier of the third-party application, and it is determined whether the access identifier of the target resource is configured by the third-party application when it accesses the government authentication platform, or is configured by other third-party applications and forwarded to the third-party application. When the two are consistent, it means that the third-party application is a legitimate application accessing the government authentication platform, and then the target version number in the resource identifier of the target resource is used to verify the version number of the target resource to determine whether the target resource has changed after the third-party application accesses the government authentication platform. Only when the target version number is consistent with the version number of the target resource, it is determined that the third-party application has the authority to access the target resource, and then the resource identifier of the target resource is used to view the resource access information of the target resource.
[0069] S350: Use the resource identifier of the target resource to send resource access information of the target resource to the third-party application.
[0070] Optionally, when determining that the third-party application has legitimate access, the resource identifier of the target resource can be used to find the resource access information of the target resource in the government authentication platform and send it to the third-party application to achieve secure access to government resources.
[0071] It should be noted that in order to ensure a reasonable distinction between resource access permission configuration and resource security access by third-party applications, this embodiment will set two different types of interfaces, such as interface A with data permission verification and interface B without data permission. Interface A is used to perform configuration operations of resource access permissions of third-party applications for the government affairs authentication platform, and interface B is used to perform security access operations of third-party applications to a target resource in the government affairs authentication platform.
[0072] The technical solution provided in this embodiment, after implementing the resource access permission configuration of the third-party application for the government authentication platform, the third-party application can determine whether the third-party application has legal access through the application identifier, resource identifier and version number in the access identifier of the target resource. At this time, the access identifiers configured for each government resource on different third-party applications are different. The access identifier configured for a certain government resource on a third-party application cannot enable another third-party application to access the government resource, thereby ensuring the security of resource access.
[0073] Embodiment 4
[0074] Figure 4 A schematic diagram of a configuration device for resource access rights provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the device may include:
[0075] The application access response module 410 is used to respond to the access instruction of the third-party application to the government authentication platform, determine the application identifier of the third-party application, and the resource identifier and version number of each government resource associated with the government authentication platform;
[0076] The access identification determination module 420 is used to encrypt the application identification and the resource identification and version number of each government resource to obtain the access identification of the government resource for the third-party application;
[0077] The access permission configuration module 430 is used to issue the access identification of each government resource to the third-party application to configure the resource access permission of the third-party application to the government authentication platform.
[0078] The technical solution provided in this embodiment, after receiving the access instruction from the third-party application to the government authentication platform, first determines the application identifier of the third-party application, as well as the resource identifier and version number of each government resource associated with the government authentication platform, and then encrypts the application identifier and the resource identifier and version number of each government resource to obtain the access identifier of the government resource to the third-party application, so that the access identifiers configured for each government resource on different third-party applications are different, and the access identifier configured for a certain government resource on a third-party application cannot enable another third-party application to access the government resource, thereby ensuring the security of resource access; further, the access identifier of each government resource is issued to the third-party application, and the resource access permission configuration of the third-party application to the government authentication platform is realized, thereby improving the convenience and efficiency of resource access permission configuration.
[0079] Furthermore, the access identification determination module 420 may be specifically used for:
[0080] For each government resource, the application identifier of the third-party application and the resource identifier and version number of the government resource are merged, and the merged identification information of the government resource is encrypted to obtain an access identifier of the government resource for the third-party application.
[0081] Furthermore, the above-mentioned resource access permission configuration device may also include:
[0082] The key generation module is used to randomly generate an encryption key for the third-party application to encrypt the application identifier and the resource identifier and version number of each government resource.
[0083] Furthermore, the above-mentioned resource access permission configuration device may also include:
[0084] A configuration update module is used to respond to the resource update operation of the government authentication platform, or, in response to the configuration update request of the third-party application, send the access identifier of each government resource updated by the government authentication platform to the third-party application, so as to configure and update the resource access rights of the third-party application to the government authentication platform.
[0085] Furthermore, the above-mentioned resource access permission configuration device may also include:
[0086] The application authentication module is used to authenticate the government identity of the third-party application, so that after the authentication is passed, the application identifier and the resource identifier and version number of each government resource are encrypted.
[0087] Furthermore, the above-mentioned resource access permission configuration device may also include:
[0088] An access identifier decryption module, configured to decrypt the access identifier of the target resource in response to an access request of the third-party application to the target resource, and obtain a resource identifier of the target resource;
[0089] The resource access module is used to send resource access information of the target resource to the third-party application by using the resource identifier of the target resource.
[0090] Furthermore, the decryption result of the access identifier of the target resource may also include a corresponding target application identifier and a target version number.
[0091] Correspondingly, the above-mentioned resource access permission configuration device may also include:
[0092] The access verification module compares the target application identifier with the application identifier of the third-party application, and if the two are consistent, continues to compare the target version number with the version number of the target resource, so as to use the resource identifier of the target resource to send the resource access information of the target resource to the third-party application when the two are consistent;
[0093] The legal access processing module is used to send an illegal access message of the target resource to the third-party application if the target application identifier is inconsistent with the application identifier of the third-party application, or the target version number is inconsistent with the version number of the target resource.
[0094] The device for configuring resource access rights provided in this embodiment can be applied to the method for configuring resource access rights provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0095] Embodiment 5
[0096] Figure 5 This is a schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention. Figure 5 As shown, the computer device includes a processor 50, a storage device 51 and a communication device 52; the number of processors 50 in the computer device can be one or more. Figure 5 A processor 50 is taken as an example; the processor 50, storage device 51 and communication device 52 of the computer device can be connected through a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0097] The storage device 51, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the modules corresponding to the method for configuring resource access rights in the embodiment of the present invention (for example, the application access response module 410, the access identification determination module 420 and the access rights configuration module 430 in the device for configuring resource access rights). The processor 50 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the storage device 51, that is, implements the above-mentioned method for configuring resource access rights.
[0098] The storage device 51 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 51 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some examples, the storage device 51 may further include a memory remotely arranged relative to the multi-function controller 50, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0099] The communication device 52 may be used to implement a network connection or a mobile data connection between devices.
[0100] A computer device provided in this embodiment can be used to execute the resource access permission configuration method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0101] Embodiment 6
[0102] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for configuring resource access rights in any of the above embodiments can be implemented. The method specifically includes:
[0103] In response to an access instruction from a third-party application to the government authentication platform, determine an application identifier of the third-party application, and a resource identifier and version number of each government resource associated with the government authentication platform;
[0104] For each government resource, encrypt the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for the third-party application;
[0105] The access identifier of each government resource is issued to the third-party application to configure the resource access rights of the third-party application to the government authentication platform.
[0106] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided by an embodiment of the present invention are not limited to the method operations described above, and can also execute related operations in the resource access rights configuration method provided by any embodiment of the present invention.
[0107] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0108] It is worth noting that in the embodiment of the above-mentioned resource access permission configuration device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for configuring resource access rights, characterized in that: include: In response to an access instruction from a third-party application to the government authentication platform, an application identifier of the third-party application is determined, and the government authentication platform forwards the received access instruction to the government service system, and the government service system finds the resource identifier and version number of each government resource associated with the government authentication platform from the organizational structure tree preformed for the government authentication platform; For each government resource, encrypt the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for the third-party application; Issuing an access identifier of each government resource to the third-party application to configure resource access rights of the third-party application to the government authentication platform; After issuing the access identifier of each government resource to the third-party application, in response to the access request for the target resource reported by the third-party application to the government authentication platform, the government authentication platform forwards the access request to the government service system, and the government service system parses the access identifier of the target resource from the access request, decrypts the access identifier of the target resource, and obtains the target application identifier, the target version number and the resource identifier of the target resource; Compare the target application identifier with the application identifier of the third-party application, and if the two are consistent, continue to compare the target version number with the version number of the target resource, so as to use the resource identifier of the target resource to send resource access information of the target resource to the third-party application when the two are consistent; If the target application identifier is inconsistent with the application identifier of the third-party application, or the target version number is inconsistent with the version number of the target resource, an illegal access message of the target resource is sent to the third-party application.
2. The method according to claim 1, characterized in that For each government resource, encrypting the application identifier and the resource identifier and version number of the government resource to obtain an access identifier of the government resource for the third-party application includes: For each government resource, the application identifier of the third-party application and the resource identifier and version number of the government resource are merged, and the merged identification information of the government resource is encrypted to obtain an access identifier of the government resource for the third-party application.
3. The method according to claim 1, characterized in that When determining the application identifier of the third-party application, and the resource identifier and version number of each government resource associated with the government authentication platform, it also includes: An encryption key for the third-party application is randomly generated to encrypt the application identifier and the resource identifier and version number of each government resource.
4. The method according to claim 1, characterized in that: After issuing the access identifier of each government resource to the third-party application, the method further includes: In response to the resource update operation of the government authentication platform, or in response to the configuration update request of the third-party application, the access identifier of each government resource updated by the government authentication platform is issued to the third-party application to configure and update the resource access rights of the third-party application to the government authentication platform.
5. The method according to claim 1, characterized in that Before encrypting the application identifier and the resource identifier and version number of each government resource, the method further includes: The government identity of the third-party application is authenticated, and after the authentication is passed, the application identifier and the resource identifier and version number of each government resource are encrypted.
6. A device for configuring resource access rights, characterized in that: include: An application access response module, used to respond to an access instruction from a third-party application to the government authentication platform, determine the application identifier of the third-party application, and forward the received access instruction to the government service system by the government authentication platform, and the government service system finds the resource identifier and version number of each government resource associated with the government authentication platform from the organizational structure tree pre-formed for the government authentication platform; An access identification determination module, used for encrypting the application identification and the resource identification and version number of each government resource to obtain an access identification of the government resource for the third-party application; An access rights configuration module, used to issue an access identifier of each government resource to the third-party application to configure the resource access rights of the third-party application to the government authentication platform; An access identifier decryption module is used for, after issuing the access identifier of each government resource to the third-party application, responding to the access request for the target resource reported by the third-party application to the government authentication platform, the government authentication platform forwarding the access request to the government service system, and the government service system parsing the access identifier of the target resource from the access request, and decrypting the access identifier of the target resource to obtain the target application identifier, the target version number and the resource identifier of the target resource; The access verification module compares the target application identifier with the application identifier of the third-party application, and if the two are consistent, continues to compare the target version number with the version number of the target resource, so as to use the resource identifier of the target resource to send the resource access information of the target resource to the third-party application when the two are consistent; The legal access processing module is used to send an illegal access message of the target resource to the third-party application if the target application identifier is inconsistent with the application identifier of the third-party application, or the target version number is inconsistent with the version number of the target resource.
7. A computer device, characterized in that: The computer device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for configuring resource access rights as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for configuring resource access rights as described in any one of claims 1 to 5 is implemented.
