Database operation and maintenance authentication system, method and device and readable storage medium

Through encryption server and Hmac encryption technology, combined with dynamic asset management and permission verification, the problems of credential leakage, inflexible permission management and high resource usage in traditional database management systems are solved, achieving more efficient and secure database operation and maintenance.

CN118709221APending Publication Date: 2024-09-27NORTH CHINA DIGITAL HEALTH TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410810335.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-21
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Traditional database management systems have problems such as the risk of credential leakage, inflexible permission management, high resource usage, and poor key management, which affect operation and maintenance efficiency and security.

Method used

Adopt encryption server, Hmac encryption technology and dynamic asset management and permission verification mechanism to verify user permissions through asset coding and verification codes, reduce the risk of key leakage, and optimize permission management and resource utilization.

Benefits of technology

It enhances the security of database access, improves operation and maintenance efficiency and system reliability, reduces the risk of data tampering, and avoids excessive occupation of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709221A
    Figure CN118709221A
Patent Text Reader

Abstract

The invention provides a database operation and maintenance authentication system, method and device and a readable storage medium, and belongs to a database management technology. The system comprises an asset management module, an authentication and authority verification module and an encryption server, a database asset table is arranged in the asset management module and used for storage of database asset information and establishment of a mapping relation of database access, and a user authority mapping table and an authority verification table are arranged in the authentication and authority verification module. The encryption server is used for user identity authentication and authority control, and the encryption server is used for generating and storing a secret key and encrypting verification information. According to the method, the verification of the access authority of the user is realized by utilizing a password technology, and the access and operation of the database are completed under the condition that the user does not know the real IP, the user name and the password of the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database management, and more specifically to a database operation and maintenance authentication system, method, device and readable storage medium. Background Art

[0002] In the field of database operation and maintenance, security and efficiency have always been core challenges. Although traditional database management systems provide basic user authentication mechanisms, they often have some technical defects and security risks. For example, direct management of database access usually requires users to directly master the database access credentials (such as IP address, user name and password), which not only increases the risk of credential leakage, but also makes permission management complicated and inflexible. In addition, for database operation and maintenance in large enterprises or cloud environments, frequent manual permission adjustments and asset audits are huge, prone to omissions, and affect operation and maintenance efficiency and security.

[0003] Specifically, traditional database management systems have the following main defects: 1. Direct credential exposure risk: In traditional methods, users directly use database access credentials, which may lead to the widespread dissemination of sensitive information and potential leakage risks. Once the credentials are leaked, malicious users can easily bypass system security protection and illegally access and operate the database.

[0004] 2. Static and inefficient permission management: Most traditional systems have relatively fixed permission configurations, which are difficult to adapt to rapidly changing business needs and dynamic team collaboration models. The permission adjustment process is cumbersome and error-prone, and after the permission is changed, the system often lacks an immediate verification and feedback mechanism, which poses a risk of permission abuse.

[0005] 3. Lack of fine-grained and dynamic auditing: The traditional operation and maintenance model makes it difficult to achieve fine-grained monitoring and recording of database access behavior, which limits the security audit and anomaly detection capabilities. When a security incident occurs, it is difficult to trace and locate the source of the problem.

[0006] 4. Resource usage issues: During high concurrency or business peak periods, real-time verification of all database assets may consume a large amount of computing resources, affecting system performance and user experience.

[0007] 5. Insufficient key management: Keys are often the core of system security, but in some system designs, key management is not strict, which can easily lead to key leakage due to improper storage or distribution, thus endangering the security foundation of the entire system. Summary of the invention

[0008] In view of the above problems, the purpose of the present invention is to provide a database operation and maintenance authentication system, method, device and readable storage medium, which effectively solves the problems of inflexible authority management, weak security audit capability, unreasonable resource occupation and poor key management faced in traditional database operation and maintenance by introducing encryption server, Hmac encryption technology, and dynamic asset management and authority verification mechanism. The present invention not only enhances the security of database access, but also optimizes the operation and maintenance efficiency, and improves the overall reliability and response speed of the system.

[0009] To achieve the above-mentioned purpose, the present invention is implemented through the following technical solutions: a database operation and maintenance authentication system, comprising: an encryption server, an authentication and permission verification module, an asset management module and a database server; the asset management module is respectively connected to the encryption server, the authentication and permission verification module and the database server data, and the authentication and permission verification module is connected to the encryption server data; Encryption server, used to generate, store and manage keys; encrypt and output verification code using Hmac algorithm according to the request of authentication and authority verification module, and encrypt and output asset code using Hmac algorithm according to the request of asset management module; The asset management module is provided with a database asset table, and the authentication and authority verification module is provided with a user authority mapping table and an authority verification table; The asset management module is used to: obtain the database asset information entered or updated by the administrator, call the encryption server to generate asset codes based on the asset information, and write the database asset information and the corresponding asset codes into the database asset table; regularly use the asset codes to proofread the database asset information according to the customized time period; respond to the database access request of the system account and establish a session with the database server; The authentication and permission verification module is used to: establish and record the mapping relationship between system accounts and asset codes through the user permission mapping table; when the permissions of the system account change, retrieve all asset codes mapped under the account in the user permission mapping table and call the encryption server to generate a verification code; store the verification code through the permission verification table; receive the login request of the system account, and use the verification code to check and confirm the system account; The database server is used to verify the database access request of the system account and establish a session with the asset management module after the verification is passed.

[0010] Furthermore, the database asset table is used to record database asset information and corresponding asset codes; the database asset information includes: serial number, asset name, asset address, database account and database account password; the user authority mapping table is used to record the system account, system account password and the asset code mapped under the system account; the authority verification table is used to record the system account, verification code and update time.

[0011] Furthermore, the encryption server is specifically used for: Generate, store and manage key A and key B; Obtain the encryption request and the first character string sent by the asset management module, and encrypt the first character string into asset code A using the Hmac encryption algorithm based on SM3 according to key A; Obtain the encrypted request and the second string sent by the authentication and authority verification module, and encrypt the second string into a verification code A using the Hmac encryption algorithm based on SM3 according to the key B; Obtain the third character string sent by the authentication and authority verification module; encrypt the third character string into verification code B using the Hmac encryption algorithm based on SM3 according to key B.

[0012] Furthermore, the asset management module is specifically used for: Obtain the asset name, asset address, database account, and database account password entered or updated by the administrator, integrate them into a first string, and send it to the encryption server; call the encryption server to generate asset code A, and write the asset name, asset address, database account, database account password, and asset code A into the database asset table; According to the customized time period, the database asset information of the database asset table is retrieved regularly, and the asset name, asset address, database account and database account password are extracted, and integrated into the string to be proofread; the encryption server is called to encrypt the string to be proofread into asset code B according to key A using the Hmac encryption algorithm based on SM3; it is determined whether the asset code A is the same as the asset code B; if so, the proofreading is successful; if not, an alarm message is issued; Respond to the database access request of the system account, log in to the database server according to the database account and database account password recorded in the database asset table, establish a session with the database server, and forward the session to the user.

[0013] Furthermore, the authentication and authority verification module is specifically used for: The mapping relationship between the system account and the asset code A is established and recorded through the user authority mapping table, and the system account and the asset code A are associated and corresponded. The corresponding relationship is a many-to-many mapping; When the authority of a system account changes, all asset codes A mapped under the account are retrieved from the user authority mapping table, and they are arranged in order to generate a second string and send it to the encryption server; the encryption server is called to generate a verification code A; the system account, the corresponding verification code A and the update time are recorded in the authority verification table; Receive a login request from a system account, retrieve all asset codes A mapped under the system account in the user authority mapping table, arrange the asset codes A in sequence, generate a third string and send it to the encryption server; call the encryption server to generate a verification code B; obtain the verification code A of the system account in the authority verification table; determine whether the verification code A is the same as the verification code B; if so, the verification is successful, and the database access request of the system account is responded to through the asset management module; if not, an alarm message is issued.

[0014] Correspondingly, the present invention also discloses a database operation and maintenance authentication method, comprising: Obtain database asset information entered or updated by the administrator, enter the database asset information into the database asset table by executing the asset entry and permission management process, assign database asset information operation permissions to relevant system account permissions, and perform permission verification; Receive login requests from system accounts, verify system accounts by executing identity authentication and permission verification processes, obtain database asset information access requests after verification, log in to the database server using the corresponding database account and database password, establish a session with the database server, and forward the session to the user.

[0015] Furthermore, the asset entry and authority management process includes: Obtain the asset name, asset address, database account and database account password entered or updated by the administrator through the asset management module, update the database asset table, and integrate the asset name, asset address, database account and database account password into a first character string, and send it to the encryption server; The encryption server encrypts the first character string into asset code A using the Hmac encryption algorithm based on SM3 according to key A, and sends it to the asset management module; Enter asset code A into the database asset table through the asset management module; Through the asset management module, the database asset information of the database asset table is retrieved regularly according to the customized time period, the asset name, asset address, database account and database account password are extracted, the encryption server is called and integrated into the string to be proofread, and sent to the encryption server; The encryption server uses the Hmac encryption algorithm based on SM3 according to the key A to encrypt the string to be proofread into the asset code B, and sends it to the asset management module; The asset management module determines whether asset code A and asset code B are the same; if so, the verification is successful; if not, an alarm message is issued; Obtain the asset authority allocation request of the system account through the authentication and authority verification module, update the user authority mapping table based on the asset authority allocation request, and enter the corresponding asset code A; retrieve all asset codes A mapped under the account in the user authority mapping table, arrange them in order, generate a second string and send it to the encryption server; The encryption server encrypts the second string into a verification code A using the Hmac encryption algorithm based on SM3 according to the key B, and sends it to the authentication and authority verification module; Update the verification code A in the permission verification table through the authentication and permission verification module, and record the update time.

[0016] Furthermore, the identity authentication and authority verification process includes: The authentication and permission verification module receives a login request from a system account, retrieves all asset codes A mapped under the system account in the user permission mapping table, arranges the asset codes A in order, generates a third character string and sends it to the encryption server; The encryption server encrypts the third character string into a verification code B using the Hmac encryption algorithm based on SM3 according to the key B, and sends it to the authentication and authority verification module; Obtain the verification code A of the system account from the permission verification table through the authentication and permission verification module; determine whether the verification code A is the same as the verification code B; if so, the verification is successful and a verification pass message is sent to the asset management module; if not, an alarm message is issued; When the asset management module receives the verification pass information, it associates the asset name corresponding to the system account and displays the accessible asset directory to the user; The asset management module obtains the database asset information access request issued by the user based on the accessible asset directory, identifies the corresponding database asset information according to the data asset information access request; finds the corresponding database account and database account password from the database asset table according to the database asset information, and initiates an access request to the database server; The database account and database account password are identified and verified through the database server; if the verification passes, a session is established and forwarded to the user through the asset management module; if the verification fails, an alarm message is issued.

[0017] Accordingly, the present invention discloses a database operation and maintenance authentication device, comprising: A memory device for storing a database operation and maintenance authentication program; A processor is used to implement the steps of the database operation and maintenance authentication method as described in any one of the above items when executing the database operation and maintenance authentication program.

[0018] Accordingly, the present invention discloses a readable storage medium, on which a database operation and maintenance authentication program is stored. When the database operation and maintenance authentication program is executed by a processor, the steps of the database operation and maintenance authentication method as described in any one of the above items are implemented.

[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. The present invention constructs a proxy service for database operation and maintenance, and uses cryptographic technology to verify user access rights, thereby achieving access and operation to the database without the user knowing the real IP address, user name and password of the database.

[0020] 2. The present invention uses Hmac encryption technology to insert key factors into traditional hashes. Depending on the different keys, the same input will produce different values. When the key cannot be obtained, the asset code and verification code in the system cannot be accurately forged, reducing the risk of data tampering, ensuring the integrity and confidentiality of user authority data, and improving system security.

[0021] 3. The present invention establishes a mapping relationship between users and assets by means of asset coding. During each user login process, only the verification code and asset coding need to be processed and proofread, without the need to compare all asset information, which effectively reduces the system calculation amount and improves the response speed.

[0022] 4. The present invention checks the asset codes in the database asset table at a custom time, thereby avoiding excessive occupation of computing resources during business peak hours.

[0023] 5. The key used in the present invention is stored by the encryption server, which effectively reduces the risk of key leakage.

[0024] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0026] Figure 1 It is a system structure diagram of a specific implementation mode of the present invention.

[0027] Figure 2 It is a method flow chart of a specific implementation mode of the present invention.

[0028] Figure 3 It is a flowchart of the asset entry and authority management process of a specific implementation method of the present invention.

[0029] Figure 4 It is a flowchart of the identity authentication and authority verification process of a specific implementation method of the present invention.

[0030] In the figure, 1. Encryption server; 2. Authentication and permission verification module; 3. Asset management module; 4. Database server; 5. Database asset table; 6. User permission mapping table; 7. Permission verification table. DETAILED DESCRIPTION

[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0032] See also Figure 1 As shown, this embodiment provides a database operation and maintenance authentication system, including: an encryption server 1, an authentication and permission verification module 2, an asset management module 3 and a database server 4; the asset management module 3 is respectively connected to the encryption server 1, the authentication and permission verification module 2 and the database server 4, and the authentication and permission verification module 2 is connected to the encryption server 1. Among them, the asset management module 3 is provided with a database asset table 5, and the authentication and permission verification module 2 is provided with a user permission mapping table 6 and a permission verification table 7.

[0033] The database asset table 5 is used to record the database asset information and the corresponding asset code; the database asset information includes: serial number, asset name, asset address, database account and database account password. The user authority mapping table 6 is used to record the system account, system account password and the asset code mapped under the system account. The authority verification table 7 is used to record the system account, verification code and update time.

[0034] The encryption server 1 is used to: generate, store and manage keys; encrypt and output the verification code using the Hmac algorithm according to the request of the authentication and authority verification module 2, and encrypt and output the asset code using the Hmac algorithm according to the request of the asset management module 3.

[0035] The asset management module 3 is used to: obtain the database asset information entered or updated by the administrator, call the encryption server 1 to generate an asset code based on the asset information, and write the database asset information and the corresponding asset code into the database asset table 5; regularly use the asset code to proofread the database asset information according to the customized time period; respond to the database access request of the system account and establish a session with the database server 4.

[0036] The authentication and authority verification module 2 is used to: establish and record the mapping relationship between the system account and the asset code through the user authority mapping table 6; when the authority of the system account changes, retrieve all the asset codes mapped under the account in the user authority mapping table 6 and call the encryption server 1 to generate a verification code; store the verification code through the authority verification table 7; receive the login request of the system account, and use the verification code to proofread and confirm the system account.

[0037] The database server 4 is used to verify the database access request of the system account and establish a session with the asset management module 3 after the verification is passed.

[0038] It should be noted that in this system, two types of accounts are involved, namely, system accounts (master accounts) and database accounts (slave accounts). The system account is used for users to log in to access the database operation and maintenance authentication system disclosed in this application; the database account is used to log in to the database server 4, and a mapping relationship is established between the database account and the system account to achieve proxy access to the database.

[0039] In a specific implementation, the encryption server 1 is responsible for generating, storing, and managing keys, encrypting and outputting verification code A and verification code B according to the request of the authentication and authority verification module 2, and outputting asset code A and asset code B according to the request of the asset management module 3.

[0040] The encryption server 1 is specifically used for: Generate, store and manage key A and key B; Obtain the encryption request and the first character string sent by the asset management module 3, and encrypt the first character string into the asset code A using the Hmac encryption algorithm based on SM3 according to the key A; Obtain the encryption request and the second string sent by the authentication and authority verification module 2, and encrypt the second string into a verification code A using the Hmac encryption algorithm based on SM3 according to the key B; Obtain the third character string sent by the authentication and authority verification module 2; encrypt the third character string into a verification code B using the Hmac encryption algorithm based on SM3 according to the key B.

[0041] In a specific implementation, the asset management module 3 is provided with a database asset table 5 as shown in Table 1 below, which is mainly responsible for the following functions: 1. When the administrator enters or updates the database asset information, the content in the database asset table 5 will be updated synchronously, and the encryption server 1 will be called to use the Hmac algorithm to encrypt the asset information of each database, generate the asset code (asset code A) and write it into the database asset table 5.

[0042] 2. Customizable time period, call the server cryptographic machine to generate a new asset code (asset code B), and check and verify it with the asset code (asset code A) in the database asset table 5.

[0043] 3. Responsible for responding to user access requests and establishing database sessions by filling in account username / password.

[0044] Table 1: Database asset table

[0045] As an example, the asset management module 3 is specifically used for: Obtain the asset name, asset address, database account and database account password entered or updated by the administrator, integrate them into a first string, and send it to the encryption server 1; call the encryption server 1 to generate the asset code A, and write the asset name, asset address, database account, database account password and asset code A into the database asset table 5.

[0046] According to the customized time period, the database asset information of the database asset table 5 is retrieved regularly to extract the asset name, asset address, database account and database account password, and integrate them into a string to be proofread; the encryption server 1 is called to encrypt the string to be proofread into the asset code B according to the key A using the Hmac encryption algorithm based on SM3; it is determined whether the asset code A is the same as the asset code B; if so, the proofreading is successful; if not, an alarm message is issued.

[0047] In response to the database access request of the system account, the database server 4 is logged in according to the database account and database account password recorded in the database asset table 5, a session is established with the database server 4, and the session is forwarded to the user.

[0048] In a specific implementation, the authentication and authority verification module 2 is provided with a user authority mapping table 6 as shown in Table 2 below and an authority verification table 7 as shown in Table 3 below, which are mainly responsible for the following functions: 1. Establish a mapping relationship between the user name (primary account) and the asset code (asset code A) through the user authority mapping table 6.

[0049] 2. The main account information and permission mapping information are stored in the user permission mapping table 6; whenever the user permission changes, all asset codes mapped under the account are retrieved and a verification code (verification code A) is generated.

[0050] 3. Store the verification code (verification code A) through the authority verification table 7.

[0051] 4. When the user logs in, the identity authentication information is verified, and the encryption server 1 is called to generate a new verification code (verification code B), and the verification code A and the verification code B are collated and confirmed.

[0052] Table 2: User permission mapping table

[0053] Table 3: Permission verification table

[0054] As an example, the authentication and authority verification module 2 is specifically used for: The mapping relationship between the system account and the asset code A is established and recorded through the user authority mapping table 6, and the system account and the asset code A are associated and corresponded. The corresponding relationship is a many-to-many mapping.

[0055] When the permissions of a system account change, retrieve all asset codes A mapped under the account in the user permission mapping table 6, arrange them in sequence, generate a second string and send it to the encryption server 1; call the encryption server 1 to generate the verification code A; and record the system account, the corresponding verification code A and the update time through the permission verification table 7.

[0056] Receive a login request from a system account, retrieve all asset codes A mapped under the system account in the user authority mapping table 6, arrange the asset codes A in sequence, generate a third character string and send it to the encryption server 1; call the encryption server 1 to generate a verification code B; obtain the verification code A of the system account in the authority verification table 7; determine whether the verification code A is the same as the verification code B; if so, the verification is successful, and respond to the database access request of the system account through the asset management module 3; if not, issue an alarm message.

[0057] Based on the above database operation and maintenance authentication system, it can be seen that this system has the following functions: 1. In this system, only the administrator account has the management function of assets and user permissions. Every time the administrator enters or updates a database asset, he / she needs to enter the corresponding database IP, port, database account / password and other data, and form a database asset information. Different slave accounts of the same database will form different asset information, as shown in Table 1.

[0058] 2. When entering assets into the database, the system will read the asset name, asset address, account username, account password and other information and integrate them into a long string. It will then call encryption server 1 to generate key A, and use the Hmac encryption algorithm based on SM3 to encrypt the long string into a fixed-length asset code A, and insert it into the asset table.

[0059] 3. After completing asset entry, assets can be allocated to users. By establishing a user-asset mapping relationship, the user's main account and the asset code are associated and mapped. The corresponding relationship is a many-to-many mapping. The specific relationship is shown in Table 2.

[0060] 4. Whenever the asset code corresponding to a master account changes, the asset code mapped under the master account will be rearranged according to the serial number sequence in the user authority mapping table 6 to form a long string, and then the encryption server 1 will be called to generate the key B. The Hmac encryption algorithm based on SM3 is used to encrypt the long string into a fixed-length verification code, and it is written into the permission verification table 7 together with the master account information and update time, as shown in Table 3.

[0061] 5. When the master account logs in, after the username / password is verified, the verification code A corresponding to the account in the permission verification table 7 will be retrieved, and all asset codes corresponding to the corresponding account in the user permission mapping table 6 will be retrieved and the key B stored in the encryption server 1 will be used to form a new verification code B, and the verification code A will be proofread with the verification code B. If the proofreading passes, the permission authentication is completed and the accessible assets are displayed to the user. If the verification fails, an alarm will be issued and the login will be denied.

[0062] 6. After the user completes the login, the system can associate the database assets accessible to the account through asset code A, and complete the filling of the account and password in the background to ensure that the user cannot access the real IP and username / password of the database during the access process.

[0063] 7. This system can be set at a fixed time to automatically retrieve the data in the database asset table 5 row by row during business idleness, and call the key A stored in the encryption server 1 to generate a new asset code B, and check it with the asset code A stored in the database asset table 5. If a code match is found, all accounts are prohibited from accessing the asset and an alarm is issued.

[0064] See also Figure 2 As shown, based on the above database operation and maintenance authentication system, the present invention also discloses a database operation and maintenance authentication method, comprising the following steps: S1: Obtain the database asset information entered or updated by the administrator, enter the database asset information into the database asset table by executing the asset entry and permission management process, assign the operation permissions of the database asset information to the relevant system account permissions, and perform permission verification.

[0065] S2: Receive the login request from the system account, verify the system account by executing the identity authentication and permission verification process, and obtain the database asset information access request after the verification passes, use the corresponding database account and database password to log in to the database server, establish a session with the database server, and forward the session to the user.

[0066] In a specific embodiment, Figure 3 As shown, the asset entry and authority management process in step S1 is as follows: (1.1) Obtain the asset name, asset address, database account and database account password entered or updated by the administrator through the asset management module, update the database asset table, and integrate the asset name, asset address, database account and database account password into a first character string, and send it to the encryption server.

[0067] (1.2) The encryption server uses the Hmac encryption algorithm based on SM3 according to the key A to encrypt the first string into the asset code A, and sends it to the asset management module.

[0068] (1.3) Enter asset code A into the database asset table through the asset management module.

[0069] (1.4) Through the asset management module, the database asset information of the database asset table is retrieved regularly according to the customized time period, the asset name, asset address, database account and database account password are extracted, the encryption server is called and integrated into the string to be proofread, and then sent to the encryption server.

[0070] (1.5) The encryption server uses the SM3-based Hmac encryption algorithm according to key A to encrypt the string to be proofread into asset code B and send it to the asset management module.

[0071] (1.6) The asset management module determines whether asset code A and asset code B are the same; if so, the verification is successful; if not, an alarm message is issued.

[0072] (1.7) Obtain the asset authority allocation request of the system account through the authentication and authority verification module, update the user authority mapping table based on the asset authority allocation request, and enter the corresponding asset code A; retrieve all asset codes A mapped under the account in the user authority mapping table, arrange them in sequence, generate a second string and send it to the encryption server.

[0073] (1.8) The encryption server uses the Hmac encryption algorithm based on SM3 according to the key B to encrypt the second string into the verification code A, and sends it to the authentication and authority verification module.

[0074] (1.9) Update the verification code A in the permission verification table through the authentication and permission verification module, and record the update time.

[0075] In a specific embodiment, Figure 4 As shown, the identity authentication and authority verification process in step S2 is specifically as follows.

[0076] (2.1) Receive the login request of the system account through the authentication and permission verification module, retrieve all asset codes A mapped under the system account in the user permission mapping table, arrange the asset codes A in sequence, generate a third character string and send it to the encryption server.

[0077] (2.2) The encryption server uses the Hmac encryption algorithm based on SM3 according to the key B to encrypt the third character string into a verification code B, and sends it to the authentication and authority verification module.

[0078] (2.3) Obtain the verification code A of the system account from the permission verification table through the authentication and permission verification module; determine whether the verification code A is the same as the verification code B; if so, the verification is successful and a verification pass message is sent to the asset management module; if not, an alarm message is issued.

[0079] (2.4) When the asset management module receives the verification pass information, it associates the asset name corresponding to the system account and displays the accessible asset directory to the user.

[0080] (2.5) Obtain the database asset information access request issued by the user based on the accessible asset directory through the asset management module, identify the corresponding database asset information according to the data asset information access request; find the corresponding database account and database account password from the database asset table according to the database asset information, and initiate an access request to the database server.

[0081] (2.6) The database account and database account password are identified and verified through the database server; if the verification passes, a session is established and forwarded to the user through the asset management module; if the verification fails, an alarm message is issued.

[0082] The present invention also discloses a database operation and maintenance authentication device, comprising a processor and a memory; wherein the processor implements the steps of any of the above-mentioned database operation and maintenance authentication methods when executing the database operation and maintenance authentication program stored in the memory.

[0083] Furthermore, the database operation and maintenance authentication device in this embodiment may also include: The input interface is used to obtain the database operation and maintenance authentication program imported from the outside, and save the obtained database operation and maintenance authentication program to the memory, and can also be used to obtain various instructions and parameters transmitted by the external terminal device, and transmit them to the processor, so that the processor can use the above various instructions and parameters to carry out corresponding processing. In this embodiment, the input interface can specifically include but is not limited to a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.

[0084] The output interface is used to output various data generated by the processor to the terminal device connected thereto, so that other terminal devices connected to the output interface can obtain various data generated by the processor. In this embodiment, the output interface may specifically include but is not limited to a USB interface, a serial interface, etc.

[0085] The communication unit is used to establish a remote communication connection between the database operation and maintenance authentication device and the external server so that the database operation and maintenance authentication device can mount the image file to the external server. In this embodiment, the communication unit may specifically include but is not limited to a remote communication unit based on wireless communication technology or wired communication technology.

[0086] The keyboard is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.

[0087] The display is used to display the relevant information of the database operation and maintenance authentication process in real time.

[0088] The mouse can be used to assist users in inputting data and simplify user operations.

[0089] The present invention also discloses a readable storage medium, wherein the readable storage medium includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM or any other form of storage medium known in the technical field. The readable storage medium stores a database operation and maintenance authentication program, and when the database operation and maintenance authentication program is executed by a processor, the steps of the database operation and maintenance authentication method described in any one of the above items are implemented.

[0090] In summary, the present invention constructs a proxy service for database operation and maintenance, and uses cryptographic technology to verify user access rights, thereby achieving access and operation to the database without the user knowing the real IP address, user name and password of the database.

[0091] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. As for the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0092] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0093] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0094] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0095] The above is a detailed introduction to the database operation and maintenance authentication system, method, device and readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A database operation and maintenance authentication system, It is characterized in that include: Encryption server, authentication and permission verification module, asset management module and database server; The asset management module is connected to the encryption server, the authentication and authority verification module and the database server respectively, and the authentication and authority verification module is connected to the encryption server; Encryption server, used to generate, store and manage keys; According to the request of the authentication and permission verification module, the Hmac algorithm is used to encrypt and output the verification code, and according to the request of the asset management module, the Hmac algorithm is used to encrypt and output the asset code; The asset management module is provided with a database asset table, and the authentication and authority verification module is provided with a user authority mapping table and an authority verification table; The asset management module is used to: obtain the database asset information entered or updated by the administrator, call the encryption server to generate asset codes based on the asset information, and write the database asset information and the corresponding asset codes into the database asset table; regularly use the asset codes to proofread the database asset information according to the customized time period; respond to the database access request of the system account and establish a session with the database server; The authentication and permission verification module is used to: establish and record the mapping relationship between system accounts and asset codes through the user permission mapping table; when the permissions of the system account change, retrieve all asset codes mapped under the account in the user permission mapping table and call the encryption server to generate a verification code; store the verification code through the permission verification table; Receive a login request from a system account and use a verification code to verify the system account; The database server is used to verify the database access request of the system account and establish a session with the asset management module after the verification is passed.

2. The database operation and maintenance authentication system according to claim 1, It is characterized in that The database asset table is used to record database asset information and corresponding asset codes; Database asset information includes: serial number, asset name, asset address, database account and database account password; The user authority mapping table is used to record the system account, the system account password and the asset code mapped under the system account; The permission verification table is used to record system accounts, verification codes and update times.

3. The database operation and maintenance authentication system according to claim 2, It is characterized in that The encryption server is specifically used for: Generate, store and manage key A and key B; Obtain the encryption request and the first character string sent by the asset management module, and encrypt the first character string into asset code A using the Hmac encryption algorithm based on SM3 according to key A; Obtain the encrypted request and the second string sent by the authentication and authority verification module, and encrypt the second string into a verification code A using the Hmac encryption algorithm based on SM3 according to the key B; Get the third character string sent by the authentication and permission verification module; The third character string is encrypted into a verification code B according to the key B using the Hmac encryption algorithm based on SM3.

4. The database operation and maintenance authentication system according to claim 3, It is characterized in that The asset management module is specifically used for: Obtain the asset name, asset address, database account, and database account password entered or updated by the administrator, integrate them into a first string, and send it to the encryption server; call the encryption server to generate asset code A, and write the asset name, asset address, database account, database account password, and asset code A into the database asset table; According to the customized time period, the database asset information of the database asset table is retrieved regularly, and the asset name, asset address, database account and database account password are extracted, and integrated into the string to be proofread; the encryption server is called to encrypt the string to be proofread into asset code B according to key A using the Hmac encryption algorithm based on SM3; it is determined whether the asset code A is the same as the asset code B; if so, the proofreading is successful; if not, an alarm message is issued; Respond to the database access request of the system account, log in to the database server according to the database account and database account password recorded in the database asset table, establish a session with the database server, and forward the session to the user.

5. The database operation and maintenance authentication system according to claim 4, It is characterized in that The authentication and authority verification module is specifically used for: The mapping relationship between the system account and the asset code A is established and recorded through the user authority mapping table, and the system account and the asset code A are associated and corresponded. The corresponding relationship is a many-to-many mapping; When the authority of a system account changes, all asset codes A mapped under the account are retrieved from the user authority mapping table, and they are arranged in order to generate a second string and send it to the encryption server; the encryption server is called to generate a verification code A; the system account, the corresponding verification code A and the update time are recorded in the authority verification table; Receive a login request from a system account, retrieve all asset codes A mapped under the system account in the user authority mapping table, arrange the asset codes A in sequence, generate a third string and send it to the encryption server; call the encryption server to generate a verification code B; obtain the verification code A of the system account in the authority verification table; determine whether the verification code A is the same as the verification code B; if so, the verification is successful, and the database access request of the system account is responded to through the asset management module; if not, an alarm message is issued.

6. A database operation and maintenance authentication method, Features: The method adopts the database operation and maintenance authentication system according to any one of claims 1 to 5; The method comprises: Obtain database asset information entered or updated by the administrator, enter the database asset information into the database asset table by executing the asset entry and permission management process, assign database asset information operation permissions to relevant system account permissions, and perform permission verification; Receive login requests from system accounts, verify system accounts by executing identity authentication and permission verification processes, obtain database asset information access requests after verification, log in to the database server using the corresponding database account and database password, establish a session with the database server, and forward the session to the user.

7. The database operation and maintenance authentication method according to claim 6, It is characterized in that The asset entry and authority management process includes: Obtain the asset name, asset address, database account and database account password entered or updated by the administrator through the asset management module, update the database asset table, and integrate the asset name, asset address, database account and database account password into a first character string, and send it to the encryption server; The encryption server encrypts the first character string into asset code A using the Hmac encryption algorithm based on SM3 according to key A, and sends it to the asset management module; Enter asset code A into the database asset table through the asset management module; Through the asset management module, the database asset information of the database asset table is retrieved regularly according to the customized time period, the asset name, asset address, database account and database account password are extracted, the encryption server is called and integrated into the string to be proofread, and sent to the encryption server; The encryption server uses the Hmac encryption algorithm based on SM3 according to the key A to encrypt the string to be proofread into the asset code B, and sends it to the asset management module; The asset management module determines whether asset code A and asset code B are the same; if so, the verification is successful; if not, an alarm message is issued; Obtain the asset authority allocation request of the system account through the authentication and authority verification module, update the user authority mapping table based on the asset authority allocation request, and enter the corresponding asset code A; retrieve all asset codes A mapped under the account in the user authority mapping table, arrange them in order, generate a second string and send it to the encryption server; The encryption server encrypts the second string into a verification code A using the Hmac encryption algorithm based on SM3 according to the key B, and sends it to the authentication and authority verification module; Update the verification code A in the permission verification table through the authentication and permission verification module, and record the update time.

8. The database operation and maintenance authentication method according to claim 7, It is characterized in that The identity authentication and authority verification process includes: The authentication and permission verification module receives a login request from a system account, retrieves all asset codes A mapped under the system account in the user permission mapping table, arranges the asset codes A in order, generates a third character string and sends it to the encryption server; The encryption server encrypts the third character string into a verification code B using the Hmac encryption algorithm based on SM3 according to the key B, and sends it to the authentication and authority verification module; Obtain the verification code A of the system account from the permission verification table through the authentication and permission verification module; determine whether the verification code A is the same as the verification code B; if so, the verification is successful and a verification pass message is sent to the asset management module; if not, an alarm message is issued; When the asset management module receives the verification pass information, it associates the asset name corresponding to the system account and displays the accessible asset directory to the user; The asset management module obtains the database asset information access request issued by the user based on the accessible asset directory, identifies the corresponding database asset information according to the data asset information access request; finds the corresponding database account and database account password from the database asset table according to the database asset information, and initiates an access request to the database server; The database account and database account password are identified and verified through the database server; if the verification passes, a session is established and forwarded to the user through the asset management module; if the verification fails, an alarm message is issued.

9. A database operation and maintenance authentication device, It is characterized in that include: A memory device for storing a database operation and maintenance authentication program; A processor, used to implement the steps of the database operation and maintenance authentication method as described in any one of claims 6 to 8 when executing the database operation and maintenance authentication program.

10. A readable storage medium, Features: The readable storage medium stores a database operation and maintenance authentication program, which, when executed by a processor, implements the steps of the database operation and maintenance authentication method according to any one of claims 6 to 8.