Confidential information processing method and device, electronic equipment and storage medium

By encrypting, storing and decrypting confidential information before the business server runs the business, the decrypted information is only obtained during business operations, which solves the problem of insufficient security of confidential information custody in the existing technology and improves the security of information and business operations. stability.

CN118694553APending Publication Date: 2024-09-24TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310328079.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In the existing technology, confidential information is easily leaked due to malicious scanning when it is hosted in a code warehouse, and the security of the cloud configuration center is difficult to guarantee, resulting in insufficient security of confidential information in business operations.

Method used

By encrypting and storing confidential information in other servers or databases before the business server runs the business, the business server only holds the encrypted confidential information ciphertext and corresponding identification, avoiding direct storage of confidential information and only decrypting and obtaining it during business operations. Ensure that confidential information is used as temporary data.

Benefits of technology

It effectively reduces the risk of confidential information leakage, improves the security of business servers, avoids information leakage caused by malicious scanning or configuration file leakage, and improves the security of confidential information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694553A
    Figure CN118694553A
Patent Text Reader

Abstract

The invention provides a confidential information processing method and device, electronic equipment, a computer program product and a computer readable storage medium. The method comprises the steps that a service registration request for a service server is received, and the service registration request carries confidential information; encrypting the confidential information to obtain a confidential information ciphertext; distributing a confidential information identifier to the confidential information ciphertext, and sending the confidential information identifier to a service server; a confidential information request sent by the business server is received, and the confidential information request carries a confidential information identifier; querying a confidential information ciphertext corresponding to a confidential information identifier from a database based on the confidential information identifier carried by the confidential information request; decrypting the confidential information ciphertext to obtain confidential information; the confidential information is sent to the business server, and the confidential information is used for the business server to execute business operation. According to the invention, the risk of leakage of confidential information can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a method, device, electronic device and storage medium for processing confidential information. Background Art

[0002] In the existing technology, confidential information such as credentials and keys are uploaded to the code repository along with the project code for hosting. If there is malicious scanning of the code repository, the credentials and keys will be leaked. If it is an open source project, such unintentional leakage will cause a large-scale accident. In order to improve security, the credentials and keys will be placed in the cloud configuration center, but leakage is inevitable.

[0003] There is currently no better way to improve the security of confidential information during business operations using relevant technologies. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium, and computer program product for processing confidential information, which can reduce the risk of confidential information leakage.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present invention provides a method for processing confidential information, the method comprising:

[0007] receiving a service registration request for a service server, wherein the service registration request carries confidential information;

[0008] Encrypting the confidential information to obtain a ciphertext of the confidential information;

[0009] Assigning a confidential information identifier to the confidential information ciphertext, and sending the confidential information identifier to the business server;

[0010] receiving a confidential information request sent by the business server, wherein the confidential information request carries the confidential information identifier;

[0011] Based on the confidential information identifier carried in the confidential information request, querying the database for confidential information ciphertext corresponding to the confidential information identifier;

[0012] Decrypting the confidential information ciphertext to obtain the confidential information;

[0013] The confidential information is sent to the service server, wherein the confidential information is used by the service server to perform service operations.

[0014] The present application provides a confidential information processing device, including:

[0015] An information management module, configured to receive a service registration request for a service server, wherein the service registration request carries confidential information;

[0016] An encryption and decryption module, configured to encrypt the confidential information to obtain a ciphertext of the confidential information;

[0017] The information management module is configured to assign a confidential information identifier to the confidential information ciphertext and send the confidential information identifier to the business server;

[0018] an information reading module, configured to receive a confidential information request sent by the business server, wherein the confidential information request carries the confidential information identifier;

[0019] The information reading module is configured to query the confidential information ciphertext corresponding to the confidential information identifier from the database based on the confidential information identifier carried in the confidential information request;

[0020] The encryption and decryption module is configured to decrypt the confidential information ciphertext to obtain the confidential information;

[0021] The information reading module is configured to send the confidential information to the business server, wherein the confidential information is used for the business server to perform business operations.

[0022] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0023] A memory for storing computer executable instructions;

[0024] The processor is used to implement the confidential information processing method provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.

[0025] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing a method for processing confidential information provided by an embodiment of the present application when executed by a processor.

[0026] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the confidential information processing method provided by the embodiment of the present application is implemented.

[0027] The embodiments of the present application have the following beneficial effects:

[0028] By encrypting and storing the confidential information required for executing business operations in other servers or databases before the business server runs the business, the business server holds the confidential information identifier corresponding to the encrypted confidential information ciphertext, thereby avoiding the leakage of confidential information due to malicious scanning code when the confidential information is directly stored in the database or configuration file of the business server; by sending decrypted confidential information to the business server when the business server sends a confidential information request carrying the confidential information identifier, the business server only obtains the confidential information when performing business operations, thereby realizing the confidential information as temporary data for the business server to perform business operations. Compared with storing the confidential information in the business server, the security of the confidential information is improved and the leakage of the confidential information of the business server is avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a schematic diagram of an application mode of the method for processing confidential information provided in an embodiment of the present application;

[0030] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0031] FIG. 3A to FIG. 3D It is a flowchart of a method for processing confidential information provided in an embodiment of the present application;

[0032] FIG. 4A to FIG. 4C is a schematic diagram of a human-computer interaction interface provided in an embodiment of the present application;

[0033] Figure 5 It is a structural diagram of a confidential information processing system provided in an embodiment of the present application;

[0034] FIG. 6A to FIG. 6B It is a flowchart of a method for processing confidential information provided in an embodiment of the present application;

[0035] Figure 6C It is a schematic diagram of the principle of authentication and authorization provided in the embodiment of the present application;

[0036] Fig. 7A It is a schematic diagram of the principle of remote disaster recovery provided by the embodiment of the present application;

[0037] Figure 7B It is a schematic diagram of the principle of remote disaster recovery of the hardware security module provided in an embodiment of the present application;

[0038] Figure 8 It is a schematic diagram of the interactive flow of the confidential information processing method provided in the embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0040] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0041] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0042] It should be pointed out that in the embodiments of the present application, related data such as user information and user feedback data are involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0044] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0045] 1) Key: A key is a parameter that is input into an algorithm that converts plaintext to ciphertext or ciphertext to plaintext. Keys are divided into symmetric keys and asymmetric keys.

[0046] 2) Data Encryption Key (DEK): In cryptography, a key used to encrypt or decrypt data but not used to encrypt or decrypt other keys.

[0047] 3) Credentials: Network credentials are accounts and passwords stored on the local computer in order to access network resources. When users access resources, they can access them without entering their accounts and passwords.

[0048] 4) Hardware Security Module (HSM): A computer hardware device used to protect and manage digital keys used in strong authentication systems and provide related cryptographic operations.

[0049] 5) MySql is a relational database management system (RDBMS) developed by Swedish MySQL AB and is a product of Oracle. The SQL language used is the most commonly used standardized language for accessing databases.

[0050] 6) Kafka is an open source stream processing platform developed by the Apache Software Foundation, written in Scala and Java. It is a distributed publish-subscribe messaging system that provides a unified, high-throughput, low-latency messaging platform for real-time data.

[0051] 7) RSA public key cryptography, a cryptography system that uses different encryption keys and decryption keys, and "it is computationally infeasible to derive the decryption key from a known encryption key."

[0052] 8) Salt encoding, in cryptography, refers to inserting a specific string at any fixed position in the password so that the hashed result does not match the hashed result using the original password. This process is called "salt encoding".

[0053] 9) Software Development Kit (SDK), a collection of development tools such as specific software packages, software frameworks, hardware platforms, operating systems, etc. for building application software.

[0054] The embodiments of the present application provide a method for processing confidential information, a device for processing confidential information, an electronic device, a computer-readable storage medium, and a computer program product, which can reduce the risk of confidential information leakage.

[0055] The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as a laptop, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a vehicle terminal, a virtual reality (VR) device, an augmented reality (AR) device, and other types of user terminals, and can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.

[0056] refer to Figure 1 , Figure 1 It is a schematic diagram of the application mode of the confidential information processing method provided in the embodiment of the present application; for example, Figure 1 The present invention involves a hosting server 201, a business server 202, a network 300 and a terminal device 400. The hosting server 201 and the business server 202 communicate with each other through the network 300, and the terminal device 400 is connected to the hosting server 201 and the business server 202 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0057] In some embodiments, the confidential information may be a key, a password or a credential, the hosting server 201 may be a server of an information hosting cloud platform, and the business run by the business server 202 may be any business that requires confidential information, such as login information authentication, authorization, etc. The terminal device 400 is a terminal device used by a business administrator, and the key is taken as an example, and the above examples are used for explanation.

[0058] For example, the administrator inputs the key corresponding to the business (that is, confidential information) through the terminal device 400, and the terminal device 400 uploads the business registration request carrying the confidential information to the hosting server 201 through the network. The hosting server 201 encrypts the confidential information and stores it in the database 500, assigns a confidential information identifier to the confidential information, and sends the confidential information identifier to the business server 202. When the business server 202 needs the key corresponding to the business, it sends a confidential information request carrying the confidential information identifier to the hosting server 201. The hosting server 201 obtains the confidential information ciphertext from the database 500 based on the confidential information identifier, decrypts the confidential information ciphertext to obtain the confidential information, and sends the confidential information to the business server 202, so that the business server 202 can perform related business based on the confidential information.

[0059] In some embodiments, the confidential information processing method of the embodiments of the present application can also be applied in the following application scenarios:

[0060] 1. Acquisition of encrypted data in the database. Assuming that the confidential information is the credentials, by calling the confidential information processing method provided in the embodiment of the present application, the credentials used by the business server when calling data from the business database are not directly stored in the business server, thereby avoiding credential leakage and improving the security of the business operation of the business server.

[0061] 2. Data encryption. Assuming that the confidential information is a password or a key, by calling the confidential information processing method provided in the embodiment of the present application, the key or password of the business data required by the business server is not directly stored in the business server, thereby avoiding key leakage caused by malicious scanning code and improving data security.

[0062] The embodiments of the present application can be implemented through blockchain technology, and the confidential information identification of the embodiments of the present application can be uploaded to the blockchain for storage, and the reliability of the confidential information identification is guaranteed by the consensus algorithm. Blockchain is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods, each of which contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0063] The embodiments of the present application can be implemented through database technology. In short, a database can be regarded as an electronic file cabinet where electronic files are stored. Users can add, query, update, delete, etc. data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application program.

[0064] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as Structured Query Language (SQL), XQuery; or according to performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages ​​at the same time.

[0065] The embodiments of the present application can also be implemented through cloud technology. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application. It can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, as well as the promotion of search services, social networks, mobile commerce and open collaboration, each item may have its own hash code identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0066] The embodiments of the present application can be implemented through cloud security technology, which refers to the general term for security software, hardware, users, organizations, and security cloud platforms based on cloud computing business model applications. Cloud security integrates emerging technologies and concepts such as parallel processing, grid computing, and unknown virus behavior judgment. Through a large number of meshed clients, it monitors the abnormal behavior of software in the network, obtains the latest information of Trojans and malicious programs on the Internet, and sends it to the server for automatic analysis and processing, and then distributes virus and Trojan solutions to each client.

[0067] The main research directions of cloud security include: 1. Cloud computing security, which mainly studies how to ensure the security of the cloud itself and various applications on the cloud, including cloud computer system security, secure storage and isolation of user data, user access authentication, information transmission security, network attack protection, compliance auditing, etc.; 2. Cloudification of security infrastructure, which mainly studies how to use cloud computing to build and integrate security infrastructure resources and optimize security protection mechanisms, including building a large-scale security event, information collection and processing platform through cloud computing technology, realizing the collection and correlation analysis of massive information, and improving the control ability of security events and risk control capabilities of the entire network; 3. Cloud security services, which mainly studies various security services provided to users based on cloud computing platforms, such as antivirus services.

[0068] In some embodiments, a hardware security device is embedded in the hosting server 201, and a software development kit is included in the business server 202. The hosting server 201 can be implemented as an encryption and decryption server, a name server, and a hardware security device.

[0069] In some embodiments, the hosting server 201 and the business server 202 may be independent physical servers, or server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The electronic device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.

[0070] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device may be a server 200, Figure 2 The server 200 in the example is Figure 1 Hosting server 201, Figure 2 The server 200 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the server 200 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0071] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0072] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0073] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0074] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0075] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0076] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0077] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The processing device 455 of confidential information stored in the memory 450 is shown, which can be software in the form of programs and plug-ins, including the following software modules: information management module 4551, encryption and decryption module 4552, information reading module 4553, these modules are logical, so according to the functions implemented, they can be arbitrarily combined or further split. The functions of each module will be described below.

[0078] The method for processing confidential information provided by the embodiment of the present application will be explained in combination with the exemplary application and implementation of the terminal provided by the embodiment of the present application.

[0079] The following describes the confidential information processing method provided by the embodiment of the present application. As mentioned above, the electronic device that implements the confidential information processing method of the embodiment of the present application may be a server. Therefore, the execution subject of each step will not be repeatedly described below.

[0080] It should be noted that in the examples of confidential information processing below, keys and credentials are used as examples. Based on their understanding of the following text, those skilled in the art can apply the confidential information processing method provided in the embodiments of the present application to the processing of other types of confidential information.

[0081] See also Figure 3A , Figure 3A is a flow chart of a method for processing confidential information provided by an embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.

[0082] In step 301, a service registration request for a service server is received.

[0083] Here, the service registration request carries confidential information.

[0084] For example, the service registration request may be sent by a service server, for example, a service registration request carrying confidential information automatically sent by the service server to a platform for hosting confidential information.

[0085] For example, the types of confidential information include: data keys, passwords, network credentials, copyright authentication information, etc. Information that needs to be kept confidential. The embodiments of the present application are applicable to any type of confidential information, and the following description will be made using data keys and network credentials as examples.

[0086] In step 302, the confidential information is encrypted to obtain a ciphertext of the confidential information.

[0087] For example, the execution subject is a hosting server as an example for explanation. The encryption and decryption software integrated in the hosting server can be used to encrypt and process the confidential information ciphertext. Alternatively, the encryption and processing can be performed through the hardware security device built into the hosting server to obtain the confidential information ciphertext. The hardware security device can also be an independent device independent of the hosting server.

[0088] In step 303, a confidential information identifier is assigned to the confidential information ciphertext, and the confidential information identifier is sent to the service server.

[0089] Here, the confidential information identifier is sent so that the business server configures the confidential information identifier.

[0090] For example, after the confidential information ciphertext is assigned a confidential information identifier, the confidential information ciphertext and the confidential information identifier are bound to each other and the two are stored in a database.

[0091] In some embodiments, the business server performs configuration according to the confidential information identification configuration request in a manner that includes at least one of the following:

[0092] Method 1: write the confidential information identifier into the configuration file of the business server in a preset encapsulation format; for example, the preset encapsulation format is a format that is different from other information in the configuration file of the business server, and is used to distinguish the confidential information identifier from other information to facilitate extraction of the confidential information identifier from the configuration file.

[0093] Method 2: Write the confidential information identifier into the configuration server. For example, the configuration server may be an entity independent of the business server, such as a configuration center server.

[0094] In the embodiment of the present application, by writing the confidential information identifier into the configuration file and configuration server of the business server, it is convenient for the business server to identify the confidential information when it needs to apply the confidential information, and at the same time ensures that the confidential information does not directly appear in the configuration file and configuration server corresponding to the business server, thereby improving the security of the confidential information.

[0095] In some embodiments, a service registration request may be sent through a terminal device and the service server may be configured with a confidential information identifier. For example, a service registration request carrying confidential information uploaded by a user may be configured with a confidential information identifier for the service server.

[0096] refer to Figure 3B , Figure 3B is a flow chart of a method for processing confidential information provided by an embodiment of the present application; Figure 3B Steps 308 to 310 in the configuration of confidential information identification in the business service.

[0097] In step 308, in response to receiving the confidential information hosting request sent by the terminal device, the confidential information carried in the confidential information hosting request is encrypted to obtain a confidential information ciphertext.

[0098] For example, the user can actively input the corresponding confidential information in the terminal device, and the terminal device sends a confidential information hosting request carrying the confidential information to the hosting server, so that the hosting server performs encryption processing.

[0099] In step 309, the ciphertext of the confidential information is stored in the database.

[0100] For example, the confidential information ciphertext and the confidential information identifier assigned to the confidential information ciphertext are bound and stored together in a database, so as to facilitate retrieval of the confidential information ciphertext in the database.

[0101] In step 310, a confidential information identifier is assigned to the confidential information ciphertext, and the confidential information identifier is sent to the terminal device, so that the terminal device sends a confidential information identifier configuration request to the service server.

[0102] Here, the confidential information identifier configuration request carries the confidential information identifier. For example, the principle of configuring the confidential information identifier of the business server has been explained above, and will not be repeated here.

[0103] In the embodiment of the present application, users can upload confidential information to the hosting server for hosting and implement the configuration of the business server. The embodiment of the present application is highly versatile and improves the security of confidential information.

[0104] Continue to refer Figure 3A In step 304, a confidential information request sent by a business server is received.

[0105] Here, the confidential information request carries a confidential information identifier;

[0106] For example, when a business server has a business operation requirement, a confidential information request carrying a confidential information identifier is generated. For different confidential information identifier configuration methods, the business server generates a confidential information request in the following ways:

[0107] Method 1: loading a software development kit, scanning a configuration file through the software development kit, reading a confidential information identifier from the preset packaging format in response to scanning a preset packaging format, and generating a confidential information request based on the confidential information identifier;

[0108] Method 2: Load the software development kit, read the configured confidential information identifier from the configuration server through the software development kit, and generate a confidential information request based on the confidential information identifier.

[0109] In the embodiment of the present application, a confidential information identifier is extracted from a configuration server or a configuration file through a software development kit, thereby improving the efficiency of extracting the confidential information identifier.

[0110] In some embodiments, the confidential information request also carries a business server identifier and a digital signature; before step 305, the confidential information request is authenticated in the following manner: extracting the business server identifier and the digital signature (Key) from the confidential information request. In response to querying the business server identifier from the preset access permission list and successfully verifying the digital signature, it is determined that the business server has passed the service authentication.

[0111] For example, the business server identifier can be queried from a preset access permission list through the gateway device. The access permission list includes: the identifiers of the business servers with access permissions. If the business server identifier carried by the confidential information request is included in the access permission list, it means that the business server has the following permissions: the permission to access the gateway between the business server and the hosting server.

[0112] For example, the digital signature can be verified in the following manner: decrypt the digital signature based on the public key of a preset business server to obtain first hash data; determine second hash data identified by the business server; and in response to the first hash data being the same as the second hash data, determine that the digital signature authentication is successful.

[0113] In some embodiments, when the authentication is successful, before step 305, the confidential information request is authenticated in the following manner: in response to querying the confidential information identifier from the confidential information identifier list preset in the encryption and decryption server, it is determined that the business server passes the confidential information access authentication.

[0114] For example, the confidential information identification list includes: confidential information identifications of confidential information of different business servers. If a confidential information identification is found in the confidential information identification list, it means that the business service corresponding to the business server has pre-registered the business in the hosting server and has access rights.

[0115] Continue to refer Figure 3A In step 305, based on the confidential information identifier carried in the confidential information request, the confidential information ciphertext corresponding to the confidential information identifier is queried from the database.

[0116] For example, the above text illustrates that there is a corresponding relationship between the confidential information ciphertext and the confidential information identifier, and the two are stored in the database. Based on the confidential information identifier, the corresponding confidential information ciphertext can be queried from the database. There can be multiple confidential information ciphertexts corresponding to the confidential information identifier, and different confidential information ciphertexts of the same confidential information identifier are encrypted and decrypted through different servers.

[0117] In step 306, the confidential information ciphertext is decrypted to obtain the confidential information.

[0118] For example, the execution subject is a hosting server as an example for explanation. The confidential information can be obtained by decryption processing through the encryption and decryption software integrated in the hosting server. Alternatively, the confidential information can be obtained by decryption processing through the hardware security device built into the hosting server. The hardware security device can also be an independent device independent of the hosting server.

[0119] In some embodiments, before step 307, a scrambling operation is performed on the confidential information, where the hash value of the scrambled confidential information is different from the hash value of the original confidential information.

[0120] For example, the scrambling operation may be a salt encoding operation for inserting the confidential information into the string.

[0121] The embodiments of the present application improve the security of transmitting confidential information by performing an encryption operation on confidential information, and avoid leakage of confidential information caused by interception of confidential information during the transmission process.

[0122] In step 307, the confidential information is sent to the service server.

[0123] Here, confidential information is used by the business server to perform business operations.

[0124] In some embodiments, the business server performs business operations in the following ways:

[0125] Method 1: Receiving confidential information through software development kits.

[0126] Method 2: Load confidential information into the local cache of the business server. For example, confidential information is only stored in the local cache of the business server. The local cache is the local memory of the server, which is used to store temporary data and is cleaned up regularly, so that confidential information will not be written into the configuration file of the business server, thus avoiding the leakage of confidential information.

[0127] Method 3: Read confidential information through local cache to generate a business operation request. For example, when a business operation needs to be performed, the software development kit reads the confidential information in the local cache and generates a business operation request.

[0128] In some embodiments, the confidential information read by the business server through the software development kit is used to load into the local cache of the business server, so that when a business operation needs to be performed, the confidential information is read from the local cache.

[0129] In the embodiment of the present application, by storing confidential information in the local cache of the business server, the confidential information is prevented from appearing in the configuration file of the business server, the leakage of confidential information caused by code crawling is avoided, and the security of the confidential information is improved.

[0130] In some embodiments, when the confidential information is database credentials, the business operations corresponding to the confidential information include: reading and writing the business database of the business server; when the confidential information is a data key, the business operations corresponding to the confidential information include: encrypting and decrypting data based on the data key.

[0131] For example, the data key may be a key of a symmetric encryption algorithm, a public key or a private key of an asymmetric encryption algorithm.

[0132] In actual applications, servers and databases may fail. The following describes the disaster recovery strategy of the confidential information processing method provided in the embodiment of the present application.

[0133] In some embodiments, the method for processing confidential information is implemented through a distributed system (for example, the server as the execution subject is implemented as a distributed system), and the distributed system includes: a name server and multiple encryption and decryption servers. The servers in the distributed system can be physical servers, and each physical server can be deployed in different regions, or different computer rooms in the same region, or both.

[0134] In some embodiments, based on a distributed system, the status of multiple encryption and decryption servers is detected through a name server; in response to detecting that any encryption and decryption server is currently in a faulty state, a service registration request for the encryption and decryption server in the faulty state is redirected to an encryption and decryption server in a normal working state.

[0135] For example, the name server detects the status of each encryption and decryption server through a heartbeat detection mechanism. The principle of the heartbeat detection mechanism is: the name server periodically sends a heartbeat data packet to the encryption and decryption server. If the name server does not receive a response from the encryption and decryption server within the preset time of sending the heartbeat data packet, it is determined that the encryption and decryption server is in a faulty state; conversely, the name server receives a response from the encryption and decryption server within the preset time of sending the heartbeat data packet, and determines that the encryption and decryption server is in a normal working state. If it is detected that any encryption and decryption server is currently in a faulty state, the service registration request for the faulty encryption and decryption server is redirected to other encryption and decryption servers in a normal working state.

[0136] For example, if the name server detects that the encryption server No. 1 in region A is in a faulty state, the name server will direct the service registration request for the encryption server No. 1 in region A to the encryption server No. 2 in region A which is in a normal working state.

[0137] For example, redirecting the processing to other encryption and decryption servers that are in normal working condition is also effective for confidential information requests.

[0138] In the embodiment of the present application, by setting up multiple servers for encrypting and decrypting confidential information, it is avoided that the confidential information cannot be encrypted and decrypted when the server fails, and the hosting service fails, thereby improving the security of confidential information hosting. When a failure occurs, it can flexibly switch to other encryption and decryption servers to perform corresponding processing, thereby improving the efficiency of confidential information hosting and realizing disaster recovery of confidential information hosting services.

[0139] In some embodiments, step 302 can be implemented by calling the default encryption and decryption server of the terminal device and other encryption and decryption servers to encrypt the confidential information to obtain multiple different confidential information ciphertexts.

[0140] Here, the default encryption and decryption server is an encryption and decryption server that preferentially provides encryption and decryption services to the terminal device. The confidential information identifiers corresponding to multiple different confidential information ciphertexts are the same.

[0141] For example, each encryption and decryption server has a different encryption method, and thus obtains different confidential information ciphertexts. The encryption and decryption server can encrypt and decrypt the confidential information through built-in software or associated hardware security devices. After obtaining multiple different confidential information ciphertexts, the multiple different confidential information ciphertexts are stored in the database.

[0142] In the embodiment of the present application, encryption and decryption processing is performed through different encryption and decryption servers, and each encryption and decryption server has a different encryption method, which improves the security of confidential information, increases the difficulty of cracking confidential information, and avoids the leakage of confidential information.

[0143] In some embodiments, reference Figure 3C , Figure 3C It is a flowchart of a method for processing confidential information provided in an embodiment of the present application; Figure 3A Step 305 in can be Figure 3C Step 3051 in is implemented as described in detail below.

[0144] In step 3051, in response to the default encryption and decryption server of the terminal device being in a normal working state, a confidential information ciphertext corresponding to the confidential information identifier generated by the default encryption and decryption server is queried from a database.

[0145] For example, when the default encryption and decryption server works normally, obtaining the ciphertext of the confidential information identifier corresponding to the default encryption and decryption server can improve the processing efficiency of encryption and decryption.

[0146] Figure 3A Step 306 in can be Figure 3C Step 3061 in is implemented as described in detail below.

[0147] In step 3061, the default encryption and decryption server is called to decrypt the confidential information ciphertext to obtain the confidential information.

[0148] In the embodiment of the present application, a server is configured to preferentially decrypt ciphertexts of confidential information, thereby improving the efficiency of the decryption process and facilitating the business server to execute related business in a timely manner.

[0149] In some embodiments, reference Figure 3D , Figure 3D It is a flowchart of a method for processing confidential information provided in an embodiment of the present application; Figure 3A Step 305 in can be Figure 3D Steps 3052 to 3053 in are implemented as described in detail below.

[0150] In step 3052, in response to the default encryption and decryption server of the terminal device being in a faulty state, another encryption and decryption server in a normal working state is set as a server currently providing encryption and decryption services to the terminal device.

[0151] For example, other encryption and decryption servers in normal working state may be located in different regions from the faulty encryption and decryption server. For example, if a server in region A fails, the server in region B is switched to handle the problem.

[0152] In step 3053, based on the confidential information identifier carried in the confidential information request, the database is queried for confidential information ciphertext generated by other encryption and decryption servers for the confidential information.

[0153] For example, when there are multiple encryption and decryption servers, the confidential information identifier corresponds to multiple confidential information ciphertexts, and the multiple confidential information ciphertexts corresponding to the confidential information identifiers are obtained from the database. The confidential information ciphertexts corresponding to the encryption and decryption servers that work normally are selected from the multiple confidential information ciphertexts.

[0154] Figure 3A Step 306 in can be Figure 3D Step 3062 in is implemented as described in detail below.

[0155] In step 3062, other default encryption and decryption servers are called to decrypt the confidential information ciphertext to obtain the confidential information.

[0156] For example, the confidential information ciphertext is sent to other default encryption and decryption servers that generate the confidential information ciphertext, so that the other default encryption and decryption servers decrypt the confidential information ciphertext to obtain the confidential information.

[0157] In an embodiment of the present application, when the default encryption and decryption server fails, it promptly switches to other encryption and decryption servers to perform encryption and decryption processing, thereby improving the stability of encryption and decryption processing, improving the security of confidential information, and improving the stability and smoothness of business operations of the business server.

[0158] In some embodiments, Figure 3D After step 3052 in the above method, in response to the default encryption / decryption server returning to a normal working state, the encryption / decryption server currently providing encryption / decryption services to the terminal device is reset to the default encryption / decryption server.

[0159] For example, after setting other encryption and decryption servers in normal working status as the servers currently providing encryption and decryption services to the terminal device, the status of the faulty default encryption and decryption server is periodically checked. When the default encryption and decryption server resumes normal working status, switch back to the original default encryption and decryption server for encryption and decryption processing.

[0160] In some embodiments, in response to a database being in a faulty state, the database is switched from a primary database to a backup database, and the original backup database is switched to a new primary database, wherein the primary database and the backup database are deployed in different regions, or in different computer rooms in the same region.

[0161] In some embodiments, different encryption and decryption servers are associated with different hardware security devices, and each encryption and decryption server performs encryption and decryption operations by calling the associated hardware security device.

[0162] For example, each hardware security device is set in a different region, or in a different computer room in the same region, or both.

[0163] In some embodiments, reference Figure 8 , Figure 8 Schematic diagram of the interactive process of the confidential information processing method provided in the embodiment of the present application. Figure 1 The terminal device 400, the hosting server 201, the business server 202, and the database 500 in Figure 8 The steps in are explained.

[0164] In step 801 , the terminal device 400 sends a service registration request to the hosting server 201 .

[0165] For example, when a user uploads confidential information through terminal device 400, terminal device 400 sends a service registration request carrying the confidential information. Hosting server 201 can also be implemented as multiple different devices, for example: the hosting server includes a name server, an encryption and decryption management server, an encryption and decryption reading server, and a hardware security device.

[0166] In step 802, the hosting server 201 encrypts the confidential information to obtain a ciphertext of the confidential information, and assigns a confidential information identifier to the confidential information.

[0167] For example, the encryption process and the following decryption process can be implemented by a hardware security device in the hosting server 201, or by encryption and decryption software.

[0168] In step 803 , the hosting server 201 stores the confidential information identifier and the confidential information ciphertext in the database 500 .

[0169] In step 804 , the hosting server 201 sends the confidential information identifier to the business server 202 .

[0170] For example, the business server 202 has a built-in software development kit, which is used to receive the confidential information identifier and perform a process of configuring the confidential information identifier.

[0171] In step 805, the service server 202 stores the confidential information identifier.

[0172] For example, the way in which the business server 202 configures the confidential information identifier is already Figure 3A The step 303 in FIG. 1 is described and will not be repeated here.

[0173] In step 806, the service server 202 starts the service and extracts the confidential information identifier corresponding to the service.

[0174] For example, when the service server 202 starts a service, the software development kit detects that the service is started, and then extracts the confidential information identifier corresponding to the service.

[0175] In step 807 , the business server 202 sends a confidential information request to the hosting server 201 .

[0176] For example, the software development kit of the business server 202 generates a confidential information request carrying a confidential information identifier, and sends the request to the hosting server 201 .

[0177] In step 808 , the hosting server 201 queries the database 500 for the confidential information ciphertext based on the confidential information identifier.

[0178] In step 809, the hosting server 201 decrypts the confidential information ciphertext to obtain the confidential information.

[0179] In step 810 , the hosting server 201 sends the confidential information to the business server 202 .

[0180] For example, before sending confidential information to the business server 202, the hosting server 201 may scramble the confidential information to prevent the confidential information from being intercepted during the communication process and causing leakage.

[0181] In step 811 , the service server 202 performs a service operation based on the confidential information.

[0182] For example, the business operation performed by the business server 202 based on the confidential information may be obtaining data from a business database and encrypting and decrypting the data based on a data key.

[0183] The embodiment of the present application encrypts and stores the confidential information required for executing business operations in other servers or databases before the business server runs the business. The business server holds the confidential information identifier corresponding to the encrypted confidential information ciphertext, thereby avoiding the leakage of confidential information caused by malicious scanning code when the confidential information is directly stored in the database or configuration file of the business server. When the business server sends a confidential information request carrying the confidential information identifier, the decrypted confidential information is sent to the business server, so that the business server obtains the confidential information only when performing business operations, thereby realizing the confidential information as temporary data for the business server to perform business operations. Compared with storing the confidential information in the business server, the security of the confidential information is improved and the leakage of the confidential information of the business server is avoided.

[0184] The following describes an exemplary application of the method for processing confidential information according to an embodiment of the present application in a practical application scenario.

[0185] Currently, credentials such as database passwords and data encryption keys (DEK) used to encrypt and decrypt sensitive data are often written to configuration files or hard-coded into business codes. After the business corresponding to the business server is started, the configuration files are read, or obtained from the business code and used directly. In order to improve security, some businesses store confidential information such as credential keys in the configuration center, and use credential keys by pulling configuration information from the configuration center.

[0186] In the prior art, confidential information such as credentials and keys will be uploaded to the code repository along with the project code. If there is a malicious scanning of the code repository, the credentials and keys will be leaked. If it is an open source project, such unintentional leakage will cause a large-scale accident. After the code is deployed to the hosting server, the configuration file will also be uploaded to the hosting server. If there is a malicious attack on the hosting server and a full scan of the hosting server files, confidential information will also be leaked. The above leakage behavior gives criminals an opportunity to take advantage of it, and will also bring heavy costs to companies and individuals. In order to improve security, some companies will place credentials and keys in the cloud configuration center, but it will inevitably cause leakage. The key credential management system developed by some companies provides key and credential hosting and encryption and decryption functions to ensure the safe use of keys and credentials. However, for each encryption and decryption, it is necessary to initiate a Hypertext Transfer Protocol (HTTP) request to the key credential management platform to perform encryption and decryption operations. The overall efficiency is low and it cannot cope with the scenario of concurrent encryption and decryption of massive data. At the same time, the business code can easily access the plaintext of credentials and keys, which is easy to cause information leakage and reduce the security of information. Currently, most key credential management platforms do not support off-site disaster recovery and cannot effectively ensure stable business operations.

[0187] The embodiment of the present application proposes a method for handling confidential information in response to the security issues of using confidential information. Business registration and key credential registration and hosting are performed on the confidential information management platform in advance. After hosting, the confidential information management platform will use a hardware security device certified by a third party to encrypt and store the confidential information, and provide the business server with a confidential information identifier (secret ID) corresponding to the confidential information. The business stores the confidential information identifier in the code or configuration information. After starting the code service, the software development kit scans the confidential information identifier and requests the decrypted plain text of the confidential information from the confidential information management platform for use by the business server. Confidential information such as credentials and keys will not appear in the code or configuration of the business server, avoiding the risk of information leakage.

[0188] The structure of the confidential information processing system corresponding to the confidential information processing method provided in the embodiment of the present application is explained below. Figure 5 , Figure 5 It is a structural diagram of a confidential information processing system provided in an embodiment of the present application; Figure 1 The hosting server 201 in the embodiment may be implemented as a plurality of independent devices, for example: Figure 5The encryption and decryption management server 501, the message delivery platform 507, the hardware security device 502, and the encryption and decryption reading server 503. Taking the above confidential information as the key and the credential as an example, the user enters the key or credential of the business through the human-computer interaction interface of the encryption and decryption management platform in the terminal device 400, and the terminal device 400 uploads the business key and credential to the encryption and decryption management server 501, and the encryption and decryption management server 501 transmits the key and credential to the hardware security device 502 for encryption or decryption processing, and stores the encrypted key or credential in the database 500. The business server 504 includes a business logic module 505 and a software development kit 506. The software development kit 506 is used to extract the confidential information identifier and send a request to read the key or credential to the encryption and decryption reading server 503. The encryption and decryption reading server 503 queries the encrypted key or credential from the database 500 based on the confidential information identifier. The hardware security device 502 decrypts the encrypted key or credential to obtain the plain text of the key or credential. The encryption and decryption reading server 503 sends the plain text of the key or credential to the business server 504, so that the business logic module 505 of the business server 504 can perform corresponding business functions based on the plain text of the key or credential.

[0189] For example, the terminal device 400 is used to log in to the human-computer interaction interface of the encryption and decryption management platform. The encryption and decryption management platform includes the functions of service management, credential management, and data key management, which can facilitate users to host credentials and keys. At the same time, the platform also has a user login authentication and authorization mechanism to ensure the safety of operations. The encryption and decryption management server 501 is used to manage the back-end services of the encryption and decryption platform, responsible for handling the actual hosting operations and the authentication and authorization functions on the management platform, and also has a remote synchronization mechanism to support remote multi-active and disaster recovery of encryption and decryption management services. The encryption and decryption reading server 503 is used to read credentials and key plaintexts, and has a failover mechanism, which can be well disaster-tolerant. The software development kit 506 is embedded in the business server 504, responsible for collecting all encryption and decryption operations on the business, and obtaining the key plaintext by docking with the encryption and decryption reading service.

[0190] In some embodiments, the confidential information is a credential, referring to Fig. 6A , Fig. 6A is a flow chart of a method for processing confidential information provided by an embodiment of the present application. Fig. 6A Explain how credentials are handled.

[0191] In step 601A, the terminal device 400 sends the database credentials to be encrypted to the encryption and decryption management server 501 .

[0192] Example, reference FIG. 4A to FIG. 4B , FIG. 4A to FIG. 4BIt is a schematic diagram of the human-computer interaction interface provided in the embodiment of the present application; the human-computer interaction interface 401A is the server management interface, which is responsible for registration and related management functions. Before using the hosting function, the business needs to register the service and determine the administrator information. All subsequent credentials and key hosting will be bound to the service, and only the administrator has the management operation of the credentials and keys. At the same time, after the service is registered, the service key will be obtained from the management platform, which will be used for service authentication when the subsequent software development kit obtains the key credentials. Figure 4B The credential hosting page 402B in the human-computer interaction interface 401B is responsible for credential hosting and related management functions. After the credential is hosted, the credential identifier will be obtained from the management platform for subsequent software development kits to access the credential. Credential hosting has a multi-version control function, which allows multiple versions of credentials to exist at the same time, and some of them can be disabled. This function can be used for business to quickly switch credentials.

[0193] In step 602A, the encryption and decryption management server 501 sends the database credentials to be encrypted to the hardware security device 502, so that the hardware security device 502 encrypts the credentials to obtain the credential ciphertext.

[0194] In step 603A, the encryption and decryption management server 501 stores the credential ciphertext in the database 500 .

[0195] Step 604A is executed synchronously with step 603A. In step 604A, the encryption and decryption management server 501 sends the credential identifier corresponding to the credential ciphertext to the terminal device 400.

[0196] For example, the database stores the correspondence between the credential ciphertext and the credential identifier.

[0197] In some embodiments, the encryption and decryption management server 501 may also directly send the credential identifier (secret ID) to the business server 504 .

[0198] In step 605A, the terminal device 400 sends the credential identifier to the service server 504 so that the service server 504 writes the credential identifier into the configuration file.

[0199] For example, after the business server obtains the credential identifier, it writes the credential identifier into the business configuration file in a specific format (preset encapsulation format). By adopting the specific format, the software development kit can accurately scan the credential identifier.

[0200] By way of example, the service server 504 includes a service configuration file 508 , a service main process 509 , a service framework 510 , and a software development kit 506 .

[0201] In step 606A, the service master process 509 calls the software development kit 506 to load the configuration.

[0202] In step 607A, the called software development kit 506 scans and parses the configuration file 508 to obtain the credential identifier.

[0203] For example, when the business service is started, a software development kit for encryption and decryption is loaded. The software development kit is used to scan the configuration file. If a specific format defined in the configuration file is scanned, the credential identifier is extracted.

[0204] In step 608A, the software development kit 506 sends a request to query the plaintext credentials to the encryption and decryption reading server 503.

[0205] For example, the software development kit uses the extracted credential identifier to request the encryption and decryption reading service to obtain the credential plaintext, and the request to query the plaintext credential carries the credential identifier.

[0206] In step 609A, the encryption and decryption reading server 503 reads the credential ciphertext from the database 500 .

[0207] For example, the encryption and decryption reading server 503 queries the credential ciphertext in the database 500 based on the credential identifier. After receiving the request (the confidential information request in the above text), the encryption and decryption reading service will first search the credential ciphertext corresponding to the credential identifier in the database, and then hand the ciphertext to the hardware security device for decryption to obtain the plaintext.

[0208] In step 610A, the encryption and decryption reading server 503 sends the credential ciphertext to the hardware security device 502, so that the hardware security device 502 decrypts the credential ciphertext to obtain the credential plaintext.

[0209] In step 611A, the encryption and decryption reading server 503 sends the credential plain text to the business server 504, so that the software development kit 506 obtains the credential plain text.

[0210] For example, the plaintext credentials will be returned to the software development kit in a salted encoding format. Salted encoding avoids the risk of leakage after malicious packet capture.

[0211] In step 612A, the software development kit 506 sends the configuration data carrying the credentials in plain text to the business main process 509.

[0212] In step 613A, the service main process 509 starts the service and passes the configuration data to the service framework 510 .

[0213] In step 614A, the service framework 510 builds a connection between the service database 601 and the service server 504 based on the configuration data.

[0214] For example, after receiving the plaintext credentials, the software development kit will not inject them into the configuration data file, but load the configuration data carrying the plaintext credentials into the memory instead of backfilling them into the configuration file, thus avoiding the leakage caused by malicious intrusion on the server. Subsequent business services will use the credentials to connect to the database.

[0215] In some embodiments, the confidential information is a key, referring to Figure 6B , Figure 6B is a flow chart of a method for processing confidential information provided by an embodiment of the present application; Figure 6B Explain how keys are handled.

[0216] In step 601B, the terminal device 400 sends the data key to be encrypted to the encryption and decryption management server 501.

[0217] For example, a user using the service first hosts a data key on an encryption and decryption management platform (confidential information management platform) through a terminal device.

[0218] refer to Figure 4C , Figure 4C is a schematic diagram of a human-computer interaction interface provided in an embodiment of the present application; Figure 4C The key escrow page 402C in the human-computer interaction interface 401C is responsible for key escrow and related management functions. The key can be manually imported or automatically generated by the system. After escrow, the key identifier will be obtained from the management platform for subsequent software development kits to access the key. The key escrow also has a multi-version control function. Click the version details to view the key plain text.

[0219] In step 602B, the encryption / decryption management server 501 sends the data key to be encrypted to the hardware security device 502, so that the hardware security device 502 encrypts the data key to obtain the data key ciphertext.

[0220] In step 603B, the encryption / decryption management server 501 stores the data key ciphertext in the database 500 .

[0221] For example, after receiving the hosting request, the encryption and decryption management server will use the hardware security device to encrypt the key and return the key ciphertext. The encryption and decryption management server stores the key ciphertext in the database and issues a key identifier for the key ciphertext.

[0222] Step 604B is executed synchronously with step 603B. In step 604B, the encryption / decryption management server 501 sends the data key identifier corresponding to the data key ciphertext to the terminal device 400 .

[0223] In some embodiments, the encryption and decryption management server 501 may also directly send the data key identifier (secret ID) to the business server 504 .

[0224] In step 605B, the terminal device 400 sends the data key identifier to the service server 504 , so that the service server 504 writes the data key identifier into the service configuration file 508 .

[0225] For example, after the business server obtains the key identifier, it writes the key identifier into the configuration file. This is not limited to the configuration file, and the business can also put the key identifier into the configuration center.

[0226] For example, the principles of step 601B to step 605B are substantially the same as those of step 601A to step 605A. The method for processing confidential information provided in the embodiment of the present application can be widely used in processing different types of confidential information.

[0227] In step 606B, the business logic module 505 obtains the data key identifier from the business configuration file 508 .

[0228] For example, the business server 504 also includes a business logic module 505. The business logic module reads the data key identifier from the configuration file, that is, whether the data key identifier is stored in the configuration center or the configuration file, it is necessary to ensure that the key identifier can be obtained when the business logic code is running.

[0229] In step 607B, the business logic module 505 sends the encrypted and decrypted sensitive data to the software development kit 506 .

[0230] In step 608B, the software development kit 506 sends a request to query the plain text of the data key to the encryption and decryption reading server 503.

[0231] For example, a request for querying the plain text of a data key carries a data key identifier.

[0232] For example, when the business needs encryption and decryption processing, the software development kit is called to obtain the key plaintext. The software development kit checks whether the key exists in the local cache. The local cache here is used to store the key plaintext obtained from the encryption and decryption reading service to avoid the need to obtain it through remote procedure call (Remote Procedure Call) every time, thereby improving overall efficiency. If it exists, encryption and decryption operations are performed directly for the business; if it does not exist, a request carrying the data key identifier is sent to the encryption and decryption reading service to obtain the key plaintext. After receiving the key, the encryption and decryption reading service will first search for the key ciphertext corresponding to the data key identifier in the database, and hand the key ciphertext to the hardware security device for decryption to obtain the key plaintext. The key plaintext will be returned to the software development kit in a salted encoding manner.

[0233] In step 609B, the encryption and decryption reading server 503 reads the data key ciphertext from the database 500 .

[0234] For example, the encryption and decryption reading server 503 queries the data key ciphertext in the database 500 based on the data key identifier.

[0235] In step 610B, the encryption and decryption reading server 503 sends the data key ciphertext to the hardware security device 502, so that the hardware security device 502 decrypts the data key ciphertext to obtain the data key plaintext.

[0236] In step 611B, the encryption and decryption reading server 503 sends the data key plaintext to the business server 504, so that the software development kit 506 obtains the data key plaintext.

[0237] In step 612B, the software development kit 506 sends the data encrypted and decrypted in plain text using the key to the business logic module 505 .

[0238] For example, encryption and decryption operations of sensitive data will be performed in the software development kit. The software development kit provides common symmetric encryption algorithms AES128, AES196, AES256, and SM4, and asymmetric algorithms RSA1024, RSA2048, and SM2, which can meet business requirements.

[0239] In some embodiments, when the business server sends a request to the encryption and decryption reading server, the request is authenticated and authorized. In order to ensure the security of the software development kit request credentials and key plaintext process of the business server, the process needs to be authenticated and authorized. The purpose of authentication is to verify that the business service can access the encryption and decryption management service, and the purpose of authentication is to verify that the business service has the authority to access the corresponding key.

[0240] refer to Figure 6C , Figure 6CIt is a schematic diagram of the principle of authentication and authorization provided by the embodiment of the present application; taking the confidential information as a key as an example, the software development kit 508 of the business server 504 generates an authentication request carrying a key identifier, a server identifier and a server signature (key), and the business server 504 sends the authentication request to the encryption and decryption reading server 503 through the network. When the authentication request passes through the internal gateway 511, the internal gateway 511 calls the business access relationship table stored in the intranet gateway authentication center 512 to determine the legitimacy of the authentication request. The business access relationship table stores the server identifiers of the business servers that have access relationships with the encryption and decryption management server and the encryption and decryption reading server. If the server identifier carried by the request exists in the business access relationship table, the authentication request is legal, and the internal gateway 511 forwards the authentication request to the encryption and decryption reading server 503, and the encryption and decryption reading server 503 performs service authentication and key access authentication processing.

[0241] For example, the private key corresponding to the business server is extracted from the authentication request, and the server identifier and server signature (key) are decoded based on the private key to obtain the first hash data; the public key stored in the encryption and decryption reading server is obtained, and the server identifier and server signature (key) are decoded based on the public key to obtain the second hash data. The two hash data are compared. If the two are the same, the authentication is successful.

[0242] For example, after the authentication is passed, the next step of authentication will be carried out. The encryption and decryption reading server 503 compares the key identifier carried in the request with the key identifier stored in the database. When the key identifier carried in the request exists in the database, it is determined that the access right is granted.

[0243] refer to Fig. 7A , Fig. 7A Schematic diagram of the principle of remote disaster recovery provided by the embodiment of the present application; assuming that the G city area is the main area, a first hardware security device 703, a first encryption and decryption reading server 705, a first encryption and decryption management server 706, and a first database 707 are set up, and the first business server 701 is set up in the G city area. The second business server 702 is set up in the S city area, and the S city area includes a second encryption and decryption reading server 709, a second hardware security device 710, and a second database 708.

[0244] In some embodiments, disaster recovery is performed off-site for servers, hardware security devices, and databases respectively.

[0245] For example, for servers, the encryption and decryption management server is deployed based on multiple regions and registered with the name server (the name server is mainly used for server discovery and server registration). When a failure occurs in a certain region, the heartbeat detection performed by the name server on the encryption and decryption management server in that region will fail, and the name server will remove the server instance in that region. In this way, the access traffic of all business servers will be directed to the normal encryption and decryption management server instance, completing the remote disaster recovery of the encryption and decryption management server.

[0246] For example, for a hardware security device, a hardware security device is a hardware device. Since the hardware security device itself does not support remote disaster recovery, and after remote deployment, the encrypted data is not consistent, this means that the result encrypted by the hardware security device in a certain region is inconsistent with the result encrypted by the hardware security device in another region. Based on the above characteristics, a remote disaster recovery mechanism based on hardware security devices is designed.

[0247] For example, when a business trusts credentials or keys, the credentials or keys will be encrypted in hardware security devices in multiple regions, and the system stipulates that only credentials or keys encrypted by hardware security devices in multiple regions are considered to be successfully trusted. After encryption, multiple ciphertexts will be stored in the database. When a hardware security device in region A fails, it will switch to another hardware security device in region B that has no faults through an automatic transfer mechanism, and query the database for the ciphertext encrypted by the hardware security device in region B based on the regional information, and request decryption from the hardware security device in region B. Since the network time consumed by the remote hardware security device for decryption will increase, performance will be degraded. Therefore, after a period of time of remote switching, a detection mechanism will be used to detect whether the hardware security device has returned to normal. Once the detection is successful, it will switch back to the local hardware security device.

[0248] refer to Figure 7B , Figure 7B It is a schematic diagram of the principle of off-site disaster recovery of the hardware security module provided in an embodiment of the present application. When accessing a local hardware security device, if more than 10 consecutive access results to the local hardware security device are failed, the normal state is switched to a degraded state, and the non-faulty hardware security device at a different location is switched to perform encryption and decryption processing through the non-faulty hardware security device at a different location. When the preset time is reached after the switch, the local hardware security device is detected, and if more than 10 consecutive access results to the local hardware security device are successful, the encryption and decryption processing is switched to the local hardware security device. If at least one access result is a failure, the encryption and decryption processing continues to be performed through the off-site hardware security device.

[0249] For example, for database disaster recovery, an off-site disaster recovery instance is set for each database, and the data in the off-site database is ensured to be consistent. However, due to the characteristics of the database, when a failure occurs, it is necessary to manually switch to the off-site database. When switching, the embodiment of the present application triggers the encryption and decryption management service to switch to the off-site database instance by modifying the database configuration of the configuration center.

[0250] In the embodiment of the present application, the business can host the credentials and keys that are at risk of leakage on the platform, and use the supporting software development kit to collect all encryption and decryption operations. In this way, the business can improve the security of the code service, and the business developers can also focus more on the actual development of the business without worrying about potential security risks. Confidential information such as credentials and keys will not appear in the code or configuration of the business server, avoiding the risk of information leakage. At the same time, on the link where the software development kit obtains confidential information, the confidential information management platform will authenticate the service and authenticate the confidential information that needs to be accessed. When transmitting, the message data will also be salted and encoded. Even if it is maliciously captured, it is extremely difficult to crack the data, which improves the security of confidential information transmission. The software development kit also provides the commonly used Advanced Encryption Standard (AES) and RSA algorithm, which are used to directly collect the encryption and decryption behavior of the key for sensitive data, so that the business code cannot access confidential information, solve the encryption and decryption efficiency problem of massive data, support remote disaster recovery, and ensure business stability.

[0251] The following further describes the exemplary structure of the confidential information processing device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules in the processing device 455 of confidential information stored in the memory 450 may include: an information management module 4551, configured to receive a business registration request for a business server, wherein the business registration request carries confidential information; an encryption and decryption module 4552, configured to encrypt the confidential information to obtain a confidential information ciphertext; the information management module 4551, configured to assign a confidential information identifier to the confidential information ciphertext, and send the confidential information identifier to the business server; an information reading module 4553, configured to receive a confidential information request sent by the business server, wherein the confidential information request carries a confidential information identifier; the information reading module 4553, configured to query the confidential information ciphertext corresponding to the confidential information identifier from the database based on the confidential information identifier carried by the confidential information request; the encryption and decryption module 4552, configured to decrypt the confidential information ciphertext to obtain the confidential information; the information reading module 4553, configured to send the confidential information to the business server, wherein the confidential information is used for the business server to perform business operations.

[0252] In some embodiments, the confidential information request also carries a business server identifier and a digital signature; the information reading module 4553 is configured to extract the business server identifier and the digital signature from the confidential information request before querying the database for the confidential information ciphertext corresponding to the confidential information identifier based on the confidential information identifier carried by the confidential information request; in response to querying the business server identifier from a preset access permission list and successfully verifying the digital signature, it is determined that the business server has passed the service authentication, wherein the access permission list includes: the identifier of the business server with access permission.

[0253] In some embodiments, the information reading module 4553 is configured to determine that the business server has passed the confidential information access authentication in response to a confidential information identifier queried from a preset confidential information identifier list before querying the confidential information ciphertext corresponding to the confidential information identifier from the database based on the confidential information identifier carried by the confidential information request, wherein the confidential information identifier list includes: the confidential information identifier of the pre-configured confidential information.

[0254] In some embodiments, the information management module 4551 is configured to scramble the confidential information before sending it to the business server, wherein the hash value of the scrambled confidential information is different from the hash value of the original confidential information.

[0255] In some embodiments, the encryption and decryption module 4552 is configured to, in response to receiving a confidential information hosting request sent by a terminal device, encrypt the confidential information carried in the confidential information hosting request to obtain a confidential information ciphertext; store the confidential information ciphertext in a database; assign a confidential information identifier to the confidential information ciphertext, and send the confidential information identifier to the terminal device, so that the terminal device sends a confidential information identifier configuration request to the business server, wherein the confidential information identifier configuration request carries the confidential information identifier.

[0256] In some embodiments, the business server performs configuration according to the confidential information identifier configuration request in a manner that includes at least one of the following: writing the confidential information identifier into a configuration file of the business server in a preset encapsulation format; writing the confidential information identifier into a configuration server.

[0257] In some embodiments, the business server generates a confidential information request in the following manner: loading a software development kit, scanning a configuration file through the software development kit, in response to scanning a preset packaging format, reading a confidential information identifier from the preset packaging format, and generating a confidential information request based on the confidential information identifier; loading the software development kit, reading a configured confidential information identifier from a configuration server through the software development kit, and generating a confidential information request based on the confidential information identifier.

[0258] In some embodiments, the business server performs business operations in the following manner: receiving confidential information through a software development kit; loading the confidential information into a local cache of the business server; and reading the confidential information through the local cache to generate a business operation request.

[0259] In some embodiments, the confidential information read by the business server through the software development kit is used to load into the local cache of the business server, so that when a business operation needs to be performed, the confidential information is read from the local cache.

[0260] In some embodiments, when the confidential information is database credentials, the business operations corresponding to the confidential information include: reading and writing the business database of the business server; when the confidential information is a data key, the business operations corresponding to the confidential information include: encrypting and decrypting data based on the data key.

[0261] In some embodiments, the method for processing confidential information is implemented through a distributed system, which includes: a name server and multiple encryption and decryption servers; an information management module 4551, configured to detect the status of multiple encryption and decryption servers through the name server; in response to detecting that any encryption and decryption server is currently in a faulty state, redirecting the service registration request for the encryption and decryption server in the faulty state to an encryption and decryption server in a normal working state.

[0262] In some embodiments, the encryption and decryption module 4552 is configured to call the default encryption and decryption server of the terminal device and other encryption and decryption servers to encrypt confidential information to obtain multiple different confidential information ciphertexts, wherein the default encryption and decryption server is an encryption and decryption server that preferentially provides encryption and decryption services to the terminal device; and store multiple different confidential information ciphertexts in a database.

[0263] In some embodiments, the information reading module 4553 is configured to query the database for the confidential information ciphertext corresponding to the confidential information identifier generated by the default encryption and decryption server in response to the default encryption and decryption server of the terminal device being in normal working state; in some embodiments, the encryption and decryption module 4552 is configured to call the default encryption and decryption server to decrypt the confidential information ciphertext to obtain the confidential information.

[0264] In some embodiments, the information reading module 4553 is configured to, in response to the default encryption and decryption server of the terminal device being in a faulty state, set other encryption and decryption servers in a normal working state as the server currently providing encryption and decryption services to the terminal device; based on the confidential information identifier carried in the confidential information request, query the database for confidential information ciphertext generated by other encryption and decryption servers for the confidential information; decrypt the confidential information ciphertext to obtain the confidential information, including: calling other default encryption and decryption servers to decrypt the confidential information ciphertext to obtain the confidential information.

[0265] In some embodiments, the information reading module 4553 is configured to, after setting other encryption and decryption servers in normal working state as the server currently providing encryption and decryption services to the terminal device, reset the encryption and decryption server currently providing encryption and decryption services to the terminal device as the default encryption and decryption server in response to the default encryption and decryption server returning to normal working state.

[0266] In some embodiments, the information reading module 4553 is configured to switch the database from a primary database to a backup database in response to the database being in a faulty state, and to switch the original backup database to a new primary database, wherein the primary database and the backup database are deployed in different regions, or in different computer rooms in the same region.

[0267] In some embodiments, different encryption and decryption servers are associated with different hardware security devices, and each encryption and decryption server performs encryption and decryption operations by calling the associated hardware security device.

[0268] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the confidential information processing method described in the embodiment of the present application.

[0269] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the confidential information processing method provided by the present application embodiment, for example, Figure 3A Show how confidential information is handled.

[0270] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0271] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0272] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0273] As an example, the executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0274] To summarize, the embodiments of the present application encrypt and store the confidential information required for executing business operations in other servers or databases before the business server runs the business. The business server holds the confidential information identifier corresponding to the encrypted confidential information ciphertext, thereby avoiding the leakage of confidential information caused by malicious scanning codes when the confidential information is directly stored in the database or configuration file of the business server; when the business server sends a confidential information request carrying the confidential information identifier, the decrypted confidential information is sent to the business server, so that the business server obtains the confidential information only when performing business operations, thereby realizing the confidential information as temporary data for the business server to perform business operations. Compared with storing the confidential information in the business server, the security of the confidential information is improved and the leakage of the confidential information of the business server is avoided.

[0275] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for processing confidential information, characterized in that: The method comprises: receiving a service registration request for a service server, wherein the service registration request carries confidential information; Encrypting the confidential information to obtain a ciphertext of the confidential information; Assigning a confidential information identifier to the confidential information ciphertext, and sending the confidential information identifier to the business server; receiving a confidential information request sent by the business server, wherein the confidential information request carries the confidential information identifier; Based on the confidential information identifier carried in the confidential information request, querying the database for confidential information ciphertext corresponding to the confidential information identifier; Decrypting the confidential information ciphertext to obtain the confidential information; The confidential information is sent to the service server, wherein the confidential information is used by the service server to perform service operations.

2. The method according to claim 1, characterized in that The confidential information request also carries a business server identifier and a digital signature; Before querying the database for confidential information ciphertext corresponding to the confidential information identifier carried in the confidential information request, the method further includes: Extracting the business server identifier and the digital signature from the confidential information request; In response to querying the business server identifier from a preset access permission list and successfully verifying the digital signature, it is determined that the business server passes the service authentication, wherein the access permission list includes: the identifier of the business server with access permission.

3. The method according to claim 1, characterized in that Before querying the database for confidential information ciphertext corresponding to the confidential information identifier carried in the confidential information request, the method further includes: In response to querying the confidential information identifier from a preset confidential information identifier list, it is determined that the business server passes the confidential information access authentication, wherein the confidential information identifier list includes: confidential information identifiers of pre-configured confidential information.

4. The method according to claim 1, characterized in that: Before sending the confidential information to the service server, the method further includes: A scrambling operation is performed on the confidential information, wherein a hash value of the scrambled confidential information is different from a hash value of the original confidential information.

5. The method according to claim 1, characterized in that The method further comprises: In response to receiving a confidential information hosting request sent by a terminal device, encrypting the confidential information carried in the confidential information hosting request to obtain a confidential information ciphertext; storing the confidential information ciphertext in the database; A confidential information identifier is assigned to the confidential information ciphertext, and the confidential information identifier is sent to the terminal device, so that the terminal device sends a confidential information identifier configuration request to the service server, wherein the confidential information identifier configuration request carries the confidential information identifier.

6. The method according to claim 5, characterized in that The manner in which the business server performs configuration according to the confidential information identification configuration request includes at least one of the following: Writing the confidential information identifier into a configuration file of the business server in a preset encapsulation format; The confidential information identifier is written to the configuration server.

7. The method according to claim 6, characterized in that The method for the business server to generate a confidential information request includes: Loading a software development kit, scanning the configuration file through the software development kit, reading the confidential information identifier from the preset packaging format in response to scanning the preset packaging format, and generating a confidential information request based on the confidential information identifier; A software development kit is loaded, a configured confidential information identifier is read from the configuration server through the software development kit, and a confidential information request is generated based on the confidential information identifier.

8. The method according to claim 1, characterized in that The manner in which the business server performs the business operation includes: receiving said confidential information via a software development kit; Loading the confidential information into a local cache of the business server; The confidential information is read through the local cache to generate a business operation request.

9. The method according to claim 8, characterized in that The confidential information read by the business server through the software development kit is used to load into the local cache of the business server, so that the confidential information is read from the local cache when the business operation needs to be performed.

10. The method according to claim 1, characterized in that When the confidential information is a database credential, the business operation corresponding to the confidential information includes: reading and writing a business database of the business server; When the confidential information is a data key, the business operation corresponding to the confidential information includes: performing data encryption and decryption processing based on the data key.

11. The method according to claim 1, characterized in that: The confidential information processing method is implemented by a distributed system, the distributed system includes: a name server and multiple encryption and decryption servers; the method also includes: Detecting the status of the multiple encryption and decryption servers through the name server; In response to detecting that any encryption and decryption server is currently in a faulty state, a service registration request for the encryption and decryption server in the faulty state is redirected to the encryption and decryption server in a normal working state.

12. The method according to claim 11, characterized in that The step of encrypting the confidential information to obtain a ciphertext of the confidential information includes: Calling the default encryption and decryption server of the terminal device and other encryption and decryption servers to encrypt the confidential information to obtain a plurality of different confidential information ciphertexts, wherein the default encryption and decryption server is an encryption and decryption server that preferentially provides encryption and decryption services for the terminal device; The method further includes: storing the multiple different confidential information ciphertexts in the database.

13. The method according to claim 12, characterized in that The step of querying the database for the confidential information ciphertext corresponding to the confidential information identifier carried in the confidential information request includes: In response to the default encryption and decryption server of the terminal device being in a normal working state, querying the database for a confidential information ciphertext corresponding to the confidential information identifier generated by the default encryption and decryption server; The decrypting the confidential information ciphertext to obtain the confidential information includes: The default encryption and decryption server is called to decrypt the confidential information ciphertext to obtain the confidential information.

14. The method according to claim 12, characterized in that The step of querying the database for the confidential information ciphertext corresponding to the confidential information identifier carried in the confidential information request includes: In response to the default encryption and decryption server of the terminal device being in a faulty state, setting another encryption and decryption server in a normal working state as a server currently providing encryption and decryption services to the terminal device; Based on the confidential information identifier carried in the confidential information request, querying the database for confidential information ciphertext generated by the other encryption and decryption server for the confidential information; The decrypting the confidential information ciphertext to obtain the confidential information includes: The other default encryption and decryption server is called to decrypt the confidential information ciphertext to obtain the confidential information.

15. The method according to claim 14, characterized in that After setting the other encryption and decryption servers in normal working state as the servers currently providing encryption and decryption services to the terminal device, the method further includes: In response to the default encryption and decryption server returning to a normal working state, the encryption and decryption server currently providing encryption and decryption services to the terminal device is reset to the default encryption and decryption server.

16. The method according to claim 12, characterized in that The method further comprises: In response to the database being in a faulty state, the database is switched from a primary database to a backup database, and the original backup database is switched to a new primary database, wherein the primary database and the backup database are deployed in different regions, or in different computer rooms in the same region.

17. A confidential information processing device, characterized in that: The device comprises: An information management module, configured to receive a service registration request for a service server, wherein the service registration request carries confidential information; An encryption and decryption module, configured to encrypt the confidential information to obtain a ciphertext of the confidential information; The information management module is configured to assign a confidential information identifier to the confidential information ciphertext and send the confidential information identifier to the business server; an information reading module, configured to receive a confidential information request sent by the business server, wherein the confidential information request carries the confidential information identifier; The information reading module is configured to query the confidential information ciphertext corresponding to the confidential information identifier from the database based on the confidential information identifier carried in the confidential information request; The encryption and decryption module is configured to decrypt the confidential information ciphertext to obtain the confidential information; The information reading module is configured to send the confidential information to the business server, wherein the confidential information is used for the business server to perform business operations.

18. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the method for processing confidential information as described in any one of claims 1 to 16 when executing the computer executable instructions or computer programs stored in the memory.

19. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the method according to any one of claims 1 to 16 is implemented.

20. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the method according to any one of claims 1 to 16 is implemented.