CN115412242A - Method for realizing intelligent password key password calling application of full browser - Google Patents

Method for realizing intelligent password key password calling application of full browser Download PDF

Info

Publication number
CN115412242A
CN115412242A CN202211111369.0A CN202211111369A CN115412242A CN 115412242 A CN115412242 A CN 115412242A CN 202211111369 A CN202211111369 A CN 202211111369A CN 115412242 A CN115412242 A CN 115412242A
Authority
CN
China
Prior art keywords
request
browser
service program
local service
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211111369.0A
Other languages
Chinese (zh)
Inventor
张洪超
王腾飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanwei Xin'an Technology Co ltd
Original Assignee
Sanwei Xin'an Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanwei Xin'an Technology Co ltd filed Critical Sanwei Xin'an Technology Co ltd
Priority to CN202211111369.0A priority Critical patent/CN115412242A/en
Publication of CN115412242A publication Critical patent/CN115412242A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/33User authentication using certificates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention provides a method for realizing the application of calling an intelligent password key by a full browser, which comprises the following steps: establishing a local service program which accords with the code application interface specification of the intelligent code key and starting the local service program; the method comprises the steps that a JavaScript interface library is loaded by a browser, a method request parameter of a WEB application calling an intelligent password key through the JavaScript interface library is packaged into a request message in a JSON format, and the request message is sent to a local service program through an HTTPS protocol; the local service program judges the type of the request; the local service program carries out browser URL cross-domain request processing, or the local service program searches a processing method corresponding to a browser calling method in a method and request URL routing table according to the URL of the HTTPS request; and the local service program packages the result into a response message in a JSON format and returns the response message to the browser. The method and the system effectively improve the simplicity of browser calling based on the native HTTPS service, and simultaneously can support cross-domain request and synchronous mode method calling of Web application.

Description

Method for realizing intelligent password key password calling application of full browser
Technical Field
The invention belongs to the technical field of intelligent password key calling of browsers, relates to a method for realizing password application of intelligent password key calling of a full browser, and particularly relates to a method for providing intelligent password key calling capability for a browser through local HTTPS service.
Background
With the rapid development of technologies such as the internet, the requirements of browser application systems on data security and identity authentication are higher and higher, and more application systems adopt intelligent password keys as identity carriers and password operation equipment.
The main stream browser IE, chrome (before V42), firefox (before 52.9), when the local smart key is called in the Web application, the control call is realized by ActiveX or NPAPI technology. With the complete turning to Edge of the main stream browser such as IE stopping service, and Edge, chrome and Firefox no longer support ActiveX or NPAPI controls, great influence is brought to the user when using the browser to call the intelligent password key of the local machine, so that the call implementation method supporting the full browser to call the intelligent password key becomes a very necessary task, and with the technological progress of China, more and more mechanisms adopt domestic operating systems and browsers, so that the technology supporting the full browser to call the intelligent password key must be used to meet diversified requirements.
Therefore, how to provide a method for implementing a full browser invoking smart key cryptographic application based on an HTTPS communication protocol is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of this, the invention provides a method for implementing a full browser to call an intelligent password key password application, which solves the technical problems in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention discloses a method for realizing the application of calling an intelligent password key by a full browser, which comprises the following steps:
s1, establishing a local service program which accords with the code application interface specification of the intelligent code key and starting the local service program, wherein the local service program provides an interface which accords with the code application interface specification of the intelligent code key for a browser to call through a JavaScript interface;
s2, the browser loads a JavaScript interface library and packages the method request parameters of the WEB application calling the intelligent password key through the JavaScript interface library into a request message in a JSON format;
s3: the browser sends the request message in the JSON format to a local service program through an HTTPS protocol;
s4: after receiving the HTTPS request, the local service program judges whether the type of the request is OPTIONS; if yes, entering S5; if not, entering S6;
s5: the local service program carries out browser URL cross-domain request processing, returns an HTTPS response message allowing the cross-domain request, and enters S7;
s6: the method comprises the steps that a local service program searches a processing method corresponding to a browser calling method in a method and request URL routing table according to a URL (Uniform resource locator) of an HTTPS (hypertext transfer protocol secure) request, wherein the method and request URL routing table stores the corresponding relation between a URL path and an interface calling method in an intelligent password key password application interface specification; if the corresponding processing method is found, executing corresponding processing method calling of the request of the WEB application for calling the intelligent password key, and entering S7;
s7: and the local service program packages the result of calling the intelligent password key into a response message in a JSON format and returns the response message to the browser.
Preferably, in S3, the browser sends the request packet in the JSON format to the local service program through the XMLHttpRequest object.
Preferably, the S5 specifically includes:
the local service program returns an HTTPS response message allowing the cross-domain request; and after receiving the HTTPS response message allowing the cross-domain request, the browser automatically initiates a request for calling the intelligent password key by the WEB application with the POST type, and enters S7.
Preferably, after S7, the method further includes: and the browser analyzes the response message in the JSON format by using the JavaScript interface library, extracts information and displays a result.
Through the technical scheme, compared with the prior art, the invention has the beneficial effects that:
the invention provides a realization method for supporting a full browser to call an intelligent cipher key cipher application, which effectively improves the simplicity of browser calling based on the HTTPS service of a local machine, and simultaneously can support cross-domain request and synchronous mode method calling of Web application, wherein messages adopting JSON format in HTTPS request and response in the communication process conform to the calling habit of the browser application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts;
fig. 1 is a flowchart illustrating a method for invoking a smart key password application by a full browser according to an embodiment of the present invention;
FIG. 2 is a block diagram of interaction between a browser and a local program according to an embodiment of the present invention;
fig. 3 is a flowchart applied to a scenario in which a CA issues a storage certificate according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The invention provides a method for supporting a full browser to call an intelligent password key password application, aiming at a method for calling the intelligent password key by a mainstream browser Web application. Meanwhile, the problem of cross-domain when the intelligent password key is called and the problem that the HTTP service resource is forbidden to be loaded on the HTTPS page are solved.
As shown in fig. 1-2, a method for implementing a full browser invoking an intelligent password key password application, disclosed in an embodiment of the present invention, includes the following steps:
s1, establishing a local service program which accords with a GM/T0016-2012 intelligent cipher key cipher application interface specification and starting the local service program, wherein the local service program enables an interface of the intelligent cipher key which accords with the GM/T0016-2012 intelligent cipher key cipher application interface specification to be called by a browser through a JavaScript interface;
s2, the browser loads a JavaScript interface library, and packages the method request parameters of the WEB application calling the intelligent password key through the JavaScript interface library into a request message in a JSON format;
s3: the browser sends the request message in the JSON format to a local service program through an HTTPS protocol;
s4: after receiving the HTTPS request, the local service program judges whether the type of the request is an OPTIONS; if yes, entering S5; if not, entering S6;
s5: the local service program carries out browser URL cross-domain request processing, returns an HTTPS response message allowing the cross-domain request, and enters S7;
s6: the method comprises the steps that a local service program searches a processing method corresponding to a browser calling method in a method and request URL routing table according to a URL (Uniform resource locator) of an HTTPS (hypertext transfer protocol secure) request, wherein the method and request URL routing table stores the corresponding relation between a URL path and an interface calling method in an intelligent password key password application interface specification; if the corresponding processing method is found, executing corresponding processing method calling of the request of the WEB application for calling the intelligent password key, and entering S7;
in this step, the routing table is an interface method correspondence table defined by the URL path and GM/T0016-2012 smart key password application interface specification. After receiving the HTTPS request in the local service program, acquiring the URL of the request, and matching the URL of the request with a corresponding method by comparing the URL of the request.
S7: and the local service program packages the result of calling the intelligent password key into a response message in a JSON format and returns the response message to the browser.
In one embodiment, S3 is implemented in such a manner that the browser sends the request packet in the JSON format to the local service program through the XMLHttpRequest object.
The browser sends the request message in the JSON format to a local service program through an XMLHttpRequest object, the XMLHttpRequest can be configured into a synchronous or asynchronous request through a parameter, and the parameter is a standard parameter of the object.
In one embodiment, S5 is implemented as follows:
the local service program returns an HTTPS response message allowing the cross-domain request; the browser receives a correct OPTIONS request, namely, after receiving an HTTPS response message allowing the cross-domain request, automatically initiates a request for calling the intelligent password key by the WEB application with the POST type, and enters S7.
In this embodiment, the options request is a standard request type of the browser in the cross-domain request.
In one embodiment, S7 is followed by: and the browser analyzes the response message in the JSON format by using the JavaScript interface library, extracts information and displays a result.
The following provides a specific implementation process of the present invention in a digital certificate authentication scenario:
a digital certificate authentication system (hereinafter referred to as CA) is the core of a PKI system, and is mainly used for managing the life cycle of a digital certificate, the digital certificate can be classified into a user certificate, a site certificate, a server certificate, and the like according to a holder, and the user certificate is mainly stored in an intelligent password key. The invention can be applied to the scene of issuing and storing the certificate by the CA. Referring to fig. 3, a specific embodiment of the present invention will be described in further detail:
step 1, loading a JavaScript interface library provided by the invention by CA;
step 2, the CA issues a digital certificate;
step 3, the CA calls a JavaScript interface library to write a certificate method (SKF _ Importcertificate) into the intelligent key, namely, the method related to the JavaScript interface library for writing the certificate into the intelligent key is written into the intelligent key;
step 4, packaging request parameters (container name, certificate type and certificate content) of a certificate writing method (SKF _ ImportCertification), namely a method for calling the intelligent cipher key by WEB application into JSON messages by a JavaScript interface library;
step 5, the JavaScript interface library sends a JSON request message written into the certificate method to a local service program through an HTTPS protocol;
step 6, after receiving the JSON request from the local machine, the local service program processes the OPTIONS cross-domain request, analyzes the message, acquires the URL path of the HTTPS request, obtains the URL (/ SKF/SKF _ Importcertificate) of the write-in certificate method, compares the URL in the route table record of the local service program with the request URL one by one to see whether the URL is the same, if so, calls the corresponding processing method;
step 7, the local service program calls an intelligent password key interface to write a certificate into the intelligent password key;
step 8, the local service program organizes an HTTPS JSON response message and returns the HTTPS JSON response message to the JavaScript interface library;
and 9, analyzing the JSON response by the JavaScript interface library, extracting information, returning the information to the CA and displaying a result.
The invention adopts HTTPS communication protocol and provides JavaScript application interface library when realizing intelligent cipher key calling service, can simultaneously realize synchronous or asynchronous mode calling of the intelligent cipher key, solves the problem of cross-domain request, and simultaneously, when the browser limits the web application to be HTTPS, the resource request in the application is not lower than the HTTPS level of the web application. The local service program provides call for the WEB application by an HTTPS communication protocol, and the problem that the HTTP resource is prohibited to be loaded by an XMLHttpRequest request when the Web application is deployed by the HTTPS can be solved.
The method for implementing the full browser calling of the intelligent password key password application provided by the invention is described in detail, a specific example is applied in the embodiment to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined in this embodiment may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (4)

1. A full browser calls the password application implementation method of the intelligent password key, characterized by comprising the following steps:
s1, establishing a local service program which accords with the code application interface specification of the intelligent code key and starting the local service program, wherein the local service program provides an interface which accords with the code application interface specification of the intelligent code key for a browser to call through a JavaScript interface;
s2, the browser loads a JavaScript interface library, and packages the method request parameters of the WEB application calling the intelligent password key through the JavaScript interface library into a request message in a JSON format;
s3: the browser sends the request message in the JSON format to a local service program through an HTTPS protocol;
s4: after receiving the HTTPS request, the local service program judges whether the type of the request is OPTIONS; if yes, entering S5; if not, entering S6;
s5: the local service program carries out browser URL cross-domain request processing, returns an HTTPS response message allowing the cross-domain request, and enters S7;
s6: the method comprises the steps that a local service program searches a processing method corresponding to a browser calling method in a method and request URL routing table according to a URL (Uniform resource locator) of an HTTPS (hypertext transfer protocol secure) request, wherein the method and request URL routing table stores the corresponding relation between a URL path and an interface calling method in an intelligent password key password application interface specification; if the corresponding processing method is found, executing corresponding processing method calling of the request of the WEB application calling the intelligent password key, and entering S7;
s7: and the local service program packages the result of calling the intelligent password key into a response message in a JSON format and returns the response message to the browser.
2. The method for implementing full browser call smart key cryptographic application according to claim 1, wherein in S3, the browser sends the JSON-formatted request message to the local service program through an XMLHttpRequest object.
3. The method for implementing a full browser call smart key password application according to claim 1, wherein the step S5 specifically includes:
the local service program returns an HTTPS response message allowing the cross-domain request; and after receiving the HTTPS response message allowing the cross-domain request, the browser automatically initiates a request for calling the intelligent password key by the WEB application with the POST type, and enters S7.
4. The method for implementing a full browser invocation smart key cryptographic application according to claim 1, wherein after S7 further comprises: the browser analyzes the response message in the JSON format by using the JavaScript interface library, extracts information and displays a result.
CN202211111369.0A 2022-09-13 2022-09-13 Method for realizing intelligent password key password calling application of full browser Pending CN115412242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211111369.0A CN115412242A (en) 2022-09-13 2022-09-13 Method for realizing intelligent password key password calling application of full browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211111369.0A CN115412242A (en) 2022-09-13 2022-09-13 Method for realizing intelligent password key password calling application of full browser

Publications (1)

Publication Number Publication Date
CN115412242A true CN115412242A (en) 2022-11-29

Family

ID=84166537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211111369.0A Pending CN115412242A (en) 2022-09-13 2022-09-13 Method for realizing intelligent password key password calling application of full browser

Country Status (1)

Country Link
CN (1) CN115412242A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116707806A (en) * 2023-08-09 2023-09-05 ***量子科技有限公司 Password equipment management method and management platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226783A1 (en) * 2006-03-16 2007-09-27 Rabbit's Foot Security, Inc. (A California Corporation) User-administered single sign-on with automatic password management for web server authentication
CN105071922A (en) * 2015-08-25 2015-11-18 浙江汇信科技有限公司 Method of using cryptographic equipment by JAVASCRIPT
CN112118114A (en) * 2020-09-21 2020-12-22 浙江省数字安全证书管理有限公司 Digital signature method and system supporting full browser
CN112613025A (en) * 2020-12-30 2021-04-06 宁波三星医疗电气股份有限公司 Communication method of USB (universal serial bus) equipment and browser on computer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226783A1 (en) * 2006-03-16 2007-09-27 Rabbit's Foot Security, Inc. (A California Corporation) User-administered single sign-on with automatic password management for web server authentication
CN105071922A (en) * 2015-08-25 2015-11-18 浙江汇信科技有限公司 Method of using cryptographic equipment by JAVASCRIPT
CN112118114A (en) * 2020-09-21 2020-12-22 浙江省数字安全证书管理有限公司 Digital signature method and system supporting full browser
CN112613025A (en) * 2020-12-30 2021-04-06 宁波三星医疗电气股份有限公司 Communication method of USB (universal serial bus) equipment and browser on computer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116707806A (en) * 2023-08-09 2023-09-05 ***量子科技有限公司 Password equipment management method and management platform
CN116707806B (en) * 2023-08-09 2023-10-31 ***量子科技有限公司 Password equipment management method and management platform

Similar Documents

Publication Publication Date Title
WO2017129016A1 (en) Resource access method, apparatus and system
US20140124580A1 (en) Method and apparatus for executing user action commands
US20230247013A1 (en) User authentication in communication systems
CN106331055B (en) Identifier generating means and method
CN105873055B (en) Wireless network access authentication method and device
JP2008102925A (en) Method of providing compartmented electronic service
CN115412242A (en) Method for realizing intelligent password key password calling application of full browser
CN109195157B (en) Application management method and device and terminal
US11768759B2 (en) Method and system for automated testing of web service APIs
CN108429785A (en) A kind of generation method, reptile recognition methods and the device of reptile identification encryption string
CN110795741B (en) Method and device for carrying out security processing on data
CN112468409A (en) Access control method, device, computer equipment and storage medium
CN106856474A (en) A kind of processing method and processing device of checking information
CN109032612A (en) Interface calling method and device of hybrid application and computer readable storage medium
CN116450383A (en) Method for calling operating system through webpage
CN111741462A (en) Terminal application permission change acquisition method, terminal and USIM
CN113726718A (en) Subscription message processing method, device, system and storage medium
CN115567388A (en) Method, system, device and storage medium for automatically updating network slice configuration
CN115632815A (en) Data updating method and device, electronic equipment and storage medium
CN115086430A (en) Interference method and device of recommendation algorithm and communication system
CN110351710B (en) USIM-based terminal service function calling method and device
CN110889698B (en) Command processing method, electronic equipment and storage medium
CN104346228A (en) Application program sharing method and terminal
CN114745146A (en) Skip interception method and device, readable storage medium and equipment
CN114430548B (en) Service processing method, device and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination