WO2018149004A1 - Authentication method and system - Google Patents
Authentication method and system Download PDFInfo
- Publication number
- WO2018149004A1 WO2018149004A1 PCT/CN2017/076603 CN2017076603W WO2018149004A1 WO 2018149004 A1 WO2018149004 A1 WO 2018149004A1 CN 2017076603 W CN2017076603 W CN 2017076603W WO 2018149004 A1 WO2018149004 A1 WO 2018149004A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- string
- client terminal
- http request
- authentication
- public key
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 238000012790 confirmation Methods 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 6
- 230000001174 ascending effect Effects 0.000 claims description 5
- 238000004422 calculation algorithm Methods 0.000 abstract description 11
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 4
- 101001094649 Homo sapiens Popeye domain-containing protein 3 Proteins 0.000 description 3
- 101000608234 Homo sapiens Pyrin domain-containing protein 5 Proteins 0.000 description 3
- 101000578693 Homo sapiens Target of rapamycin complex subunit LST8 Proteins 0.000 description 3
- 102100027802 Target of rapamycin complex subunit LST8 Human genes 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000009193 crawling Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000002427 irreversible effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000003245 working effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/06—Network architectures or network communication protocols for network security for supporting key management in a packet data network
- H04L63/062—Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
- H04L63/108—Network architectures or network communication protocols for network security for controlling access to devices or network resources when the policy decisions are valid for a limited amount of time
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
Definitions
- the present invention relates to the field of communication technologies, and in particular, to an authentication method and system.
- Internet software products are mainly divided into two categories from product audiences, including popular Internet products for end consumers, such as Sina Weibo Web, Zhizhi Web.
- the characteristics of such products are that the objects of such products are human, and most of the provided media content is unstructured text (such as novels, blogs), pictures, audio and video, and the like.
- Another type of product is aimed at the computer, that is, the main form of the service is an API (Application Programming Interface) that provides a programming interface, which is convenient for programmers to use the API for secondary development.
- API Application Programming Interface
- the characteristics of this type of product are that the service object is a computer, and the media content provided is mostly structured text, such as XML, JSON, and the like.
- Authentication refers to verifying that a user has the right to access the system.
- Traditional authentication is verified by a password.
- the premise of this approach is that each user who receives the password is already authorized.
- the user is assigned a password, which can be specified by the administrator or by the user.
- the weakness of this method is very obvious: once the password is stolen or the user loses the password, the situation will be very troublesome.
- the administrator needs to re-edit the user password, and manually verify the user's legal identity before modifying the password.
- the current mainstream authentication method is to use the authentication and authorization to verify the positive of the digital signature. True or not.
- the common practice for authenticating the corresponding user terminal accessing it is to use the corresponding authentication encryption algorithm to generate the authentication encrypted string corresponding to the request information of the user terminal together with the request information sent by the user terminal.
- the server Sended to the server that needs to be accessed, the server uses PHP (ertext Preprocessor), which is a general-purpose open source scripting language for authentication operations.
- the present invention provides an authentication method and system for overcoming the above problems or at least partially solving the above problems.
- an authentication method including:
- Step 1 Add an API interface public key, a current client terminal time, and an authentication encrypted character string in the HTTP request to the client terminal HTTP request header information;
- Step 2 Receive an HTTP request from the client terminal, confirm that the API interface public key in the header information is correct, and confirm that the difference between the client terminal time and the current server time is less than a preset threshold;
- Step 3 Confirm that the authentication encrypted string is correct.
- an authentication system including an encryption module, a first confirmation module, and a second confirmation module:
- the cryptographic module is connected to the first acknowledgment module, and configured to generate an authentication encrypted character string; adding an API interface public key, a current client terminal time, and an authentication encrypted character string to the client terminal HTTP request header information;
- the first confirmation module is connected to the encryption module and the second confirmation module, respectively, for receiving the HTTP request of the client terminal, confirming that the API interface public key is correct, and confirming that the client terminal time and the current server time difference are Less than a preset threshold;
- the second confirmation module is connected to the first confirmation module, and is configured to confirm that the authentication encrypted string is correct.
- the present application proposes an authentication method and system, which adds authentication information, Nginx, to the client terminal HTTP request header information.
- the invention has the following beneficial effects: 1. Adding the authentication information to the HTTP request Header header information does not cause the Url of the HTTP request Header header information to be inconsistent; 2.
- the special authentication encryption string generation algorithm can effectively prevent the third party. Malicious imitation.
- FIG. 1 is a schematic overall flow chart of an authentication method according to an embodiment of the present invention.
- FIG. 2 is a schematic flow chart of an authentication method according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of an overall framework of an authentication system according to an embodiment of the present invention.
- FIG. 4 is a structural block diagram of an apparatus of an authentication system according to an embodiment of the present invention.
- HTTP Request message from client to server.
- Header Header header information carried in the HTTP request.
- API Application Programming Interface
- Public Key and Private Key are a pair of keys obtained by an algorithm (ie, a public key and a private key).
- the public key is the public part of the key pair, and the private key is not.
- Public keys are typically used to encrypt session keys, verify digital signatures, or encrypt data that can be decrypted with the corresponding private key.
- the key pair obtained by this algorithm is guaranteed to be unique worldwide.
- this key pair if one piece of data is used to encrypt a piece of data, it must be decrypted with another key. For example, encrypting data with a public key must be decrypted with a private key. If it is encrypted with a private key, it must be decrypted with a public key, otherwise the decryption will not succeed.
- Public Key AID The public key used for API interface encryption.
- Key AID The key used by the API interface to encrypt, not external, provided by the server.
- MD5 Message Digest Algorithm MD5 (Information-Summary Algorithm 5).
- GET request The type of request sent by the HTTP client, indicating that a file is requested from the web server.
- Post request The type of request sent by the HTTP client, indicating that the data is sent to the web server for processing by the web server.
- Authentication Encryption String An encrypted string used for authentication according to certain rules.
- Nginx is a lightweight web server / reverse proxy server and email (IMAP / POP3) proxy service.
- Proxy_cache Built-in caching module that comes with Nginx.
- Url The Uniform Resource Identifier (or URI) is a string that identifies the name of an Internet resource.
- Lua is a small scripting language. A complete Lua interpreter is only 200k. In all current scripting engines, Lua is the fastest.
- FIG. 1 is a schematic diagram showing the overall flow of an authentication method in a specific embodiment of the present invention.
- the method includes the following steps: Step 1: Add an API request public key, a current client terminal time, and an authentication encrypted character string in an HTTP request to the client terminal HTTP request header information; Step 2, receive the client terminal HTTP The request confirms that the API interface public key is correct; confirms that the client terminal time and the current server time difference are less than a preset threshold; and step 3, confirms that the authentication encrypted string is correct.
- the HTTP request header information of the encrypted information client terminal does not cause the HTTP request Url to be inconsistent, and the server cache cannot be hit because the request Url is inconsistent.
- an authentication method the authentication encrypted string in the step 1 is generated by the following steps: S11, the first character of the uniform resource identifier in the HTTP request is / "Delete; S12, the character string obtained by deleting the character "/" and the API interface public key in the HTTP request, the client terminal time, and the get parameter string in the HTTP request of the client terminal are sorted according to a preset sorting rule; Sequencing the sorted strings in sequence; S13, inserting an API interface key in a specified position in the string obtained after the splicing; obtaining an authentication encrypted string; converting the authentication encrypted string into MD5 code.
- the authentication encrypted string generated by the special generation rule can effectively prevent the third party crawling or malicious attack, thereby improving the security of the accessed server.
- MD5 is an irreversible encryption algorithm, it has high security and is widely used to judge file integrity. Therefore, converting the generated authentication encrypted string to MD5 code can effectively prevent the final authentication encrypted string from being reversed. To the crack, a higher degree of security and validity of the authentication encrypted string is guaranteed.
- an authentication method before the step 2, further includes: Confirming that the client terminal HTTP request Header header information includes both an API interface public key, a client terminal time, and an authentication encrypted string.
- the step 3 further includes: adding the customer identity information to the API interface public key, and confirming, according to the API interface public key access authority, that the client terminal has the Permissions for HTTP requests.
- the identity information of the client may be added to the API interface key pair, and the identity of the API interface public key included in the HTTP request is checked before the authentication encrypted string operation of step 3 is performed. Whether the access authority corresponding to the information can support the client terminal having the authority of the HTTP request.
- an authentication method the generating an authentication encrypted string in the step 1 further includes: S11', confirming that the HTTP request includes post information; S12', the post is The information parameter string is spliced with the uniform resource identifier of the first character "/", the API interface public key, the client terminal time, and the get parameter string in the client terminal HTTP request, and the characters are pressed after the splicing
- the preset sorting rule is sorted; S13', the API interface key is inserted in the specified position of the string obtained after sorting, and the authentication encrypted string is obtained; and the authentication encrypted string is converted into the MD5 code.
- the preset threshold in the step 2 is ⁇ 5 minutes.
- the reason why the preset threshold is set to 5 minutes in this embodiment is that the Url of each HTTP request is time-limited, and even if the Url is caught by the packet capture, it can only use up to 5 minutes. Therefore, in order to ensure that the authenticated HTTP request is still valid, the preset threshold should be set to no more than 5 minutes.
- the preset sorting rule in the step 1 is: sorting according to the ascending/descending order of the first letter of each string.
- the sorting rule in this embodiment is only one of them, and the initials of each string are raised in the 26 alphabets. / Sort in descending order.
- the actual operation of the present invention is not limited to the above two sorting rules, and the string sorting purpose of the present invention can be achieved as long as it is a fixed scrambled sorting rule.
- FIG. 2 is a schematic diagram showing the overall flow of an authentication method according to another embodiment of the present invention. In general, the following steps are included:
- the client terminal attaches the public key aid, the client current request timestamp time, and the authentication encryption string auth to the HTTP request header.
- the above specific encryption auth generation algorithm is as follows: (1) the requested interface address uri (ie /api/thirdPart/live) part, intercepted from the second bit (ie api/v1/live); (2) the characters obtained in the above steps After the string is concatenated with the get parameter, the public key aid, and time, it is sorted in ascending order according to the initial name of each parameter string.
- the public key aid contains customer identity information.
- the lua module in the server Nginx checks whether the header contains three fields: aid, time, and auth; the server checks the validity of the public key aid; the server checks whether the time passed by the client and the time error of the server are within 5 minutes; Check the public key AID access permission range; check whether the authentication string is correct.
- proxy_cache caching function to proxy the business logic to the php if there is no hit cache, and return directly if hit.
- an authentication method is performed by the scripting language lua module in the web server Nginx.
- Nginx is a lightweight web server / reverse proxy server and email (IMAP / POP3) proxy service. It is characterized by less memory and strong concurrency. In fact, Nginx's concurrency capability does perform better in the same type of web server.
- Lua is A small scripting language, a full Lua interpreter but 200k, Lua script processing is the fastest in all current scripting engines.
- the authentication operation script implemented by Lua is embedded in the Nginx as a module to perform the authentication operations of steps 2 and 3, and the authentication speed is directly improved in the authentication operation implemented by PHP in the prior art.
- an authentication method after the step 3, further includes: when the acquisition target information of the HTTP request is not in the server cache, using the cache module proxy_cache in the web server Nginx
- the agent processes the business logic into the hypertext preprocessor.
- Proxy_cache is a built-in cache module that comes with Nginx.
- the Proxy_cache delegates to the PHP processing business logic. If the user terminal HTTP request hits the server cache, it directly returns the content it needs.
- FIG. 3 is a schematic diagram showing the overall structure of an authentication system in a specific embodiment of the present invention.
- the encryption module A1, the first confirmation module A2, and the second confirmation module A3 are included: the encryption module A1 is connected to the first confirmation module A2, and is used to generate an authentication encrypted character string; Adding an API interface public key, a current client terminal time, and an authentication encryption string to the Header header information; the first confirmation module A2 is connected to the encryption module A1 and the second confirmation module A3, respectively, for receiving the client The terminal HTTP request confirms that the API interface public key is correct; and confirms that the client terminal time and the current server time difference are less than a preset threshold; the second confirmation module A3 is connected to the first confirmation module A2 for confirming The authentication encrypted string is correct.
- the HTTP request header information of the encrypted information client terminal does not cause the HTTP request Url to be inconsistent, and the server cache cannot be hit because the request Url is inconsistent.
- the encryption module A1 further includes an authentication encrypted string generating unit, configured to: use a first character of the uniform resource identifier in the HTTP request. /"delete; will remove the character "/" to get the string and HTTP
- the API parameter public key, the client terminal time, and the get parameter string in the client terminal HTTP request are sorted according to a preset sorting rule; the sorted strings are sequentially spliced;
- the API interface key is inserted in the specified position in the string; the authentication encrypted string is obtained; and the authentication encrypted string is converted into the MD5 code.
- the authentication encrypted string generating unit can effectively prevent third party crawling or malicious attack intrusion through the authentication encrypted string generated by the special generating rule, thereby improving the security of the accessed server.
- MD5 is an irreversible encryption algorithm, it has high security and is widely used to judge file integrity. Therefore, converting the generated authentication encrypted string to MD5 code can effectively prevent the final authentication encrypted string from being reversed. To the crack, a higher degree of security and validity of the authentication encrypted string is guaranteed.
- an authentication system is further configured to: confirm that the client terminal HTTP request header information includes an API interface public key, a client terminal time, and an authentication. Encrypt the string.
- an authentication system the encryption module A1 is further configured to add customer identity information to an API interface public key; and the first confirmation module is further configured to access according to an API interface public key.
- the authority confirms that the client terminal has the authority to the HTTP request.
- the identity information of the client may be added to the API interface key pair, and the identity of the API interface public key included in the HTTP request is checked before the authentication encrypted string operation of step 3 is performed. Whether the access authority corresponding to the information can support the client terminal having the authority of the HTTP request.
- an authentication system is further configured to confirm that the HTTP request includes post information, and the post information parameter string and the first character are deleted.
- Uniform resource identifier, API interface public key, client terminal time and get parameter string in the client terminal HTTP request are spliced, and the above characters are sorted according to a preset sorting rule after splicing; characters obtained after sorting String specification
- the location is inserted into the API interface key to obtain an authentication encrypted string; the authentication encrypted string is converted into an MD5 code.
- the POST information may be added to the authentication encrypted string to be sorted, thereby increasing the complexity of the authentication encrypted string. Further improve the security of the server.
- the preset threshold in the first confirmation module is ⁇ 5 minutes.
- the reason why the preset threshold is set to 5 minutes in this embodiment is that the Url of each HTTP request is time-limited, and even if the Url is caught by the packet capture, it can only use up to 5 minutes. Therefore, in order to ensure that the authenticated HTTP request is still valid, the preset threshold should be set to no more than 5 minutes.
- the preset sorting rule in the encryption module is: sorting according to the ascending/descending order of the first letter of each string.
- the sorting rule in this embodiment is only one of them, and the first letter of each character string is sorted in ascending/descending order in the 26 alphabets.
- the actual operation of the present invention is not limited to the above two sorting rules, and the string sorting purpose of the present invention can be achieved as long as it is a fixed scrambled sorting rule.
- an authentication system the first confirmation module and the second confirmation module are implemented by a script language lua module in a web server Nginx.
- Nginx is a lightweight web server / reverse proxy server and email (IMAP / POP3) proxy service. It is characterized by less memory and strong concurrency. In fact, Nginx's concurrency capability does perform better in the same type of web server.
- Lua is a small scripting language. A complete Lua interpreter is only 200k. In all current scripting engines, Lua scripting is the fastest.
- the authentication operation script implemented by Lua is embedded in the Nginx as a module to perform the authentication operations of steps 2 and 3, and the authentication speed is directly improved in the authentication operation implemented by PHP in the prior art.
- an authentication system further includes a proxy module, coupled to the second confirmation module A3, for obtaining the target information of the HTTP request.
- proxy_cache in the web server Nginx is used to proxy the business logic to the hypertext preprocessor.
- Proxy_cache is a built-in cache module that comes with Nginx.
- the Proxy_cache delegates to the PHP processing business logic. If the user terminal HTTP request hits the server cache, it directly returns the content it needs.
- FIG. 4 is a structural block diagram of an apparatus for illustrating an authentication method according to another embodiment of the present application.
- the device for operating a database includes: a processor 401, a memory 402, and a bus 403;
- the processor 401 and the memory 402 complete communication with each other through the bus 403.
- the processor 401 is configured to invoke a program instruction in the memory 402 to perform the method provided by the foregoing method embodiments, for example, including: adding an HTTP request in an API request to the client terminal HTTP request header information. The key, the current client terminal time, and the authentication encrypted character string; receiving the HTTP request of the client terminal, confirming that the API interface public key in the Header header information is correct, and confirming that the difference between the client terminal time and the current server time is less than a preset threshold. ; Confirm that the authentication encrypted string is correct.
- FIG. 1 Another embodiment of the present application discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are When executed, the computer can perform the method provided by the foregoing method embodiments, for example, including: adding an API interface public key, a current client terminal time, and an authentication encrypted character string in the HTTP request to the client terminal HTTP request header information; Receiving the client terminal HTTP request, confirming that the API interface public key in the header information is correct, confirming that the client terminal time and the current server time difference are less than a preset threshold; and confirming that the authentication encrypted string is correct.
- Another embodiment of the present application discloses a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the operations provided by the various method embodiments described above Method, for example comprising: at the guest The client terminal HTTP request Header header information adds an API request public key, a current client terminal time, and an authentication encrypted character string in the HTTP request; receives the client terminal HTTP request, and confirms that the API interface public key in the Header header information is correct, and confirms The difference between the client terminal time and the current server time is less than a preset threshold; and the authentication encrypted string is confirmed to be correct.
- the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
- the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
- the apparatus and the like of an authentication method described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as the unit may be or may be It is not a physical unit, it can be located in one place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Information Transfer Between Computers (AREA)
- Storage Device Security (AREA)
Abstract
Proposed are an authentication method and system. In the method, authentication information is added to Header information of an HTTP request of a client terminal, and finally, an authentication operation is performed. The present invention has the following beneficial effects: 1. adding authentication information to Header information of an HTTP request will not lead to inconsistency of URLs in the Header information of the HTTP request; and 2. a special authentication encryption character string generation algorithm can effectively prevent malicious imitation of a third party.
Description
交叉引用cross reference
本申请引用于2017年02月17日提交的专利名称为“一种鉴权方法及系统”的第201710087135X号中国专利申请,其通过引用被全部并入本申请。The present application is hereby incorporated by reference in its entirety in its entirety in its entirety in its entirety in the the the the the the the the the
本发明涉及通信技术领域,更具体地,涉及一种鉴权方法及系统。The present invention relates to the field of communication technologies, and in particular, to an authentication method and system.
目前,互联网软件产品从产品受众主要划分为两大类,包括面向终端消费者的大众类互联网产品,例如新浪微博Web端、知乎Web端等。这类产品的特点在于使用该类产品的对象是人类,大部分提供的媒体内容为无结构化的文本(例如小说、博客)、图片、音视频等。另一类产品面向的受众是计算机,即服务主要形式为提供编程接口的API(Application Programming Interface,应用程序接口),方便程序员利用该API进行二次开发。这类产品的特点在于服务的对象为计算机,提供的媒体内容大部分为结构化的文本,例如XML、JSON等。At present, Internet software products are mainly divided into two categories from product audiences, including popular Internet products for end consumers, such as Sina Weibo Web, Zhizhi Web. The characteristics of such products are that the objects of such products are human, and most of the provided media content is unstructured text (such as novels, blogs), pictures, audio and video, and the like. Another type of product is aimed at the computer, that is, the main form of the service is an API (Application Programming Interface) that provides a programming interface, which is convenient for programmers to use the API for secondary development. The characteristics of this type of product are that the service object is a computer, and the media content provided is mostly structured text, such as XML, JSON, and the like.
鉴权(authentication)是指验证用户是否拥有访问系统的权利。传统的鉴权是通过密码来验证的。这种方式的前提是,每个获得密码的用户都已经被授权。在建立用户时,就为此用户分配一个密码,用户的密码可以由管理员指定,也可以由用户自行申请。这种方式的弱点十分明显:一旦密码被偷或用户遗失密码,情况就会十分麻烦,需要管理员对用户密码进行重新修改,而修改密码之前还要人工验证用户的合法身份。为了克服这种鉴权方式的缺点,需要一个更加可靠的鉴权方式。目前的主流鉴权方式是利用认证授权来验证数字签名的正
确与否。Authentication refers to verifying that a user has the right to access the system. Traditional authentication is verified by a password. The premise of this approach is that each user who receives the password is already authorized. When a user is created, the user is assigned a password, which can be specified by the administrator or by the user. The weakness of this method is very obvious: once the password is stolen or the user loses the password, the situation will be very troublesome. The administrator needs to re-edit the user password, and manually verify the user's legal identity before modifying the password. In order to overcome the shortcomings of this authentication method, a more reliable authentication method is needed. The current mainstream authentication method is to use the authentication and authorization to verify the positive of the digital signature.
True or not.
针对API型产品,目前对于接入其的对应用户终端鉴权常见的做法是利用相应的鉴权加密算法,生成与用户终端请求信息相对应的鉴权加密字符串与用户终端发送的请求信息一同发送给需要访问的服务器,服务器利用PHP(ertext Preprocessor,“超文本预处理器”)是一种通用开源脚本语言,进行鉴权操作。For the API type product, the common practice for authenticating the corresponding user terminal accessing it is to use the corresponding authentication encryption algorithm to generate the authentication encrypted string corresponding to the request information of the user terminal together with the request information sent by the user terminal. Sended to the server that needs to be accessed, the server uses PHP (ertext Preprocessor), which is a general-purpose open source scripting language for authentication operations.
然而,不同的大型科技公司由于自身安全考虑,都会设计各自的鉴权加密算法;同时,利用PHP进行鉴权操作不能满足很多情形下对于鉴权效率的更高要求。However, different large technology companies will design their own authentication encryption algorithms for their own security reasons. At the same time, the use of PHP for authentication operations cannot meet the higher requirements for authentication efficiency in many cases.
发明内容Summary of the invention
本发明为克服上述问题或者至少部分地解决上述问题,提供一种鉴权方法及系统。The present invention provides an authentication method and system for overcoming the above problems or at least partially solving the above problems.
根据本发明的一个方面,提供一种鉴权方法,包括:According to an aspect of the present invention, an authentication method is provided, including:
步骤1,在所述客户终端HTTP请求Header头信息中添加HTTP请求中API接口公钥、当前客户终端时刻和鉴权加密字符串;Step 1: Add an API interface public key, a current client terminal time, and an authentication encrypted character string in the HTTP request to the client terminal HTTP request header information;
步骤2,接收所述客户终端HTTP请求,确认所述Header头信息中API接口公钥正确,确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;Step 2: Receive an HTTP request from the client terminal, confirm that the API interface public key in the header information is correct, and confirm that the difference between the client terminal time and the current server time is less than a preset threshold;
步骤3,确认所述鉴权加密字符串正确。Step 3: Confirm that the authentication encrypted string is correct.
根据本发明的另一个方面,提供一种鉴权系统,包括加密模块、第一确认模块和第二确认模块:According to another aspect of the present invention, an authentication system is provided, including an encryption module, a first confirmation module, and a second confirmation module:
所述加密模块与所述第一确认模块相连,用于生成鉴权加密字符串;在所述客户终端HTTP请求Header头信息中添加API接口公钥、当前客户终端时刻和鉴权加密字符串;
The cryptographic module is connected to the first acknowledgment module, and configured to generate an authentication encrypted character string; adding an API interface public key, a current client terminal time, and an authentication encrypted character string to the client terminal HTTP request header information;
所述第一确认模块分别与所述加密模块和第二确认模块相连,用于接收所述客户终端HTTP请求,确认所述API接口公钥正确;确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;The first confirmation module is connected to the encryption module and the second confirmation module, respectively, for receiving the HTTP request of the client terminal, confirming that the API interface public key is correct, and confirming that the client terminal time and the current server time difference are Less than a preset threshold;
所述第二确认模块与所述第一确认模块相连,用于确认所述鉴权加密字符串正确。The second confirmation module is connected to the first confirmation module, and is configured to confirm that the authentication encrypted string is correct.
本申请提出一种鉴权方法及系统,所述方法在客户终端HTTP请求Header头信息中添加鉴权信息,Nginx。本发明具有如下有益效果:1、将鉴权信息加入HTTP请求Header头信息中,不会导致HTTP请求Header头信息中Url不一致;2、特殊的鉴权加密字符串生成算法能够有效的防止第三方的恶意模仿。The present application proposes an authentication method and system, which adds authentication information, Nginx, to the client terminal HTTP request header information. The invention has the following beneficial effects: 1. Adding the authentication information to the HTTP request Header header information does not cause the Url of the HTTP request Header header information to be inconsistent; 2. The special authentication encryption string generation algorithm can effectively prevent the third party. Malicious imitation.
图1为根据本发明实施例一种鉴权方法的整体流程示意图;1 is a schematic overall flow chart of an authentication method according to an embodiment of the present invention;
图2为根据本发明实施例一种鉴权方法的流程示意图;2 is a schematic flow chart of an authentication method according to an embodiment of the present invention;
图3为根据本发明实施例一种鉴权系统的整体框架示意图;3 is a schematic diagram of an overall framework of an authentication system according to an embodiment of the present invention;
图4为根据本发明实施例一种鉴权系统的设备的结构框图。4 is a structural block diagram of an apparatus of an authentication system according to an embodiment of the present invention.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。首先对于本发明具体实施例中涉及到的一些技术名词进行说明。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention. First, some technical terms involved in the specific embodiments of the present invention will be described.
HTTP:从客户端到服务器端的请求消息。HTTP: Request message from client to server.
Header:HTTP请求中所携带的Header头信息。Header: Header header information carried in the HTTP request.
API(Application Programming Interface,应用程序编程接口):是
一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力,而又无需访问源码,或理解内部工作机制的细节。API (Application Programming Interface): Yes
Some predefined functions are designed to provide the ability for applications and developers to access a set of routines based on a piece of software or hardware without having to access the source code or understand the details of the internal workings.
公钥(Public Key)与私钥(Private Key)是通过一种算法得到的一个密钥对(即一个公钥和一个私钥),公钥是密钥对中公开的部分,私钥则是非公开的部分。公钥通常用于加密会话密钥、验证数字签名,或加密可以用相应的私钥解密的数据。通过这种算法得到的密钥对能保证在世界范围内是唯一的。使用这个密钥对的时候,如果用其中一个密钥加密一段数据,必须用另一个密钥解密。比如用公钥加密数据就必须用私钥解密,如果用私钥加密也必须用公钥解密,否则解密将不会成功。Public Key and Private Key are a pair of keys obtained by an algorithm (ie, a public key and a private key). The public key is the public part of the key pair, and the private key is not. The public part. Public keys are typically used to encrypt session keys, verify digital signatures, or encrypt data that can be decrypted with the corresponding private key. The key pair obtained by this algorithm is guaranteed to be unique worldwide. When using this key pair, if one piece of data is used to encrypt a piece of data, it must be decrypted with another key. For example, encrypting data with a public key must be decrypted with a private key. If it is encrypted with a private key, it must be decrypted with a public key, otherwise the decryption will not succeed.
公钥AID:API接口加密使用的公钥。Public Key AID: The public key used for API interface encryption.
秘钥AID:API接口加密使用的秘钥,不对外,由服务器端提供。Key AID: The key used by the API interface to encrypt, not external, provided by the server.
MD5:Message Digest Algorithm MD5(信息-摘要算法5)。MD5: Message Digest Algorithm MD5 (Information-Summary Algorithm 5).
GET请求:HTTP客户端发送请求的类型,表示向Web服务器请求一个文件。GET request: The type of request sent by the HTTP client, indicating that a file is requested from the web server.
Post请求:HTTP客户端发送请求的类型,表示向Web服务器发送数据让Web服务器进行处理。Post request: The type of request sent by the HTTP client, indicating that the data is sent to the web server for processing by the web server.
鉴权加密字符串:根据一定规则生产的用于鉴权的加密字符串。Authentication Encryption String: An encrypted string used for authentication according to certain rules.
Nginx:是一款轻量级的Web服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务。Nginx: is a lightweight web server / reverse proxy server and email (IMAP / POP3) proxy service.
Proxy_cache:Nginx自带的内置缓存模块。Proxy_cache: Built-in caching module that comes with Nginx.
Url:统一资源标识符(Uniform Resource Identifier,或URI)是一个用于标识某一互联网资源名称的字符串。
Url: The Uniform Resource Identifier (or URI) is a string that identifies the name of an Internet resource.
lua是一个小巧的脚本语言,一个完整的Lua解释器不过200k,在目前所有脚本引擎中,Lua的速度是最快的。Lua is a small scripting language. A complete Lua interpreter is only 200k. In all current scripting engines, Lua is the fastest.
如图1,示出本发明一个具体实施例中一种鉴权方法总体流程示意图。整体上,包括以下步骤:步骤1,在所述客户终端HTTP请求Header头信息中添加HTTP请求中API接口公钥、当前客户终端时刻和鉴权加密字符串;步骤2,接收所述客户终端HTTP请求,确认所述API接口公钥正确;确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;步骤3,确认所述鉴权加密字符串正确。FIG. 1 is a schematic diagram showing the overall flow of an authentication method in a specific embodiment of the present invention. As a whole, the method includes the following steps: Step 1: Add an API request public key, a current client terminal time, and an authentication encrypted character string in an HTTP request to the client terminal HTTP request header information; Step 2, receive the client terminal HTTP The request confirms that the API interface public key is correct; confirms that the client terminal time and the current server time difference are less than a preset threshold; and step 3, confirms that the authentication encrypted string is correct.
在本发明上述具体实施例中,将加密信息客户终端HTTP请求Header头信息中不会导致HTTP请求Url不一致,不会因为请求Url不一致导致命中不了服务器缓存。In the above specific embodiment of the present invention, the HTTP request header information of the encrypted information client terminal does not cause the HTTP request Url to be inconsistent, and the server cache cannot be hit because the request Url is inconsistent.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤1中鉴权加密字符串通过以下步骤生成:S11,将所述HTTP请求中的统一资源标识符的第一个字符“/”删除;S12,将删除字符“/”得到的字符串和HTTP请求中API接口公钥、客户终端时刻,和所述客户终端HTTP请求中的get参数字符串按照预设排序规则进行排序;将所述排序后各字符串按顺序进行拼接;S13,在所述拼接后得到的字符串中指定位置插入API接口秘钥;得到鉴权加密字符串;将所述鉴权加密字符串转换为MD5码。In another embodiment of the present invention, an authentication method, the authentication encrypted string in the step 1 is generated by the following steps: S11, the first character of the uniform resource identifier in the HTTP request is / "Delete; S12, the character string obtained by deleting the character "/" and the API interface public key in the HTTP request, the client terminal time, and the get parameter string in the HTTP request of the client terminal are sorted according to a preset sorting rule; Sequencing the sorted strings in sequence; S13, inserting an API interface key in a specified position in the string obtained after the splicing; obtaining an authentication encrypted string; converting the authentication encrypted string into MD5 code.
在本发明上述具体实施例中,通过特殊生成规则生成的鉴权加密字符串可以有效防止第三方爬虫或恶意攻击的侵扰,从而提高被访问服务器的安全性。由于MD5是一种不可逆的加密算法,安全性很高,广泛被用作判断文件完整性;所以将生成的鉴权加密字符串转换为MD5码,能够有效的防止最终鉴权加密字符串被反向破解,更高程度的保证了鉴权加密字符串的安全有效性。In the above specific embodiment of the present invention, the authentication encrypted string generated by the special generation rule can effectively prevent the third party crawling or malicious attack, thereby improving the security of the accessed server. Because MD5 is an irreversible encryption algorithm, it has high security and is widely used to judge file integrity. Therefore, converting the generated authentication encrypted string to MD5 code can effectively prevent the final authentication encrypted string from being reversed. To the crack, a higher degree of security and validity of the authentication encrypted string is guaranteed.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤2前还包括:
确认所述客户终端HTTP请求Header头信息中同时包含API接口公钥、客户终端时刻和鉴权加密字符串。完成上述步骤后再执行步骤2的确认过程,避免在三个字段不全的全框架就执行步骤2确认操作,浪费不必要的服务器资源与时间。In another embodiment of the present invention, an authentication method, before the step 2, further includes:
Confirming that the client terminal HTTP request Header header information includes both an API interface public key, a client terminal time, and an authentication encrypted string. After the above steps are completed, the confirmation process of step 2 is performed to avoid the step 2 confirmation operation in the full frame of the three fields, which wastes unnecessary server resources and time.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤3前还包括:将客户身份信息加入API接口公钥中,根据API接口公钥访问权限确认所述客户终端具有所述HTTP请求的权限。在本实施例中,可以将客户的身份信息加入所述API接口钥匙对中,需要执行所述步骤3的鉴权加密字符串操作前,检查所述HTTP请求包含的API接口公钥中的身份信息对应的访问权限是否能够支持所述客户终端具有所述HTTP请求的权限。In another embodiment of the present invention, an authentication method, the step 3 further includes: adding the customer identity information to the API interface public key, and confirming, according to the API interface public key access authority, that the client terminal has the Permissions for HTTP requests. In this embodiment, the identity information of the client may be added to the API interface key pair, and the identity of the API interface public key included in the HTTP request is checked before the authentication encrypted string operation of step 3 is performed. Whether the access authority corresponding to the information can support the client terminal having the authority of the HTTP request.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤1中生成鉴权加密字符串还包括:S11’,确认所述HTTP请求中包含post信息;S12’,将所述post信息参数字符串与所述删除第一个字符“/”的统一资源标识符、API接口公钥、客户终端时刻和客户终端HTTP请求中的get参数字符串进行拼接,拼接后将上述各字符按预设排序规则进行排序;S13’,在排序后获得的字符串指定位置插入API接口秘钥,获得鉴权加密字符串;将所述鉴权加密字符串转换为MD5码。In another embodiment of the present invention, an authentication method, the generating an authentication encrypted string in the step 1 further includes: S11', confirming that the HTTP request includes post information; S12', the post is The information parameter string is spliced with the uniform resource identifier of the first character "/", the API interface public key, the client terminal time, and the get parameter string in the client terminal HTTP request, and the characters are pressed after the splicing The preset sorting rule is sorted; S13', the API interface key is inserted in the specified position of the string obtained after sorting, and the authentication encrypted string is obtained; and the authentication encrypted string is converted into the MD5 code.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤2中的预设阈值≤5分钟。本实施例中预设阈值设置为5分钟的原因为:每次HTTP请求的Url都是有时间限制的,即使Url被抓包抓到了,最多也只能使用5分钟时间。所以,为了保证被鉴权后的HTTP请求还是有效的,应当将所述预设阈值设置为不超过5分钟。In another embodiment of the present invention, an authentication method, the preset threshold in the step 2 is ≤ 5 minutes. The reason why the preset threshold is set to 5 minutes in this embodiment is that the Url of each HTTP request is time-limited, and even if the Url is caught by the packet capture, it can only use up to 5 minutes. Therefore, in order to ensure that the authenticated HTTP request is still valid, the preset threshold should be set to no more than 5 minutes.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤1中预设排序规则为:按照所述各字符串首字母的升/降序进行排序。本实施例中的排序规则只是其中一种,将各字符串首字母在26字母表中的升
/降序进行排序。本发明在实际操作不限于上述两种排序规则,只要是固定的打乱排序规则都能够实现本发明的字符串排序目的。In another embodiment of the present invention, in an authentication method, the preset sorting rule in the step 1 is: sorting according to the ascending/descending order of the first letter of each string. The sorting rule in this embodiment is only one of them, and the initials of each string are raised in the 26 alphabets.
/ Sort in descending order. The actual operation of the present invention is not limited to the above two sorting rules, and the string sorting purpose of the present invention can be achieved as long as it is a fixed scrambled sorting rule.
图2中,示出本发明另一个具体实施例一种鉴权方法整体流程示意图。总体上,包括以下步骤:FIG. 2 is a schematic diagram showing the overall flow of an authentication method according to another embodiment of the present invention. In general, the following steps are included:
客户终端在HTTP请求Header头中附加公钥aid、客户端当前请求时间戳time、鉴权加密字符串auth。The client terminal attaches the public key aid, the client current request timestamp time, and the authentication encryption string auth to the HTTP request header.
上述具体加密auth生成算法如下:(1)请求的接口地址uri(即/api/thirdPart/live)部分,从第二位开始截取(即api/v1/live);(2)上述步骤获得的字符串与get参数、公钥aid和time拼接后,根据各参数字符串首字母名升序排序。所述公钥aid中包含客户身份信息。(3)在用户HTTP请求中包含post数据时,上一步骤排序后用&符号连接到get参数字符串后再进行上一步骤的排序操作,随后将秘钥插入所述字符串中指定位置,最后得出加密的字符串(api/thirdPart/live?aid=xxx&limit=10&offset=30&time=146 8897751+客户端密钥KEY+post参数字符串);并将所述字符串转换为MD5码。The above specific encryption auth generation algorithm is as follows: (1) the requested interface address uri (ie /api/thirdPart/live) part, intercepted from the second bit (ie api/v1/live); (2) the characters obtained in the above steps After the string is concatenated with the get parameter, the public key aid, and time, it is sorted in ascending order according to the initial name of each parameter string. The public key aid contains customer identity information. (3) When the post data is included in the user HTTP request, the last step is sorted and then connected to the get parameter string with the & symbol, and then the sort operation of the previous step is performed, and then the secret key is inserted into the specified position in the string. Finally, an encrypted string (api/thirdPart/live?aid=xxx&limit=10&offset=30&time=146 8897751+client key KEY+post parameter string) is obtained; and the string is converted into an MD5 code.
服务器Nginx中lua模块检查Header里面是否同时包含aid、time、auth三个字段;服务器检查公钥aid的合法性;服务器检查客户端传过来的time和服务器的time误差是否在5分钟之内;服务器检查公钥AID访问权限范围;检查鉴权字符串是否正确。The lua module in the server Nginx checks whether the header contains three fields: aid, time, and auth; the server checks the validity of the public key aid; the server checks whether the time passed by the client and the time error of the server are within 5 minutes; Check the public key AID access permission range; check whether the authentication string is correct.
利用Nginx的proxy_cache缓存功能,如果没有命中缓存就代理到php里面处理业务逻辑,命中了就直接返回。Use Nginx's proxy_cache caching function to proxy the business logic to the php if there is no hit cache, and return directly if hit.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤2、3由Web服务器Nginx中的脚本语言lua模块执行。In another embodiment of the present invention, an authentication method is performed by the scripting language lua module in the web server Nginx.
Nginx:是一款轻量级的Web服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务。其特点是占有内存少,并发能力强,事实上Nginx的并发能力确实在同类型的网页服务器中表现较好。Lua是
一个小巧的脚本语言,一个完整的Lua解释器不过200k,在目前所有脚本引擎中,Lua脚本处理的速度是最快的。将Lua实现的鉴权操作脚本作为一个模块嵌在所述Nginx中执行步骤2、3的鉴权操作相比现有技术中直接在PHP实现的鉴权操作中进行鉴权速度有明显的提升。Nginx: is a lightweight web server / reverse proxy server and email (IMAP / POP3) proxy service. It is characterized by less memory and strong concurrency. In fact, Nginx's concurrency capability does perform better in the same type of web server. Lua is
A small scripting language, a full Lua interpreter but 200k, Lua script processing is the fastest in all current scripting engines. The authentication operation script implemented by Lua is embedded in the Nginx as a module to perform the authentication operations of steps 2 and 3, and the authentication speed is directly improved in the authentication operation implemented by PHP in the prior art.
在本发明另一个具体实施例中,一种鉴权方法,所述步骤3后还包括:当所述HTTP请求的获取目标信息不在服务器缓存中时,利用所述Web服务器Nginx中的缓存模块proxy_cache代理到超文本预处理器中处理业务逻辑。Proxy_cache为Nginx自带的内置缓存模块。当所述HTTP请求没有在服务器缓存中获取到想要的信息时,Proxy_cache就代理到PHP处理业务逻辑。如果用户终端HTTP请求命中了服务器缓存就直接返回其需要的内容。In another embodiment of the present invention, an authentication method, after the step 3, further includes: when the acquisition target information of the HTTP request is not in the server cache, using the cache module proxy_cache in the web server Nginx The agent processes the business logic into the hypertext preprocessor. Proxy_cache is a built-in cache module that comes with Nginx. When the HTTP request does not get the desired information in the server cache, the Proxy_cache delegates to the PHP processing business logic. If the user terminal HTTP request hits the server cache, it directly returns the content it needs.
图3中,示出本发明一个具体实施例中一种鉴权系统整体结构示意图。总体上,包括加密模块A1、第一确认模块A2和第二确认模块A3:所述加密模块A1与所述第一确认模块A2相连,用于生成鉴权加密字符串;在所述客户终端HTTP请求Header头信息中添加API接口公钥、当前客户终端时刻和鉴权加密字符串;所述第一确认模块A2分别与所述加密模块A1和第二确认模块A3相连,用于接收所述客户终端HTTP请求,确认所述API接口公钥正确;确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;所述第二确认模块A3与所述第一确认模块A2相连,用于确认所述鉴权加密字符串正确。FIG. 3 is a schematic diagram showing the overall structure of an authentication system in a specific embodiment of the present invention. Generally, the encryption module A1, the first confirmation module A2, and the second confirmation module A3 are included: the encryption module A1 is connected to the first confirmation module A2, and is used to generate an authentication encrypted character string; Adding an API interface public key, a current client terminal time, and an authentication encryption string to the Header header information; the first confirmation module A2 is connected to the encryption module A1 and the second confirmation module A3, respectively, for receiving the client The terminal HTTP request confirms that the API interface public key is correct; and confirms that the client terminal time and the current server time difference are less than a preset threshold; the second confirmation module A3 is connected to the first confirmation module A2 for confirming The authentication encrypted string is correct.
在本发明上述具体实施例中,将加密信息客户终端HTTP请求Header头信息中不会导致HTTP请求Url不一致,不会因为请求Url不一致导致命中不了服务器缓存。In the above specific embodiment of the present invention, the HTTP request header information of the encrypted information client terminal does not cause the HTTP request Url to be inconsistent, and the server cache cannot be hit because the request Url is inconsistent.
在本发明另一个具体实施例中,一种鉴权系统,所述加密模块A1还包括鉴权加密字符串生成单元,用于将所述HTTP请求中的统一资源标识符的第一个字符“/”删除;将删除字符“/”得到的字符串和HTTP
请求中API接口公钥、客户终端时刻和所述客户终端HTTP请求中的get参数字符串按照预设排序规则进行排序;将所述排序后各字符串按顺序进行拼接;在所述拼接后得到的字符串中指定位置插入API接口秘钥;得到鉴权加密字符串;将所述鉴权加密字符串转换为MD5码。In another embodiment of the present invention, an authentication system, the encryption module A1 further includes an authentication encrypted string generating unit, configured to: use a first character of the uniform resource identifier in the HTTP request. /"delete; will remove the character "/" to get the string and HTTP
The API parameter public key, the client terminal time, and the get parameter string in the client terminal HTTP request are sorted according to a preset sorting rule; the sorted strings are sequentially spliced; The API interface key is inserted in the specified position in the string; the authentication encrypted string is obtained; and the authentication encrypted string is converted into the MD5 code.
在本发明上述具体实施例中,鉴权加密字符串生成单元通过特殊生成规则生成的鉴权加密字符串可以有效防止第三方爬虫或恶意攻击的侵扰,从而提高被访问服务器的安全性。由于MD5是一种不可逆的加密算法,安全性很高,广泛被用作判断文件完整性;所以将生成的鉴权加密字符串转换为MD5码,能够有效的防止最终鉴权加密字符串被反向破解,更高程度的保证了鉴权加密字符串的安全有效性。In the above specific embodiment of the present invention, the authentication encrypted string generating unit can effectively prevent third party crawling or malicious attack intrusion through the authentication encrypted string generated by the special generating rule, thereby improving the security of the accessed server. Because MD5 is an irreversible encryption algorithm, it has high security and is widely used to judge file integrity. Therefore, converting the generated authentication encrypted string to MD5 code can effectively prevent the final authentication encrypted string from being reversed. To the crack, a higher degree of security and validity of the authentication encrypted string is guaranteed.
在本发明另一个具体实施例中,一种鉴权系统,所述第一确认单元还用于:确认所述客户终端HTTP请求Header头信息中同时包含API接口公钥、客户终端时刻和鉴权加密字符串。完成上述步骤后再执行步骤2的确认过程,避免在三个字段不全的全框架就执行步骤2确认操作,浪费不必要的服务器资源与时间。In another embodiment of the present invention, an authentication system is further configured to: confirm that the client terminal HTTP request header information includes an API interface public key, a client terminal time, and an authentication. Encrypt the string. After the above steps are completed, the confirmation process of step 2 is performed to avoid the step 2 confirmation operation in the full frame of the three fields, which wastes unnecessary server resources and time.
在本发明另一个具体实施例中,一种鉴权系统,所述加密模块A1还用于将客户身份信息加入API接口公钥中;所述第一确认模块还用于根据API接口公钥访问权限确认所述客户终端具有所述HTTP请求的权限。在本实施例中,可以将客户的身份信息加入所述API接口钥匙对中,需要执行所述步骤3的鉴权加密字符串操作前,检查所述HTTP请求包含的API接口公钥中的身份信息对应的访问权限是否能够支持所述客户终端具有所述HTTP请求的权限。In another embodiment of the present invention, an authentication system, the encryption module A1 is further configured to add customer identity information to an API interface public key; and the first confirmation module is further configured to access according to an API interface public key. The authority confirms that the client terminal has the authority to the HTTP request. In this embodiment, the identity information of the client may be added to the API interface key pair, and the identity of the API interface public key included in the HTTP request is checked before the authentication encrypted string operation of step 3 is performed. Whether the access authority corresponding to the information can support the client terminal having the authority of the HTTP request.
在本发明另一个具体实施例中,一种鉴权系统,所述加密模块还用于确认所述HTTP请求中包含post信息,将所述post信息参数字符串与所述删除第一个字符“/”的统一资源标识符、API接口公钥、客户终端时刻和客户终端HTTP请求中的get参数字符串进行拼接,拼接后将上述各字符按预设排序规则进行排序;在排序后获得的字符串指定
位置插入API接口秘钥,获得鉴权加密字符串;将所述鉴权加密字符串转换为MD5码。本发明具体实施例中,考虑到了当客户终端发送的HTTP请求中包含有POST信息时,可以将POST信息一起加入鉴权加密字符串中进行排序,从而增加鉴权加密字符串的复杂性,进而进一步提高服务器的安全性。In another embodiment of the present invention, an authentication system is further configured to confirm that the HTTP request includes post information, and the post information parameter string and the first character are deleted. /" Uniform resource identifier, API interface public key, client terminal time and get parameter string in the client terminal HTTP request are spliced, and the above characters are sorted according to a preset sorting rule after splicing; characters obtained after sorting String specification
The location is inserted into the API interface key to obtain an authentication encrypted string; the authentication encrypted string is converted into an MD5 code. In the specific embodiment of the present invention, when the POST information is included in the HTTP request sent by the client terminal, the POST information may be added to the authentication encrypted string to be sorted, thereby increasing the complexity of the authentication encrypted string. Further improve the security of the server.
在本发明另一个具体实施例中,一种鉴权系统,所述第一确认模块中的预设阈值≤5分钟。本实施例中预设阈值设置为5分钟的原因为:每次HTTP请求的Url都是有时间限制的,即使Url被抓包抓到了,最多也只能使用5分钟时间。所以,为了保证被鉴权后的HTTP请求还是有效的,应当将所述预设阈值设置为不超过5分钟。In another embodiment of the present invention, an authentication system, the preset threshold in the first confirmation module is ≤ 5 minutes. The reason why the preset threshold is set to 5 minutes in this embodiment is that the Url of each HTTP request is time-limited, and even if the Url is caught by the packet capture, it can only use up to 5 minutes. Therefore, in order to ensure that the authenticated HTTP request is still valid, the preset threshold should be set to no more than 5 minutes.
在本发明另一个具体实施例中,一种鉴权系统,所述加密模块中的预设排序规则为:按照所述各字符串首字母的升/降序进行排序。本实施例中的排序规则只是其中一种,将各字符串首字母在26字母表中的升/降序进行排序。本发明在实际操作不限于上述两种排序规则,只要是固定的打乱排序规则都能够实现本发明的字符串排序目的。In another embodiment of the present invention, an authentication system, the preset sorting rule in the encryption module is: sorting according to the ascending/descending order of the first letter of each string. The sorting rule in this embodiment is only one of them, and the first letter of each character string is sorted in ascending/descending order in the 26 alphabets. The actual operation of the present invention is not limited to the above two sorting rules, and the string sorting purpose of the present invention can be achieved as long as it is a fixed scrambled sorting rule.
在本发明另一个具体实施例中,一种鉴权系统,所述第一确认模块、第二确认模块由Web服务器Nginx中的脚本语言lua模块实现。Nginx:是一款轻量级的Web服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务。其特点是占有内存少,并发能力强,事实上Nginx的并发能力确实在同类型的网页服务器中表现较好。Lua是一个小巧的脚本语言,一个完整的Lua解释器不过200k,在目前所有脚本引擎中,Lua脚本处理的速度是最快的。将Lua实现的鉴权操作脚本作为一个模块嵌在所述Nginx中执行步骤2、3的鉴权操作相比现有技术中直接在PHP实现的鉴权操作中进行鉴权速度有明显的提升。In another embodiment of the present invention, an authentication system, the first confirmation module and the second confirmation module are implemented by a script language lua module in a web server Nginx. Nginx: is a lightweight web server / reverse proxy server and email (IMAP / POP3) proxy service. It is characterized by less memory and strong concurrency. In fact, Nginx's concurrency capability does perform better in the same type of web server. Lua is a small scripting language. A complete Lua interpreter is only 200k. In all current scripting engines, Lua scripting is the fastest. The authentication operation script implemented by Lua is embedded in the Nginx as a module to perform the authentication operations of steps 2 and 3, and the authentication speed is directly improved in the authentication operation implemented by PHP in the prior art.
在本发明另一个具体实施例中,一种鉴权系统,还包括代理模块,与所述第二确认模块A3相连,用于当所述HTTP请求的获取目标信息
不在服务器缓存中时,利用所述Web服务器Nginx中的缓存模块proxy_cache代理到超文本预处理器中处理业务逻辑。Proxy_cache为Nginx自带的内置缓存模块。当所述HTTP请求没有在服务器缓存中获取到想要的信息时,Proxy_cache就代理到PHP处理业务逻辑。如果用户终端HTTP请求命中了服务器缓存就直接返回其需要的内容。In another embodiment of the present invention, an authentication system further includes a proxy module, coupled to the second confirmation module A3, for obtaining the target information of the HTTP request.
When not in the server cache, the cache module proxy_cache in the web server Nginx is used to proxy the business logic to the hypertext preprocessor. Proxy_cache is a built-in cache module that comes with Nginx. When the HTTP request does not get the desired information in the server cache, the Proxy_cache delegates to the PHP processing business logic. If the user terminal HTTP request hits the server cache, it directly returns the content it needs.
图4是示出本申请另一具体实施例的一种鉴权方法的设备的结构框图。FIG. 4 is a structural block diagram of an apparatus for illustrating an authentication method according to another embodiment of the present application.
参照图4,所述一种操作数据库的设备,包括:处理器(processor)401、存储器(memory)402和总线403;Referring to FIG. 4, the device for operating a database includes: a processor 401, a memory 402, and a bus 403;
其中,处理器401及存储器402通过所述总线403完成相互间的通信;The processor 401 and the memory 402 complete communication with each other through the bus 403.
所述处理器401用于调用所述存储器402中的程序指令,以执行上述各方法实施例所提供的方法,例如包括:在所述客户终端HTTP请求Header头信息中添加HTTP请求中API接口公钥、当前客户终端时刻和鉴权加密字符串;接收所述客户终端HTTP请求,确认所述Header头信息中API接口公钥正确,确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;确认所述鉴权加密字符串正确。The processor 401 is configured to invoke a program instruction in the memory 402 to perform the method provided by the foregoing method embodiments, for example, including: adding an HTTP request in an API request to the client terminal HTTP request header information. The key, the current client terminal time, and the authentication encrypted character string; receiving the HTTP request of the client terminal, confirming that the API interface public key in the Header header information is correct, and confirming that the difference between the client terminal time and the current server time is less than a preset threshold. ; Confirm that the authentication encrypted string is correct.
本申请另一具体实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的方法,例如包括:在所述客户终端HTTP请求Header头信息中添加HTTP请求中API接口公钥、当前客户终端时刻和鉴权加密字符串;接收所述客户终端HTTP请求,确认所述Header头信息中API接口公钥正确,确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;确认所述鉴权加密字符串正确。Another embodiment of the present application discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are When executed, the computer can perform the method provided by the foregoing method embodiments, for example, including: adding an API interface public key, a current client terminal time, and an authentication encrypted character string in the HTTP request to the client terminal HTTP request header information; Receiving the client terminal HTTP request, confirming that the API interface public key in the header information is correct, confirming that the client terminal time and the current server time difference are less than a preset threshold; and confirming that the authentication encrypted string is correct.
本申请另一具体实施例公开一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述各方法实施例所提供的方法,例如包括:在所述客
户终端HTTP请求Header头信息中添加HTTP请求中API接口公钥、当前客户终端时刻和鉴权加密字符串;接收所述客户终端HTTP请求,确认所述Header头信息中API接口公钥正确,确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;确认所述鉴权加密字符串正确。Another embodiment of the present application discloses a non-transitory computer readable storage medium storing computer instructions that cause the computer to perform the operations provided by the various method embodiments described above Method, for example comprising: at the guest
The client terminal HTTP request Header header information adds an API request public key, a current client terminal time, and an authentication encrypted character string in the HTTP request; receives the client terminal HTTP request, and confirms that the API interface public key in the Header header information is correct, and confirms The difference between the client terminal time and the current server time is less than a preset threshold; and the authentication encrypted string is confirmed to be correct.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
以上所描述的一种鉴权方法的设备等实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The apparatus and the like of an authentication method described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as the unit may be or may be It is not a physical unit, it can be located in one place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above-described technical solutions may be embodied in the form of software products in essence or in the form of software products, which may be stored in a computer readable storage medium such as ROM/RAM, magnetic Discs, optical discs, etc., include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments or portions of the embodiments.
最后,本申请的方法仅为较佳的实施方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
Claims (13)
- 一种鉴权方法,其特征在于,包括:An authentication method, comprising:步骤1,在所述客户终端HTTP请求Header头信息中添加HTTP请求中API接口公钥、当前客户终端时刻和鉴权加密字符串;Step 1: Add an API interface public key, a current client terminal time, and an authentication encrypted character string in the HTTP request to the client terminal HTTP request header information;步骤2,接收所述客户终端HTTP请求,确认所述Header头信息中API接口公钥正确,确认所述客户终端时刻与当前服务器时刻差值小于预设阈值;Step 2: Receive an HTTP request from the client terminal, confirm that the API interface public key in the header information is correct, and confirm that the difference between the client terminal time and the current server time is less than a preset threshold;步骤3,确认所述鉴权加密字符串正确。Step 3: Confirm that the authentication encrypted string is correct.
- 如权利要求1所述的方法,其特征在于,所述步骤1中鉴权加密字符串通过以下步骤生成:The method according to claim 1, wherein the authentication encrypted string in the step 1 is generated by the following steps:S11,将所述HTTP请求中的统一资源标识符的第一个字符“/”删除;S11. Delete the first character “/” of the uniform resource identifier in the HTTP request.S12,将删除字符“/”得到的字符串和HTTP请求中API接口公钥、客户终端时刻,和所述客户终端HTTP请求中的get参数字符串按照预设排序规则进行排序;将所述排序后各字符串按顺序进行拼接;S12. The character string obtained by deleting the character “/” and the API interface public key in the HTTP request, the client terminal time, and the get parameter string in the HTTP request of the client terminal are sorted according to a preset sorting rule; After each string is spliced in order;S13,在所述拼接后得到的字符串中指定位置插入API接口秘钥;得到鉴权加密字符串;将所述鉴权加密字符串转换为MD5码。S13. Insert an API interface key in the specified position in the string obtained after the splicing; obtain an authentication encrypted string; and convert the authentication encrypted string into an MD5 code.
- 如权利要求1所述的方法,其特征在于,所述步骤2前还包括:确认所述客户终端HTTP请求Header头信息中同时包含API接口公钥、客户终端时刻和鉴权加密字符串。The method according to claim 1, wherein the step 2 further comprises: confirming that the client terminal HTTP request Header header information includes an API interface public key, a client terminal time, and an authentication encrypted character string.
- 如权利要求1所述的方法,其特征在于,所述步骤3前还包括:将客户身份信息加入API接口公钥中,根据API接口公钥访问权限确认所述客户终端具有所述HTTP请求的权限。The method according to claim 1, wherein the step 3 further comprises: adding the customer identity information to the API interface public key, and confirming that the client terminal has the HTTP request according to the API interface public key access authority. Permissions.
- 如权利要求1所述的方法,其特征在于,所述步骤1中生成鉴权加密字符串还包括: The method of claim 1, wherein the generating the authentication encrypted string in the step 1 further comprises:S11’,确认所述HTTP请求中包含post信息;S11', confirming that the HTTP request includes post information;S12’,将所述post信息参数字符串与所述删除第一个字符“/”的统一资源标识符、API接口公钥、客户终端时刻和客户终端HTTP请求中的get参数字符串进行拼接,拼接后将上述各字符按预设排序规则进行排序;S12, splicing the post information parameter string with the uniform resource identifier of the first character "/", the API interface public key, the client terminal time, and the get parameter string in the client terminal HTTP request. After splicing, the above characters are sorted according to a preset sorting rule;S13’,在排序后获得的字符串指定位置插入API接口秘钥,获得鉴权加密字符串;将所述鉴权加密字符串转换为MD5码。S13', inserting an API interface key in the specified position of the string obtained after sorting, obtaining an authentication encrypted string; and converting the authentication encrypted string into an MD5 code.
- 如权利要求1所述的方法,其特征在于,所述步骤2中的预设阈值≤5分钟。The method of claim 1 wherein said predetermined threshold in step 2 is ≤ 5 minutes.
- 如权利要求2所述的方法,其特征在于,所述步骤1中预设排序规则为:按照所述各字符串按首字母的升/降序进行排序。The method according to claim 2, wherein the preset sorting rule in the step 1 is: sorting the respective character strings in ascending/descending order of the first letter.
- 如权利要求2所述的方法,其特征在于,所述步骤2、3由Web服务器Nginx中的脚本语言lua模块执行。The method of claim 2 wherein said steps 2, 3 are performed by a scripting language lua module in web server Nginx.
- 如权利要求8所述的方法,其特征在于,所述步骤3后还包括:当所述HTTP请求的获取目标信息不在服务器缓存中时,利用所述Web服务器Nginx中的缓存模块proxy_cache代理到超文本预处理器中处理业务逻辑。The method of claim 8, wherein the step 3 further comprises: when the acquisition target information of the HTTP request is not in the server cache, using the cache module proxy_cache in the web server Nginx to proxy to the super The business logic is processed in the text preprocessor.
- 一种鉴权系统,其特征在于,包括加密模块、第一确认模块和第二确认模块:An authentication system, comprising: an encryption module, a first confirmation module, and a second confirmation module:所述加密模块与所述第一确认模块相连,用于生成鉴权加密字符串;在所述客户终端HTTP请求Header头信息中添加API接口公钥、当前客户终端时刻和鉴权加密字符串;The cryptographic module is connected to the first acknowledgment module, and configured to generate an authentication encrypted character string; adding an API interface public key, a current client terminal time, and an authentication encrypted character string to the client terminal HTTP request header information;所述第一确认模块分别与所述加密模块和第二确认模块相连,用于接收所述客户终端HTTP请求,确认所述API接口公钥正确;确认所述客户终端时刻与当前服务器时刻差值小于预设阈值; The first confirmation module is connected to the encryption module and the second confirmation module, respectively, for receiving the HTTP request of the client terminal, confirming that the API interface public key is correct, and confirming that the client terminal time and the current server time difference are Less than a preset threshold;所述第二确认模块与所述第一确认模块相连,用于确认所述鉴权加密字符串正确。The second confirmation module is connected to the first confirmation module, and is configured to confirm that the authentication encrypted string is correct.
- 一种鉴权方法的设备,其特征在于,包括:An apparatus for authenticating a method, comprising:至少一个处理器;以及At least one processor;与所述处理器通信连接的至少一个存储器,其中:At least one memory communicatively coupled to the processor, wherein:所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如权利要求1至9任一所述的方法。The memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1-9.
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如权利要求1至9任一所述的方法。A computer program product, comprising: a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer performs the method of any one of claims 1 to 9.
- 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至9任一所述的方法。 A non-transitory computer readable storage medium, wherein the non-transitory computer readable storage medium stores computer instructions, the computer instructions causing the computer to perform the method of any one of claims 1 to 9. .
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710087135.X | 2017-02-17 | ||
CN201710087135.XA CN106911684B (en) | 2017-02-17 | 2017-02-17 | Authentication method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018149004A1 true WO2018149004A1 (en) | 2018-08-23 |
Family
ID=59207671
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/076603 WO2018149004A1 (en) | 2017-02-17 | 2017-03-14 | Authentication method and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106911684B (en) |
WO (1) | WO2018149004A1 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107483563A (en) * | 2017-07-31 | 2017-12-15 | 九次方大数据信息集团有限公司 | The data query method and apparatus and client and server of anti-reptile |
CN107733635B (en) * | 2017-11-29 | 2020-10-09 | 四川长虹电器股份有限公司 | Data security transmission method based on gateway |
CN108897898A (en) * | 2018-07-26 | 2018-11-27 | 广东浪潮大数据研究有限公司 | A kind of method, system and the server of the access of static website hosted data |
CN109150865A (en) * | 2018-08-07 | 2019-01-04 | 厦门市美亚柏科信息股份有限公司 | A kind of protection, device and the storage medium of mobile terminal APP communications protocol |
CN109522726B (en) * | 2018-10-16 | 2024-06-25 | 康键信息技术(深圳)有限公司 | Authentication method for applet, server and computer readable storage medium |
CN110636041A (en) * | 2019-08-09 | 2019-12-31 | 西藏宁算科技集团有限公司 | Cloud authentication scheme implementation method and system based on OpenResty |
CN111083681B (en) * | 2019-11-20 | 2023-08-29 | 广州小鹏汽车科技有限公司 | Close-range communication data encryption method, terminal equipment and vehicle |
CN112491549B (en) * | 2020-12-08 | 2024-09-20 | 平安国际智慧城市科技股份有限公司 | Data information encryption verification method, system and computer readable storage medium |
CN115002773B (en) * | 2022-06-30 | 2025-05-30 | 广州启生信息技术有限公司 | A cross-platform authentication method and device based on 5G messages |
CN115967496B (en) * | 2022-10-17 | 2025-01-14 | 深圳市元征科技股份有限公司 | Data transmission method, device, terminal equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100325421A1 (en) * | 2007-04-01 | 2010-12-23 | Samsung Eectronics Co., Ltd. | Apparatus and method for providing security service in home network |
US8181227B2 (en) * | 2006-08-29 | 2012-05-15 | Akamai Technologies, Inc. | System and method for client-side authenticaton for secure internet communications |
CN102739671A (en) * | 2012-06-26 | 2012-10-17 | 中国电力科学研究院 | Desktop virtualization and application display platform during cooperative computing of power system |
CN105022952A (en) * | 2014-04-28 | 2015-11-04 | 深圳市茁壮网络股份有限公司 | Middleware authentication method and middleware authentication device |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6885388B2 (en) * | 2001-04-25 | 2005-04-26 | Probaris Technologies Inc. | Method for automatically generating list of meeting participants and delegation permission |
US8621598B2 (en) * | 2008-03-12 | 2013-12-31 | Intuit Inc. | Method and apparatus for securely invoking a rest API |
CN105681470B (en) * | 2012-03-29 | 2018-12-28 | 北京奇虎科技有限公司 | Communication means, server based on hypertext transfer protocol, terminal |
CN103701761B (en) * | 2012-09-28 | 2017-07-18 | 中国电信股份有限公司 | Authentication method and system that open interface is called |
CN105262592A (en) * | 2015-09-18 | 2016-01-20 | 浪潮(北京)电子信息产业有限公司 | Data interaction method and API interface |
CN105306534B (en) * | 2015-09-21 | 2019-05-14 | 拉扎斯网络科技(上海)有限公司 | Information verification method based on open platform and open platform |
CN105450730A (en) * | 2015-11-05 | 2016-03-30 | 北京奇虎科技有限公司 | Method and apparatus for processing request from client |
CN105306473B (en) * | 2015-11-05 | 2018-06-22 | 北京奇虎科技有限公司 | A kind of method for preventing injection attacks, client, server and system |
CN105407102B (en) * | 2015-12-10 | 2019-05-17 | 四川长虹电器股份有限公司 | Http request data reliability verifying method |
CN106101258B (en) * | 2016-07-08 | 2021-05-25 | 腾讯科技(深圳)有限公司 | Interface calling method, device and system of hybrid cloud |
-
2017
- 2017-02-17 CN CN201710087135.XA patent/CN106911684B/en active Active
- 2017-03-14 WO PCT/CN2017/076603 patent/WO2018149004A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8181227B2 (en) * | 2006-08-29 | 2012-05-15 | Akamai Technologies, Inc. | System and method for client-side authenticaton for secure internet communications |
US20100325421A1 (en) * | 2007-04-01 | 2010-12-23 | Samsung Eectronics Co., Ltd. | Apparatus and method for providing security service in home network |
CN102739671A (en) * | 2012-06-26 | 2012-10-17 | 中国电力科学研究院 | Desktop virtualization and application display platform during cooperative computing of power system |
CN105022952A (en) * | 2014-04-28 | 2015-11-04 | 深圳市茁壮网络股份有限公司 | Middleware authentication method and middleware authentication device |
Also Published As
Publication number | Publication date |
---|---|
CN106911684B (en) | 2020-06-16 |
CN106911684A (en) | 2017-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018149004A1 (en) | Authentication method and system | |
CN112333198B (en) | Secure cross-domain login method, system and server | |
CN114586315B (en) | Systems, methods, and computer readable media for decentralised data authentication | |
US10574648B2 (en) | Methods and systems for user authentication | |
CN103944900B (en) | It is a kind of that attack prevention method and its device are asked across station based on encryption | |
CN111355726B (en) | Identity authorization login method and device, electronic equipment and storage medium | |
US8185942B2 (en) | Client-server opaque token passing apparatus and method | |
CN106685973B (en) | Method and device for remembering login information, login control method and device | |
CN105306473B (en) | A kind of method for preventing injection attacks, client, server and system | |
CN102946384B (en) | User authentication method and equipment | |
CN106027228B (en) | Encryption and decryption method and encryption and decryption system for webpage identifier | |
CN104935568A (en) | Interface authentication signature method facing cloud platform | |
WO2017028804A1 (en) | Web real-time communication platform authentication and access method and device | |
CN107809317A (en) | A kind of identity identifying method and system based on token digital signature | |
El-Booz et al. | A secure cloud storage system combining time-based one-time password and automatic blocker protocol | |
JP2006525563A (en) | User and web site authentication method and apparatus | |
CN104378376A (en) | SOA-based single-point login method, authentication server and browser | |
CN103001770B (en) | A kind of user rs authentication method, server and system | |
KR102137122B1 (en) | Security check method, device, terminal and server | |
CN101145911B (en) | Identity authentication method with privacy protection and password retrieval function | |
CN114268450B (en) | API interface authentication method and system | |
CN108777673B (en) | Bidirectional identity authentication method in block chain | |
CN110213195A (en) | A kind of login authentication method, server and user terminal | |
CN110071937B (en) | Login method, system and storage medium based on block chain | |
Seta et al. | Implement time based one time password and secure hash algorithm 1 for security of website login authentication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17896784 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 17896784 Country of ref document: EP Kind code of ref document: A1 |