CN114048445A - Excel application-based user authentication method and system - Google Patents

Excel application-based user authentication method and system Download PDF

Info

Publication number
CN114048445A
CN114048445A CN202111353040.0A CN202111353040A CN114048445A CN 114048445 A CN114048445 A CN 114048445A CN 202111353040 A CN202111353040 A CN 202111353040A CN 114048445 A CN114048445 A CN 114048445A
Authority
CN
China
Prior art keywords
authentication
token
environment
information
user
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
CN202111353040.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.)
Fangzheng Zhushi Wuhan Technology Development Co ltd
Original Assignee
Fangzheng Zhushi Wuhan Technology Development 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 Fangzheng Zhushi Wuhan Technology Development Co ltd filed Critical Fangzheng Zhushi Wuhan Technology Development Co ltd
Priority to CN202111353040.0A priority Critical patent/CN114048445A/en
Publication of CN114048445A publication Critical patent/CN114048445A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/101Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM] by binding digital rights to specific entities
    • G06F21/1014Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM] by binding digital rights to specific entities to tokens

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a user authentication method and a user authentication system based on Excel application, wherein the method comprises the following steps: acquiring an environment which needs to be authenticated by a user according to environment setting information of a sheet form, and setting a corresponding authentication URL which needs to be accessed according to the using environment of the sheet form; judging whether a Token file exists in the local temporary file of the client, and if the Token file exists, sending corresponding Token information to a verification server; if the Token file does not exist or the Token verification fails, acquiring authentication information through the ApiKey, and performing authentication processing based on the authentication information and account information input by a user; and updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication service provider. By the scheme, illegal and unsafe micro-service calling can be avoided, Excel user authentication management is facilitated, Excel tools can flexibly access micro-services, authentication efficiency can be effectively improved, and user experience is improved.

Description

Excel application-based user authentication method and system
Technical Field
The invention belongs to the field of Excel application, and particularly relates to a user authentication method and system based on Excel application.
Background
Generally, in an Excel application, a large number of customers use Excel tools for office work, the Excel tools are quite dispersed, an Excel application program needs to call a large number of corresponding cloud micro-services, and the micro-services can be called after being authenticated. The distributed micro-service call needs to have an effective certificate after authentication to access the server, so that the security of the server is ensured.
Disclosure of Invention
In view of this, embodiments of the present invention provide a user authentication method and system based on Excel application, so as to solve the problems that the existing authentication management is relatively chaotic and is difficult to be applied without user requirements.
In a first aspect of the embodiments of the present invention, a user authentication method based on an Excel application is provided, including:
acquiring an environment which needs to be authenticated by a user according to environment setting information of a sheet form, and setting a corresponding authentication URL which needs to be accessed according to the using environment of the sheet form;
judging whether a Token file exists in the local temporary file of the client, and if the Token file exists, sending corresponding Token information to a verification server;
if the Token file does not exist or the Token verification fails, acquiring authentication information through the ApiKey, and performing authentication processing based on the authentication information and account information input by a user;
and updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication service provider.
In a second aspect of the embodiments of the present invention, there is provided a user authentication system based on an Excel application, including:
the acquisition setting module is used for acquiring the environment which needs to be authenticated by the user according to the environment setting information of the sheet form and setting the corresponding authentication URL which needs to be accessed according to the use environment of the sheet form;
the sending verification module is used for judging whether the Token file exists in the local temporary file of the client, and if the Token file exists, sending corresponding Token information to the verification server;
the authentication processing module is used for acquiring authentication information through the ApiKey if the Token file does not exist or Token verification fails, and performing authentication processing based on the authentication information and account information input by a user;
and the updating module is used for updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication service provider.
In a third aspect of the embodiments of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, where the processor executes the computer program to implement the steps of the method according to the first aspect of the embodiments of the present invention.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program, which when executed by a processor implements the steps of the method provided by the first aspect of the embodiments of the present invention.
In the embodiment of the invention, the authentication URL needing to be accessed is set according to the use environment of the form, the user verification is carried out based on the Token file, and when the verification fails or the Token does not exist, the authentication is updated again. Therefore, unified authentication management of the Excel tool is realized, the authentication process is simplified, the method is suitable for the management requirements of different users, illegal access to the server is avoided, the burden of the server is reduced, the authentication range is conveniently expanded, the Excel tool can flexibly access the micro-service, the authentication efficiency can be effectively improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a user authentication method based on an Excel application according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a user authentication network according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a user authentication system based on an Excel application according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification or claims and in the accompanying drawings, are intended to cover a non-exclusive inclusion, such that a process, method or system, or apparatus that comprises a list of steps or elements is not limited to the listed steps or elements. In addition, "first" and "second" are used to distinguish different objects, and are not used to describe a specific order.
Referring to fig. 1, a schematic flow chart of a user authentication method based on an Excel application according to an embodiment of the present invention includes:
s101, acquiring an environment which needs to be authenticated by a user according to environment setting information of a sheet form, and setting a corresponding authentication URL which needs to be accessed according to the using environment of the sheet form;
and acquiring the current environment needing authentication from the skin environment information configured by authentication, and setting authentication URLs (Uniform Resource locators) of different hosts needing to be accessed according to the current use environment.
The environment setting information is stored in a specific Sheet, a password is added in the Sheet, and only a user with the password can modify the environment setting information.
The use environment includes at least a Development Environment (DEV), a pre-production environment (STG), and a production environment (PROD). And the URLs accessed to the use environments are uniformly defined, and different use environments and corresponding URLs are accessed through authentication configuration.
And uniformly defining the URLs accessed by the development environment, the pre-production environment and the production environment, and configuring the sheet to access different environments when the URL is used.
S102, judging whether a Token file exists in the local temporary file of the client, and if the Token file exists, sending corresponding Token information to a verification server;
the Token file (a segment of character string) is generally stored in a local temporary directory of the computer, and if the Token file exists in the directory, the Token file is sent to the verification server for verification.
For different Excel tools, after login for the first time, the server generates a Token and returns the Token to the client, and the client only needs to carry the Token to carry out data request without a user name and a password.
As shown in fig. 2, after the user initiates a verification request to the micro service, the micro service server may further initiate Token validity verification to the authentication service provider, and after the verification is completed by the authentication service provider, a verification result is returned, and the micro service server feeds back the verification result to the user.
The microserver end receives the request, if the head information of the request contains Token information, the Token is verified whether to be correct, if not, an error message that the Token is invalid is returned, and the request is terminated; and if the Token verification is successful, continuing to process the rest business process.
In the micro service, the authentication information of the user is stored in a database or a configuration file, and the authentication information can be acquired through the ApiKey.
S103, if the Token file does not exist or the Token verification fails, acquiring authentication information through the ApiKey, and performing authentication processing based on the authentication information and the account information input by the user;
specifically, a URL to be accessed in the current usage environment is acquired, a request is initiated to the microservice server through a preset Apikey, and corresponding authentication information is acquired.
The Apikey is stored in the code, and the Apikey cannot be acquired by a general user through encryption, so that the safety use of the Apikey is ensured. ApiKey belongs to confidential information, is stored in VBA codes of Excel, and can check the VBA codes of Excel only by passwords.
When the Token file does not exist or the Token verification fails, the Excel tool needs to be authenticated, and authentication information can be requested to the micro-service server through Apikey.
And opening an authentication picture provided by the authentication service provider according to the authentication information, and after the user inputs the user name and the password and confirms the user name and the password, returning the effective Token provided by the authentication service provider by the authentication service terminal.
And S104, updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication service provider.
And updating the Token file of the local temporary directory of the computer based on the Token file returned by the authentication service provider.
Optionally, after the api key obtains the authentication information, a logout interface provided by the authentication service provider is opened according to the authentication information, and the Token file of the temporary directory in the local computer is cleared based on the instruction information input by the logout interface.
For Token files that need to be logged out, a logout process may be performed based on a logout screen provided by the authentication service provider.
Optionally, opening a corresponding authentication screen based on an authentication screen URL provided by an authentication service provider; starting a background monitoring thread, and detecting and judging whether the authentication picture acquires Token in real time; if the authentication picture is authenticated, acquiring a Token character string, terminating the processing, and otherwise, continuously monitoring the authentication picture; and judging whether the monitoring authentication picture exceeds the specified time and the Token is not acquired, and if so, prompting that the authentication is overtime.
Each authentication service provider provides a unique authentication screen whose contents are not within the program range that the user knows, and in order to know whether the authentication screen has been successfully authenticated, it is necessary to monitor the URL of the screen and whether the returned contents have been authenticated at regular intervals.
In the embodiment, frequent micro-service calling can be avoided, and management of Excel authentication service is facilitated. Meanwhile, the problem of calling the authentication pictures when different Excel tools access the microservices is solved, the development environment and the production environment of the Excel tools are separated based on calling the authentication URL in different use environments, and the separation of user sensitive information and an access Key can be realized.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 3 is a schematic structural diagram of a user authentication system based on an Excel application according to an embodiment of the present invention, where the system includes:
the acquisition setting module 310 is configured to acquire an environment that a user needs to authenticate according to environment setting information of a sheet form, and set a corresponding authentication URL that the user needs to access according to a use environment of the sheet form;
the use environment at least comprises a development environment, a pre-production environment and a production environment;
and the URLs accessed to the use environments are uniformly defined, and different use environments and corresponding URLs are accessed through authentication configuration.
The sending verification module 320 is configured to determine whether a Token file exists in the local temporary file of the client, and send corresponding Token information to the verification server if the Token file exists;
the authentication processing module 330 is configured to, if the Token file does not exist or Token verification fails, acquire authentication information through the ApiKey, and perform authentication processing based on the authentication information and account information input by the user;
specifically, a URL to be accessed in the current usage environment is acquired, a request is initiated to the microservice server through a preset Apikey, and corresponding authentication information is acquired.
And the updating module 340 is configured to update the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication facilitator.
Optionally, the update module 340 further includes:
and the logout module is used for opening a logout interface provided by an authentication service provider according to the authentication information after the authentication information is acquired through the ApiKey, and clearing the Token file of the local temporary directory of the computer based on the instruction information input by the logout interface.
Optionally, the Token file based on the feedback of the authentication service provider includes
Opening a corresponding authentication screen based on an authentication screen URL provided by an authentication service provider; starting a background monitoring thread, and detecting and judging whether the authentication picture acquires Token in real time; if the authentication picture is authenticated, acquiring a Token character string, terminating the processing, and otherwise, continuously monitoring the authentication picture;
and judging whether the monitoring authentication picture exceeds the specified time and the Token is not acquired, and if so, prompting that the authentication is overtime.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and the modules described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic equipment is used for Excel user authentication. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a memory 410, a processor 420, and a system bus 430, the memory 410 including an executable program 4101 stored thereon, it being understood by those skilled in the art that the electronic device configuration shown in fig. 4 does not constitute a limitation of electronic devices and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The following describes each component of the electronic device in detail with reference to fig. 4:
the memory 410 may be used to store software programs and modules, and the processor 420 executes various functional applications and data processing of the electronic device by operating the software programs and modules stored in the memory 410. The memory 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as cache data) created according to the use of the electronic device, and the like. Further, the memory 410 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
On the memory 410 is embodied an executable program 4101 of a network request method, said executable program 4101 may be divided into one or more modules/units, said one or more modules/units are stored in said memory 410 and executed by the processor 420 for implementing user authentication and the like, said one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of said computer program 4101 in said electronic device 4. For example, the computer program 4101 may be divided into an acquisition module, a picture-taking module, a feature matching module, and a result generation module.
The processor 420 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 410 and calling data stored in the memory 410, thereby performing overall status monitoring of the electronic device. Alternatively, processor 420 may include one or more processing units; preferably, the processor 420 may integrate an application processor, which mainly handles operating systems, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 420.
The system bus 430 is used to connect functional units inside the computer, and can transmit data information, address information, and control information, and may be, for example, a PCI bus, an ISA bus, a VESA bus, etc. The instructions of the processor 420 are transmitted to the memory 410 through the bus, the memory 410 feeds data back to the processor 420, and the system bus 430 is responsible for data and instruction interaction between the processor 420 and the memory 410. Of course, the system bus 430 may also access other devices such as network interfaces, display devices, and the like.
In this embodiment of the present invention, the executable program executed by the process 420 included in the electronic device includes:
acquiring a target code of a new system to be tested, and automatically generating a test case and a test script according to keywords and method names in the target code;
executing the test script to respectively test functions of the new system picture and the old system picture, intercepting the system picture, respectively storing the intercepted pictures to corresponding target folders, and labeling picture names;
after preprocessing the pre-comparison picture in the target folder, extracting picture features and matching picture feature points;
extracting picture feature points through an SURF algorithm, and calculating the feature point matching degree based on Euclidean distances among the feature points;
and storing the picture comparison result to a specified folder, and generating a test case report.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A user authentication method based on Excel application is characterized by comprising the following steps:
acquiring an environment which needs to be authenticated by a user according to environment setting information of a sheet form, and setting a corresponding authentication URL which needs to be accessed according to the using environment of the sheet form;
judging whether a Token file exists in the local temporary file of the client, and if the Token file exists, sending corresponding Token information to a verification server;
if the Token file does not exist or the Token verification fails, acquiring authentication information through the ApiKey, and performing authentication processing based on the authentication information and account information input by a user;
and updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication service provider.
2. The method of claim 1, wherein the use environment comprises at least a development environment, a pre-production environment, and a production environment;
and the URLs accessed to the use environments are uniformly defined, and different use environments and corresponding URLs are accessed through authentication configuration.
3. The method according to claim 1, wherein the obtaining authentication information through the ApiKey includes, based on the authentication information and the account information input by the user:
and acquiring the URL to be accessed in the current use environment, initiating a request to the micro-service server through a preset Apikey, and acquiring corresponding authentication information.
4. The method of claim 1, wherein updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication facilitator further comprises:
and after acquiring the authentication information through the ApiKey, opening a logout interface provided by an authentication service provider according to the authentication information, and clearing the Token file of the local temporary directory of the computer based on instruction information input by the logout interface.
5. The method of claim 1, wherein updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication facilitator further comprises:
opening a corresponding authentication screen based on an authentication screen URL provided by an authentication service provider;
starting a background monitoring thread, and detecting and judging whether the authentication picture acquires Token in real time;
if the authentication picture is authenticated, acquiring a Token character string, terminating the processing, and otherwise, continuously monitoring the authentication picture;
and judging whether the monitoring authentication picture exceeds the specified time and the Token is not acquired, and if so, prompting that the authentication is overtime.
6. A user authentication system based on Excel application is characterized by comprising:
the acquisition setting module is used for acquiring the environment which needs to be authenticated by the user according to the environment setting information of the sheet form and setting the corresponding authentication URL which needs to be accessed according to the use environment of the sheet form;
the sending verification module is used for judging whether the Token file exists in the local temporary file of the client, and if the Token file exists, sending corresponding Token information to the verification server;
the authentication processing module is used for acquiring authentication information through the ApiKey if the Token file does not exist or Token verification fails, and performing authentication processing based on the authentication information and account information input by a user;
and the updating module is used for updating the Token file stored in the local temporary directory of the computer based on the Token file fed back by the authentication service provider.
7. The system of claim 6, wherein the use environment includes at least a development environment, a pre-production environment, and a production environment;
and the URLs accessed to the use environments are uniformly defined, and different use environments and corresponding URLs are accessed through authentication configuration.
8. The system of claim 6, wherein the update module further comprises:
and the logout module is used for opening a logout interface provided by an authentication service provider according to the authentication information after the authentication information is acquired through the ApiKey, and clearing the Token file of the local temporary directory of the computer based on the instruction information input by the logout interface.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of a user authentication method based on Excel application according to any one of claims 1 to 5 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium storing a computer program, wherein the computer program is configured to implement the steps of the Excel application-based user authentication method according to any one of claims 1 to 5 when executed.
CN202111353040.0A 2021-11-16 2021-11-16 Excel application-based user authentication method and system Pending CN114048445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111353040.0A CN114048445A (en) 2021-11-16 2021-11-16 Excel application-based user authentication method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111353040.0A CN114048445A (en) 2021-11-16 2021-11-16 Excel application-based user authentication method and system

Publications (1)

Publication Number Publication Date
CN114048445A true CN114048445A (en) 2022-02-15

Family

ID=80209041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111353040.0A Pending CN114048445A (en) 2021-11-16 2021-11-16 Excel application-based user authentication method and system

Country Status (1)

Country Link
CN (1) CN114048445A (en)

Similar Documents

Publication Publication Date Title
JP5197843B1 (en) Authentication linkage system and ID provider device
US8375425B2 (en) Password expiration based on vulnerability detection
CN107925877B (en) System and method for centralized configuration and authentication
US11627129B2 (en) Method and system for contextual access control
US8365245B2 (en) Previous password based authentication
US11025425B2 (en) User security token invalidation
US9198036B2 (en) Method for providing application service
CN108259502A (en) For obtaining the identification method of interface access rights, server-side and storage medium
CN104243213A (en) Method, device and system for acquiring configuration information of routers
JP2011215753A (en) Authentication system and authentication method
CN112039868A (en) Firewall policy verification method, device, equipment and storage medium
CN105072608B (en) A kind of method and device of administrative authentication token
CN111460410A (en) Server login method, device and system and computer readable storage medium
CN112118238A (en) Method, device, system, equipment and storage medium for authentication login
US20180039771A1 (en) Method of and server for authorizing execution of an application on an electronic device
CN112929388B (en) Network identity cross-device application rapid authentication method and system, and user agent device
CN108494749B (en) Method, device and equipment for disabling IP address and computer readable storage medium
WO2014191180A1 (en) Method of changing password in an industrial automation and control system
CN109981677A (en) A kind of credit management method and device
JP2015130028A (en) Proxy log-in device, terminal, control method and program
JP2000057097A (en) Image processor
CN114048445A (en) Excel application-based user authentication method and system
KR101745919B1 (en) User authentication method and system using software-based HSM without password exposure
CN111193776B (en) Method, device, equipment and medium for automatically logging in client under cloud desktop environment
JP5069168B2 (en) Network operation monitoring system, manager device, and network operation monitoring method

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