WO2020119037A1 - 一种身份验证配置方法、装置及计算机可读存储介质 - Google Patents

一种身份验证配置方法、装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2020119037A1
WO2020119037A1 PCT/CN2019/089183 CN2019089183W WO2020119037A1 WO 2020119037 A1 WO2020119037 A1 WO 2020119037A1 CN 2019089183 W CN2019089183 W CN 2019089183W WO 2020119037 A1 WO2020119037 A1 WO 2020119037A1
Authority
WO
WIPO (PCT)
Prior art keywords
rules
template
signature
configuration
verification
Prior art date
Application number
PCT/CN2019/089183
Other languages
English (en)
French (fr)
Inventor
吴春海
谭智文
王峰
李国颂
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020119037A1 publication Critical patent/WO2020119037A1/zh

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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials

Definitions

  • This application relates to the field of information security technology, and in particular, to an identity verification configuration method, device, and computer-readable storage medium.
  • this application provides an identity verification configuration method, which is applied to electronic devices.
  • the method includes: in the FreeMarker template engine, the data models of encryption rules, decryption rules, signature rules, and signature verification rules are separately Encapsulation; establish an authentication configuration template through the FreeMarker template engine and generate a .ftl file, in which, in the authentication configuration template, replaceable data is set by interpolation symbols $ ⁇ ; use the authentication configuration template as The dependency package is embedded in the JAVA application, and the authentication configuration template is called through the interface when the JAVA application is running, so that the encapsulated encryption rules, decryption rules, signature rules, and signature verification rules can be replaced by the interpolation symbol $ ⁇ Data to form corresponding identity authentication rules, or the identity verification configuration template is stored on the server, the JAVA application accesses the identity verification configuration template via HTTP, and the FreeMarker template engine dynamically transforms the identity verification configuration template with encapsulated encryption
  • the rules, decryption rules, signature rules, and verification rules are separately Encapsulation
  • the steps of using the FreeMarker template engine to establish an authentication configuration template include: creating a new Maven project; modifying the .xml configuration file to add freemark dependencies; adding a directory under the src/main/java package to store all freemarker templates; Add FreeMarker templates in the form of .ftl files in the src/main/java/templates directory.
  • the JAVA application is provided with selection boxes corresponding to encryption rules, decryption rules, signature rules, and signature verification rules.
  • the algorithms used in the encryption rules and decryption rules include at least MD5, RSA, DES, AES, and Base64.
  • the algorithm adopted by the signature rule and the signature verification rule includes at least RSA, DSA and ECDSA.
  • AES has 5 modes of CBC, CFB, ECB, OFB, and PCBC, and AES has three filling modes: NoPadding, PKCS5Padding, and ISO10126Padding.
  • the present application also provides an electronic device, the electronic device includes a memory and a processor connected to the memory, the memory stores an identity verification configuration program that can run on the processor, and the identity verification configuration
  • the data models of encryption rules, decryption rules, signature rules, and verification rules are encapsulated in the FreeMarker template engine
  • the identity configuration template is established through the FreeMarker template engine to generate .ftl File, wherein in the authentication configuration template, replaceable data is set by $ ⁇
  • the authentication configuration template is embedded as a dependency package in a JAVA application, and is called through an interface when the JAVA application is running
  • the identity verification configuration template replaces the encapsulated encryption rules, decryption rules, signature rules, and verification rules with the replaceable data in $ ⁇ to generate the corresponding identity verification page, or the identity verification configuration template is stored
  • the application accesses the authentication configuration template through HTTP, and the FreeMarker template engine dynamically converts the authentication configuration template, replacing $ ⁇ . ⁇ in the
  • the steps of using the FreeMarker template engine to establish an authentication configuration template include: creating a new Maven project; modifying the .xml configuration file and adding freemark dependencies; adding the templates directory under the src/main/java package to store all Freemarker template; add .ftl FreeMarker template in src/main/java/templates directory.
  • the algorithms used for encryption rules and decryption rules include at least MD5, RSA, DES, AES, and Base64; the algorithms used for signature rules and verification rules include at least RSA, DSA, and ECDSA.
  • the present application also provides a computer-readable storage medium that includes an identity verification configuration program, and when the identity verification configuration program is executed by a processor, the steps of the identity verification configuration method described above are implemented.
  • all data models of encryption rules, decryption rules, signature rules, and signature verification rules can be encapsulated Configure in the form of the application to select the encryption rules, decryption rules, signature rules, and signature verification rules that both parties agree on.
  • No need for repeated code development which can reduce the problem of high error rate caused by a lot of repeated code development, can avoid the process of version release, and update in real time.
  • the configuration method it solves the development problem of the API open platform in the process of accessing the new service provider, and truly realizes online access zero development.
  • FIG. 1 is a flowchart showing an identity verification configuration method according to an embodiment of the present application
  • FIG. 2 is a schematic diagram showing a hardware architecture of an electronic device according to an embodiment of the present application.
  • FIG. 3 is a block diagram showing an identity verification configuration program according to an embodiment of the present application.
  • FIG. 4 is a diagram showing a unit configuration of an identity authentication rule packaging module according to an embodiment of the present application.
  • An authentication configuration method includes the following steps:
  • Step S10 Encapsulate the data model of the encryption rule, decryption rule, signature rule, and signature verification rule in the FreeMarker template engine, so as to replace the content in the interpolation symbol $ ⁇ at a later stage, thereby generating a corresponding authentication page.
  • Step S30 an identity configuration template is established through the FreeMarker template engine, and a .ftl file is generated.
  • FreeMarker is a template engine based on templates and data to be changed. It can be used to generate HTML web pages, emails, configuration files, source code, and other output text.
  • the template and the data model are the components required by FreeMarker to generate output, wherein, in the authentication configuration template, the replaceable data is set by the interpolation symbol $ ⁇ ;
  • Step S50 embedding the identity verification configuration template as a dependency package into a JAVA application, and calling the identity verification configuration template through the interface when the JAVA application is running, and encapsulating the encryption rules, decryption rules, signature rules, and signature verification
  • the rule replaces the replaceable data in the interpolation symbol $ ⁇ to perform different forms of authentication.
  • three parties are usually required for identity authentication: a client (service user), an open platform (intermediate service platform), and a service party (service provider).
  • the client invokes the service provider's services through the open platform.
  • all three parties need to solve the problems of identity authentication and data security.
  • the client calls the open platform, and the open platform needs to check and decrypt; the open platform calls the server, which needs to be signed and encrypted; the open platform calls the server, and the server needs to verify and decrypt after returning the result; the open platform calls the server, and the server returns After the result, before the open platform returns the result to the client, it needs to be signed and encrypted.
  • the identity authentication between the open platform and the service side An identity authentication method needs to be adopted between the open platform and the service party.
  • the identity authentication method includes encryption rules, decryption rules, signature rules, and signature verification rules.
  • the JAVA application may be an application on the open platform, and the JAVA application is formed by establishing a .java class. In the java class, you can set some modules for selecting encryption rules, decryption rules, signature rules, and signature verification rules, such as buttons and check boxes. Between the open platform and the server, you can choose the appropriate encryption rules, decryption rules, signature rules, and signature verification rules through the JAVA application on the open platform.
  • the java application uses the API interface to call the authentication configuration template embedded in the java application in the form of a dependent package, because the authentication configuration template is set with encryption rules, decryption rules, signature rules, and signature verification packages , And also set replaceable data through $ ⁇ .
  • the Java application invokes the authentication configuration template, so that the selected encryption rules, decryption rules, signature rules, and signature verification rules replace the replaceable data in $ ⁇ , thereby forming an identity authentication rule suitable for the open platform and the server.
  • the communication between the server and the open platform uses the configured encryption rules, decryption rules, signature rules, and signature verification rules to complete identity authentication.
  • the authentication configuration template may be stored on a separate server, and the JAVA application may access the authentication configuration template through HTTP, for example, an application on an open platform may access the authentication configuration template through HTTP.
  • the JAVA application can set up some modules for selecting encryption rules, decryption rules, signature rules, and signature verification rules, such as buttons and check boxes. Between the open platform and the server, you can select the appropriate encryption rules, decryption rules, signature rules, and signature verification rules through the application on the open platform.
  • the FreeMarker template engine dynamically converts the authentication configuration template, and replaces the replaceable $ ⁇ .. ⁇ in the authentication configuration template with the encapsulated encryption rules, decryption rules, signature rules, and verification rules Data to form an identity authentication rule suitable for open platforms and service parties.
  • developers can avoid a lot of complicated and repetitive code development work, and can configure different authentication rules, which can be applied to the authentication between open platforms, service providers, and users.
  • the content of the template may include the following content:
  • FreeMarker the content of the template can be read, and the selected encryption rules, decryption rules, signature rules, and signature verification rules can be replaced by the content in the corresponding $ ⁇ . FreeMarker binds the data to the authentication configuration template and renders the corresponding identity Authentication page.
  • the algorithms used for encryption rules and decryption rules include at least MD5 (Message Digest Algorithm Fifth Edition), RSA (Asymmetric Encryption Algorithm), DES (Data Encryption Standard, a block algorithm using key encryption), AES (Advanced encryption standard), Base64 (a method based on 64 printable characters to represent binary data).
  • MD5 Message Digest Algorithm Fifth Edition
  • RSA Asymmetric Encryption Algorithm
  • DES Data Encryption Standard, a block algorithm using key encryption
  • AES Advanced encryption standard
  • Base64 a method based on 64 printable characters to represent binary data.
  • the algorithms used in the signature rules and signature verification rules include at least RSA (asymmetric encryption algorithm), DSA (driving safety warning and navigation system) and ECDSA (elliptic curve digital signature algorithm).
  • signature rules Various signature rules, encryption rules, decryption rules, and signature verification rules are respectively encapsulated.
  • the algorithm of the signature rule is SHA256WithRSA
  • the algorithm of the encryption rule is RES
  • the mode is CFB
  • the filling method is PKCS5Padding.
  • AES has 5 modes: CBC (cipher packet link mode), CFB (ciphertext feedback mode), ECB (electronic cipher book mode), OFB (output feedback mode), and PCBC (filled cipher block link).
  • AES supports three kinds of padding: NoPadding, PKCS5Padding, ISO10126Padding. Different packages can be formed.
  • the algorithm of the signature rule is RSA
  • the algorithm of the encryption rule is AES
  • the mode is ECB
  • the filling method is ISO10126Padding.
  • FIG. 2 is a schematic diagram of the hardware architecture of the electronic device 1 of the present application.
  • the electronic device 1 is a device that can automatically perform numerical calculation and/or information processing in accordance with instructions set or stored in advance.
  • the electronic device 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud based on cloud computing composed of a large number of hosts or network servers, where cloud computing is a type of distributed computing, A super virtual computer composed of a group of loosely coupled computers.
  • the electronic device 1 may include, but is not limited to, a memory 13, a processor 14, and a display 15 that can be communicatively connected to each other through a system bus. It should be pointed out that FIG. 2 only shows the electronic device 1 with some components, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
  • the main memory 13 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the electronic device 1;
  • the readable storage medium may be, for example, flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM) ), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk and other non-volatile storage media.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1; in other embodiments, the non-volatile storage medium may also be external to the electronic device 1 Storage equipment, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (Smart) Media, a secure digital card, a flash memory card (Flash Card), etc.
  • the readable storage medium of the memory 13 is generally used to store the operating system and various application software installed in the electronic device 1, such as the authentication configuration program code in this embodiment.
  • the memory 13 can also be used to temporarily store various types of data that have been output or are to be output.
  • the processor 14 is used to run the program code stored in the memory 13 or process data.
  • the electronic device 1 further includes a network interface.
  • the network interface may include a wireless network interface or a wired network interface.
  • the network interface is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
  • the identity verification configuration program is stored in the memory 13 and includes at least one computer-readable instruction stored in the memory 13, and the at least one computer-readable instruction can be executed by the processor to implement the methods of the embodiments of the present application; and, the At least one computer readable instruction can be divided into different logic modules according to different functions implemented by its parts.
  • the above-mentioned identity verification configuration program implements the following steps when executed by the processor 14:
  • Step S10 Encapsulate the data models of encryption rules, decryption rules, signature rules, and signature verification rules in the FreeMarker template engine, so as to replace the content in $ ⁇ at a later stage to generate the corresponding authentication page.
  • Step S30 an identity configuration template is established through the FreeMarker template engine, and a .ftl file is generated.
  • FreeMarker is a template engine based on templates and data to be changed. It can be used to generate HTML web pages, emails, configuration files, source code, and other output text.
  • the template and data model are the components required by FreeMarker to generate output. Among them, in the authentication configuration template, replaceable data is set by $ ⁇ ;
  • Step S50 embedding the identity verification configuration template as a dependency package into a JAVA application, and calling the identity verification configuration template through the interface when the JAVA application is running, and encapsulating the encryption rules, decryption rules, signature rules, and signature verification
  • the rules replace the replaceable data in $ ⁇ to perform different forms of authentication.
  • the authentication configuration template may also be stored on an independent server, and the application may access the authentication configuration template through HTTP, for example, an application on an open platform may access the authentication configuration template through HTTP.
  • the application can set some modules for selecting encryption rules, decryption rules, signature rules, and signature verification rules, such as buttons and check boxes. Between the open platform and the server, you can select the appropriate encryption rules, decryption rules, signature rules, and signature verification rules through the application on the open platform.
  • the FreeMarker template engine dynamically converts the authentication configuration template, and replaces the replaceable data of $ ⁇ . ⁇ in the authentication configuration template with the encapsulated encryption rules, decryption rules, signature rules, and verification rules In order to form an identity authentication rule suitable for open platforms and service parties.
  • FIG. 3 shows a program module diagram of the identity verification configuration program 50.
  • the identity verification configuration program 50 is divided into multiple modules, which are stored in the memory 13 and executed by the processor 14 to complete the application.
  • the module referred to in this application refers to a series of computer program instruction segments capable of performing specific functions.
  • the identity verification configuration program 50 may be divided into: an identity verification rule encapsulation module 501, a template establishment module 502, and an identity verification configuration template processing module 503,
  • the identity authentication rule encapsulation module 501 is used to encapsulate the data models of encryption rules, decryption rules, signature rules, and verification rules in the FreeMarker template engine, so as to replace the content in $ ⁇ at a later stage, thereby generating the corresponding Authentication page.
  • the template creation module 502 establishes the identity verification configuration template through the FreeMarker template engine and generates a .ftl file.
  • FreeMarker is a template engine based on templates and data to be changed. It can be used to generate HTML web pages, emails, configuration files, source code, and other output text.
  • the template and the data model are the components required by FreeMarker to generate output.
  • replaceable data is set by $ ⁇ .
  • the identity verification configuration template processing module 503 embeds the identity verification configuration template as a dependency package into the JAVA application, and calls the identity verification configuration template through the interface when the JAVA application is running, and the encapsulated encryption rules and decryption rules , Signature rules, and signature verification rules replace the replaceable data in $ ⁇ to perform different forms of identity verification.
  • the identity authentication between the open platform and the service side An identity authentication method needs to be adopted between the open platform and the service party.
  • the identity authentication method includes encryption rules, decryption rules, signature rules, and signature verification rules.
  • the JAVA application may be an application on the open platform, and the JAVA application is formed by establishing a .java class. In the java class, you can set some modules for selecting encryption rules, decryption rules, signature rules, and signature verification rules, such as buttons and check boxes. Between the open platform and the server, you can choose the appropriate encryption rules, decryption rules, signature rules, and signature verification rules through the JAVA application on the open platform.
  • the java application uses the API interface to call the authentication configuration template embedded in the java application in the form of a dependent package, because the authentication configuration template is set with encryption rules, decryption rules, signature rules, and signature verification packages , And also set replaceable data through $ ⁇ .
  • the Java application invokes the authentication configuration template, so that the selected encryption rules, decryption rules, signature rules, and signature verification rules replace the replaceable data in $ ⁇ , thereby forming an identity authentication rule suitable for the open platform and the server.
  • the communication between the server and the open platform uses the configured encryption rules, decryption rules, signature rules, and signature verification rules to complete identity authentication.
  • the authentication configuration template processing module 503 may also store the authentication configuration template on an independent server, and the application may access the authentication configuration template through HTTP, for example, an application on an open platform may access the identity through HTTP Verify the configuration template.
  • the application can set some modules for selecting encryption rules, decryption rules, signature rules, and signature verification rules, such as buttons and check boxes. Between the open platform and the server, you can select the appropriate encryption rules, decryption rules, signature rules, and signature verification rules through the application on the open platform.
  • the FreeMarker template engine dynamically converts the authentication configuration template, and replaces the replaceable $ ⁇ .. ⁇ in the authentication configuration template with the encapsulated encryption rules, decryption rules, signature rules, and verification rules Data to form an identity authentication rule suitable for open platforms and service parties.
  • the specific steps for the template building module 502 to establish the identity verification configuration template through the FreeMarker template engine are as follows:
  • the content of the template may include the following content:
  • FreeMarker you can read the template content, bind the data to the template and render the corresponding authentication page. Specifically, according to the encapsulation of different encryption rules, decryption rules, signature rules, and signature verification rules, replace the contents of $ ⁇ , so as to realize different encryption rules, decryption rules, signature rules, and signature verification rules.
  • the identity authentication rule encapsulation module 501 includes a signature rule encapsulation unit 5011, an encryption rule encapsulation unit 5012, a decryption rule encapsulation unit 5013, and a verification rule encapsulation unit 5014.
  • the signature rule encapsulation unit 5011 is used to encapsulate various signature rules
  • the encryption rule encapsulation unit 5012 is used to encapsulate various decryption rules.
  • the decryption rule encapsulation unit 5013 is used to encapsulate various decryption rules
  • the verification rule encapsulation unit 5014 is used to encapsulate various verification rules.
  • the algorithms used in the encryption rules and decryption rules include at least MD5, RSA, DES, AES, and Base64.
  • the algorithm adopted by the signature rule and the signature verification rule includes at least RSA, DSA and ECDSA.
  • the identity verification configuration template processing module 503 uses a regular expression to search for the interpolation symbol $ ⁇ , and replaces the selected signature rule, encryption rule, decryption rule, and signature verification rule with the replaceable content in the interpolation symbol $ ⁇ .
  • the identity verification configuration template in the FreeMarker template engine includes a configuration step, and the configuration step is configured as multiple task queues through performance data collection tasks.
  • the identity verification configuration template in the FreeMarker template engine includes a verification step, which is configured as multiple task queues through performance data collection tasks.
  • the encryption rules are configured as multiple task queues through circular queue displacement rules.
  • the decryption rule is configured as multiple task queues through a circular queue displacement rule.
  • the signature verification rule is fitted through the trajectory to the pre-stored verification trajectory in the server.
  • signature rules Various signature rules, encryption rules, decryption rules, and signature verification rules are respectively encapsulated.
  • the algorithm of the signature rule is SHA256WithRSA
  • the algorithm of the encryption rule is RES
  • the mode is CFB
  • the filling method is PKCS5Padding.
  • the embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), or an erasable programmable Any one or any combination of read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, etc.
  • the computer-readable storage medium includes an identity verification configuration program, etc. When the identity verification configuration program is executed by the processor 12, the following operations are implemented:
  • Step S10 Encapsulate the data models of encryption rules, decryption rules, signature rules, and signature verification rules in the FreeMarker template engine, so as to replace the content in $ ⁇ at a later stage to generate the corresponding authentication page.
  • Step S30 an identity configuration template is established through the FreeMarker template engine, and a .ftl file is generated.
  • FreeMarker is a template engine based on templates and data to be changed. It can be used to generate HTML web pages, emails, configuration files, source code, and other output text.
  • the template and data model are the components required by FreeMarker to generate output. Among them, in the authentication configuration template, replaceable data is set by $ ⁇ ;
  • Step S50 embedding the identity verification configuration template as a dependency package into a JAVA application, and calling the identity verification configuration template through the interface when the JAVA application is running, and encapsulating the encryption rules, decryption rules, signature rules, and signature verification
  • the rules replace the replaceable data in $ ⁇ to perform different forms of authentication.
  • the authentication configuration template may also be stored on an independent server, and the application may access the authentication configuration template through HTTP, for example, an application on an open platform may access the authentication configuration template through HTTP.
  • the application can set some modules for selecting encryption rules, decryption rules, signature rules, and signature verification rules, such as buttons and check boxes. Between the open platform and the server, you can select the appropriate encryption rules, decryption rules, signature rules, and signature verification rules through the application on the open platform.
  • the FreeMarker template engine dynamically converts the authentication configuration template, and replaces the replaceable $ ⁇ .. ⁇ in the authentication configuration template with the encapsulated encryption rules, decryption rules, signature rules, and verification rules Data to form an identity authentication rule suitable for open platforms and service parties.

Abstract

本方案涉及信息安全领域,提供一种身份验证配置方法、装置及计算机可读存储介质,方法包括:在模板引擎中将加密、解密、签名、验签规则的数据模型分别封装;建立身份验证配置模板,通过${}设置可替换的数据;将身份验证配置模板作为依赖包嵌入到JAVA应用中,在JAVA应用通过接口调用身份验证配置模板,使加密规则、解密规则、签名规则、验签规则替换${}中可替换的数据,形成身份认证规则,或,身份验证配置模板存在服务器上,JAVA应用通过HTTP访问身份验证配置模板,用封装的加密、解密、签名、验签规则替换身份验证配置模板中${}的可替换的数据,形成身份认证规则。本申请不需要重复的代码开发,减少工作量。

Description

一种身份验证配置方法、装置及计算机可读存储介质 技术领域
本申请涉及信息安全技术领域,具体地说,涉及一种身份验证配置方法、装置及计算机可读存储介质。
背景技术
现在普遍采用数字签名的方式进行身份认证。对于一些较新的系统,一般采用标准Basic Auth、OAuth、HMAC等方式实现身份认证。但对于一些较旧的业务系统,很多都采用了自定义的身份认证方案。这使得这些业务系统之间的互相访问变得复杂——交互双方都需要按照对方的身份认证方式进行开发,而认证的规则往往与具体的业务相关。因此虽然身份认证的代码具有很大的相似度,但是又不是完全相同,几乎每次对接都需要进行身份认证的代码开发。因此虽然身份认证的代码具有很大的相似度,但是又不是完全相同,因此几乎每次对接都需要进行身份认证的代码开发。
发明内容
为解决现有技术存在的不足,本申请提供一种身份验证配置方法,应用于电子装置,该方法包括:在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装;通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件,其中,在所述身份验证配置模板中,通过插值符号${}来设置可替换的数据;将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,使封装的加密规则、解密规则、签名规则、验签规则替换插值符号${}中的可替换的数据,从而形成相应的身份认证规则,或者,所述身份验证配置模板存放在服务器上,JAVA应用通过HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${..}的可替换的数据, 从而形成相应的身份认证规则。
优选地,利用FreeMarker模板引擎建立身份验证配置模板的步骤包括:新建Maven项目;修改.xml配置文件,增加freemark依赖;在src/main/java的包下添加目录,用于存放所有的freemarker模板;在src/main/java/templates目录下添加以.ftl文件形式存在的FreeMarker模板。
优选地,JAVA应用设置有对应加密规则、解密规则、签名规则、验签规则的选择框。
优选地,加密规则、解密规则采用的算法至少包括MD5、RSA、DES、AES、Base64。
优选地,签名规则、验签规则采用的算法至少包括RSA、DSA和ECDSA。
优选地,AES具有CBC、CFB、ECB、OFB、PCBC5种模式,AES具有三种填充方式:NoPadding、PKCS5Padding、ISO10126Padding。
本申请还提供一种电子装置,所述电子装置包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的身份验证配置程序,所述身份验证配置程序被所述处理器执行时实现如下步骤:在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装;通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件,其中,在所述身份验证配置模板中,通过${}来设置可替换的数据;将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,将封装的加密规则、解密规则、签名规则、验签规则替换${}中的可替换的数据,从而生成对应的身份验证页面,或者,所述身份验证配置模板存放在服务器上,应用通过HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${.}的可替换的数据,从而生成对应的身份验证页面。
优选地,利用FreeMarker模板引擎建立身份验证配置模板的步骤包括:新建Maven项目;修改.xml配置文件,增加freemark依赖;在src/main/java的包下添加templates(模板)目录,用于存放所有的freemarker模板;在src/main/java/templates目录下添加.ftl的FreeMarker模板。
优选地,加密规则、解密规则采用的算法至少包括MD5、RSA、DES、 AES、Base64;签名规则、验签规则采用的算法至少包括RSA、DSA和ECDSA。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中包括身份验证配置程序,所述身份验证配置程序被处理器执行时,实现如上所述的身份验证配置方法的步骤。
采用本申请身份验证配置方法、装置及计算机可读存储介质,无论是客户端、开放平台还是服务方,都可以通过将各种加密规则、解密规则、签名规则、验签规则的数据模型的封装配置在应用中的形式,来选择对接双方都认可的加密规则、解密规则、签名规则、验签规则。不需要重复的代码开发,可以减少由于大量重复代码开发造成的出错率高的问题,可以避免版本发布的流程,实时进行更新。通过配置的方式,解决API开放平台在接入新的服务提供方过程中的开发问题,真正实现在线接入零开发。
附图说明
通过结合下面附图对其实施例进行描述,本申请的上述特征和技术优点将会变得更加清楚和容易理解。
图1是表示本申请实施例的身份验证配置方法的流程图;
图2是表示本申请实施例的电子装置的硬件架构示意图;
图3是表示本申请实施例的身份验证配置程序的模块构成图;
图4是表示本申请实施例的身份认证规则封装模块的单元构成图。
具体实施方式
下面将参考附图来描述本申请所述的身份验证配置方法、装置及计算机可读存储介质的实施例。本领域的普通技术人员可以认识到,在不偏离本申请的精神和范围的情况下,可以用各种不同的方式或其组合对所描述的实施例进行修正。因此,附图和描述在本质上是说明性的,而不是用于限制权利要求的保护范围。此外,在本说明书中,附图未按比例画出,并且相同的附图标记表示相同的部分。
一种身份验证配置方法,如图1所示,包括以下步骤:
步骤S10,在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装,以便在后期替换插值符号${}中的内容, 从而生成对应的身份验证页面。
步骤S30,通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件。FreeMarker是一种基于模板和要改变的数据的模板引擎,可以用来生成HTML网页、电子邮件、配置文件、源代码等输出文本。模板和数据模型是FreeMarker生成输出所需的组成部分,其中,在所述身份验证配置模板中,通过插值符号${}来设置可替换的数据;
步骤S50,将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,将封装的加密规则、解密规则、签名规则、验签规则替换插值符号${}中的可替换的数据,从而进行不同形式的身份验证。例如,通常需要身份认证的可能包括三方:客户端(服务使用者)、开放平台(中间服务平台)、服务方(服务提供方),客户端通过开放平台调用服务提供者的服务。在通讯过程中,三方都需要解决身份认证与数据安全问题。客户端调用开放平台,开放平台需要验签解密;开放平台调用服务方,需要加签加密;开放平台调用服务方,服务方返回结果后,需要验签解密;开放平台调用服务方,服务方返回结果后,开放平台将结果返回给客户端之前,需要进行加签加密。
下面以开放平台和服务方之间的身份认证来说明。开放平台和服务方之间需要采用一种身份认证方式,所述身份认证方式包括加密规则、解密规则、签名规则、验签规则。所述JAVA应用可以是该开放平台上的应用,JAVA应用是通过建立.java类形成。java类中可以设置选择加密规则、解密规则、签名规则、验签规则的一些模块,例如按钮、勾选框等。开放平台和服务方之间则可以通过开放平台上的JAVA应用选择适合的加密规则、解密规则、签名规则、验签规则。而在选择之后,java应用则利用API接口调用以依赖包形式嵌入在java应用中的身份验证配置模板,由于身份验证配置模板中设置有关于加密规则、解密规则、签名规则、验签规则的封装,并且还通过${}设置有可替换的数据。Java应用调用身份验证配置模板,使得选择的加密规则、解密规则、签名规则、验签规则替换${}中的可替换数据,从而形成适于开放平台和服务方之间的身份认证规则。服务方与开放平台之间的通讯则采用所配置的加密规则、解密规则、签名规则、验签规则来完成身份认证。
或者,所述身份验证配置模板还可以是存放在独立的服务器上,JAVA应 用可以通过HTTP访问所述身份验证配置模板,例如,开放平台上的应用通过HTTP访问所述身份验证配置模板。JAVA应用可以设置选择加密规则、解密规则、签名规则、验签规则的一些模块,例如按钮、勾选框等。开放平台和服务方之间则可以通过开放平台上的应用选择适合的加密规则、解密规则、签名规则、验签规则。应用HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${..}的可替换的数据,从而形成适于开放平台和服务方之间的身份认证规则。
通过以上的身份验证配置方法,开发者可以免去繁杂的大量重复的代码开发工作,可以配置不同的身份验证规则,能够适用于开放平台、服务方、用户之间的身份验证。
下面说明一下FreeMarker模板引擎建立身份验证配置模板的具体步骤:
首先新建一个Maven项目;
修改.xml配置文件,增加freemark依赖;
在src/main/java的包下添加一个名为“templates”目录,用于存放所有的freemarker模板;
在src/main/java/templates目录下添加名为“product.ftl”的FreeMarker模板,其中,
模板的内容可以是包括如下内容:
加密规则:${Encryption rules}
解密规则:${Decryption rules}
签名规则:${Signature rule}
验签规则:${Inspection rules}。
使用FreeMarker可以读取到模板内容,将选择的加密规则、解密规则、签名规则、验签规则替换对应的${}中的内容,FreeMarker将数据与身份验证配置模板绑定并渲染出对应的身份认证页面。
优选地,加密规则、解密规则采用的算法至少包括MD5(消息摘要算法第五版)、RSA(非对称加密算法)、DES(数据加密标准,是一种使用密钥加密的块算法)、AES(高级加密标准)、Base64(一种基于64个可打印字符来表示二进制数据的方法)。
优选地,签名规则、验签规则采用的算法至少包括RSA(非对称加密算法)、DSA(驾驶安全预警与导航系统)和ECDSA(椭圆曲线数字签名算法)。
将各种签名规则、加密规则、解密规则、验签规则分别对应封装。例如,签名规则的算法为SHA256WithRSA,加密规则的算法是RES,模式是CFB,填充方式是PKCS5Padding。通过在FreeMarker中设置插值符号${},利用正则表达式搜索插值符号${},并将其中的内容替换为对应的封装的签名规则、加密规则、解密规则、验签规则。从而形成能够适用于不同应用场景的身份验证页面。
其中,AES具有CBC(密码分组链接模式)、CFB(密文反馈模式)、ECB(电子密码本模式)、OFB(输出反馈模式)、PCBC(填充密码块链接)5种模式。AES支持三种填充:NoPadding,PKCS5Padding,ISO10126Padding。则可以形成不同的封装,例如,签名规则的算法为RSA,加密规则的算法是AES,模式是ECB,填充方式是ISO10126Padding。
图2所示是本申请电子装置1的硬件架构示意图。所述电子装置1是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。所述电子装置1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
在本实施例中,电子装置1可包括,但不仅限于,可通过系统总线相互通信连接的存储器13、处理器14、显示器15。需要指出的是,图2仅示出了具有部分组件的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,主存储器13包括内存及至少一种类型的可读存储介质。内存为电子装置1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等的非易失性存储介质。在一些实施例中,可读存储介质可以是电子装置1的内部存储单元,例如该电子装置1的硬盘;在另一些实施例中,该非易失性存储介质也可以是电子 装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card),安全数字(Secure Digital)卡,闪存卡(Flash Card)等。本实施例中,存储器13的可读存储介质通常用于存储安装于电子装置1的操作系统和各类应用软件,例如本实施例中的身份验证配置程序代码等。此外,存储器13还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器14用于运行所述存储器13中存储的程序代码或者处理数据。
另外,电子装置1还包括网络接口,所述网络接口可包括无线网络接口或有线网络接口,该网络接口通常用于在所述电子装置1与其他电子设备之间建立通信连接。
身份验证配置程序存储在存储器13中,包括至少一个存储在存储器13中的计算机可读指令,该至少一个计算机可读指令可被处理器执行,以实现本申请各实施例的方法;以及,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。
在一个实施例中,上述身份验证配置程序被所述处理器14执行时实现如下步骤:
步骤S10,在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装,以便在后期替换${}中的内容,从而生成对应的身份验证页面。
步骤S30,通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件。FreeMarker是一种基于模板和要改变的数据的模板引擎,可以用来生成HTML网页、电子邮件、配置文件、源代码等输出文本。模板和数据模型是FreeMarker生成输出所需的组成部分,其中,在所述身份验证配置模板中,通过${}来设置可替换的数据;
步骤S50,将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,将封装的加密规则、解密规则、签名规则、验签规则替换${}中的可替换的数据,从而进行不同形式的身份验证。
或者,所述身份验证配置模板还可以是存放在独立的服务器上,应用可以通过HTTP访问所述身份验证配置模板,例如,开放平台上的应用通过HTTP访问所述身份验证配置模板。应用可以设置选择加密规则、解密规则、签名 规则、验签规则的一些模块,例如按钮、勾选框等。开放平台和服务方之间则可以通过开放平台上的应用选择适合的加密规则、解密规则、签名规则、验签规则。应用HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${.}的可替换的数据,从而形成适于开放平台和服务方之间的身份认证规则。
图3所示为身份验证配置程序50的程序模块图。在本实施例中,身份验证配置程序50被分割为多个模块,该多个模块被存储于存储器13中,并由处理器14执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。
所述身份验证配置程序50可以被分割为:身份认证规则封装模块501、模板建立模块502、身份验证配置模板处理模块503,
其中,身份认证规则封装模块501用于在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装,以便在后期替换${}中的内容,从而生成对应的身份验证页面。
其中,模板建立模块502通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件。FreeMarker是一种基于模板和要改变的数据的模板引擎,可以用来生成HTML网页、电子邮件、配置文件、源代码等输出文本。模板和数据模型是FreeMarker生成输出所需的组成部分,其中,在所述身份验证配置模板中,通过${}来设置可替换的数据。
其中,身份验证配置模板处理模块503将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,将封装的加密规则、解密规则、签名规则、验签规则替换${}中的可替换的数据,从而进行不同形式的身份验证。
下面以开放平台和服务方之间的身份认证来说明。开放平台和服务方之间需要采用一种身份认证方式,所述身份认证方式包括加密规则、解密规则、签名规则、验签规则。所述JAVA应用可以是该开放平台上的应用,JAVA应用是通过建立.java类形成。java类中可以设置选择加密规则、解密规则、签名规则、验签规则的一些模块,例如按钮、勾选框等。开放平台和服务方之间则可以通过开放平台上的JAVA应用选择适合的加密规则、解密规则、签名 规则、验签规则。而在选择之后,java应用则利用API接口调用以依赖包形式嵌入在java应用中的身份验证配置模板,由于身份验证配置模板中设置有关于加密规则、解密规则、签名规则、验签规则的封装,并且还通过${}设置有可替换的数据。Java应用调用身份验证配置模板,使得选择的加密规则、解密规则、签名规则、验签规则替换${}中的可替换数据,从而形成适于开放平台和服务方之间的身份认证规则。服务方与开放平台之间的通讯则采用所配置的加密规则、解密规则、签名规则、验签规则来完成身份认证。
或者,身份验证配置模板处理模块503还可以将所述身份验证配置模板存放在独立的服务器上,应用可以通过HTTP访问所述身份验证配置模板,例如,开放平台上的应用通过HTTP访问所述身份验证配置模板。应用可以设置选择加密规则、解密规则、签名规则、验签规则的一些模块,例如按钮、勾选框等。开放平台和服务方之间则可以通过开放平台上的应用选择适合的加密规则、解密规则、签名规则、验签规则。应用HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${..}的可替换的数据,从而形成适于开放平台和服务方之间的身份认证规则。
优选地,模板建立模块502通过FreeMarker模板引擎建立身份验证配置模板的具体步骤如下:
首先新建一个Maven项目;
修改.xml配置文件,增加freemark依赖;
在src/main/java的包下添加一个名为“templates”目录,用于存放所有的freemarker模板;
在src/main/java/templates目录下添加名为“product.ftl”的FreeMarker模板,其中,
模板的内容可以是包括如下内容:
加密规则:${Encryption rules}
解密规则:${Decryption rules}
签名规则:${Signature rule}
验签规则:${Inspection rules}。
使用FreeMarker可以读取到模板内容,将数据与模板绑定并渲染出对应的 身份认证页面。具体说,根据不同的加密规则、解密规则、签名规则、验签规则的封装,替换${}的内容,从而实现不同的加密规则、解密规则、签名规则、验签规则。
优选地,如图4所示,身份认证规则封装模块501包括签名规则封装单元5011、加密规则封装单元5012、解密规则封装单元5013、验签规则封装单元5014。所述签名规则封装单元5011用于将各种签名规则进行封装,加密规则封装单元5012用于对各种解密规则进行封装。解密规则封装单元5013用于对各种解密规则进行封装、验签规则封装单元5014用于对各种验签规则进行封装。
优选地,加密规则、解密规则采用的算法至少包括MD5、RSA、DES、AES、Base64。
优选地,签名规则、验签规则采用的算法至少包括RSA、DSA和ECDSA。
优选地,身份验证配置模板处理模块503采用正则表达式搜索插值符号${},并将所选择的签名规则、加密规则、解密规则、验签规则替换掉插值符号${}中的可替换内容。
优选地,FreeMarker模板引擎中的身份验证配置模板包括配置步骤,所述配置步骤通过性能数据采集任务配置为多个任务队列。
优选地,FreeMarker模板引擎中的身份验证配置模板包括验证步骤,所述验证步骤通过性能数据采集任务配置为多个任务队列。
优选地,所述加密规则通过循环队列位移规则配置为多个任务队列。
优选地,所述解密规则通过循环队列位移规则配置为多个任务队列。
优选地,所述验签规则通过轨迹与服务端内预存的核签轨迹进行拟合。
将各种签名规则、加密规则、解密规则、验签规则分别对应封装。例如,签名规则的算法为SHA256WithRSA,加密规则的算法是RES,模式是CFB,填充方式是PKCS5Padding。通过在FreeMarker中设置插值符号${},利用正则表达式搜索插值符号${},并将其中的内容替换为对应的封装的签名规则、加密规则、解密规则、验签规则。从而形成能够适用于不同应用场景的身份验证页面。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是硬盘、多媒体卡、SD卡、闪存卡、SMC、只读存储器(ROM)、 可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器等等中的任意一种或者几种的任意组合。所述计算机可读存储介质中包括身份验证配置程序等,所述身份验证配置程序被处理器12执行时实现如下操作:
步骤S10,在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装,以便在后期替换${}中的内容,从而生成对应的身份验证页面。
步骤S30,通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件。FreeMarker是一种基于模板和要改变的数据的模板引擎,可以用来生成HTML网页、电子邮件、配置文件、源代码等输出文本。模板和数据模型是FreeMarker生成输出所需的组成部分,其中,在所述身份验证配置模板中,通过${}来设置可替换的数据;
步骤S50,将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,将封装的加密规则、解密规则、签名规则、验签规则替换${}中的可替换的数据,从而进行不同形式的身份验证。
或者,所述身份验证配置模板还可以是存放在独立的服务器上,应用可以通过HTTP访问所述身份验证配置模板,例如,开放平台上的应用通过HTTP访问所述身份验证配置模板。应用可以设置选择加密规则、解密规则、签名规则、验签规则的一些模块,例如按钮、勾选框等。开放平台和服务方之间则可以通过开放平台上的应用选择适合的加密规则、解密规则、签名规则、验签规则。应用HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${..}的可替换的数据,从而形成适于开放平台和服务方之间的身份认证规则。
本申请之计算机可读存储介质的具体实施方式与上述库房监控方法以及电子装置1的具体实施方式大致相同,在此不再赘述。
以上所述仅为本申请的优选实施例,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围 之内。

Claims (20)

  1. 一种身份验证配置方法,应用于电子装置,其特征在于,该方法包括:
    在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装;
    通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件,其中,在所述身份验证配置模板中,通过插值符号${}来设置可替换的数据;
    将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,使封装的加密规则、解密规则、签名规则、验签规则替换插值符号${}中的可替换的数据,从而形成相应的身份认证规则,
    或者,所述身份验证配置模板存放在服务器上,JAVA应用通过HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${..}的可替换的数据,从而形成相应的身份认证规则。
  2. 根据权利要求1所述的身份验证配置方法,其特征在于,
    利用FreeMarker模板引擎建立身份验证配置模板的步骤包括:
    新建Maven项目;
    修改.xml配置文件,增加freemark依赖;
    在src/main/java的包下添加templates目录;
    在src/main/java/templates目录下添加以.ftl文件形式存在的FreeMarker模板。
  3. 根据权利要求1所述的身份验证配置方法,其特征在于,
    JAVA应用设置有对应加密规则、解密规则、签名规则、验签规则的选择框。
  4. 根据权利要求1所述的身份验证配置方法,其特征在于,
    加密规则、解密规则采用的算法至少包括MD5、RSA、DES、AES、Base64。
  5. 根据权利要求1所述的身份验证配置方法,其特征在于,
    签名规则、验签规则采用的算法至少包括RSA、DSA和ECDSA。
  6. 根据权利要求4所述的身份验证配置方法,其特征在于,
    AES具有CBC、CFB、ECB、OFB、PCBC5种模式。
  7. 根据权利要求3所述的身份验证配置方法,其特征在于,FreeMarker模 板引擎中的身份验证配置模板包括配置步骤,所述配置步骤通过性能数据采集任务配置为多个任务队列。
  8. 根据权利要求3所述的身份验证配置方法,其特征在于,FreeMarker模板引擎中的身份验证配置模板包括验证步骤,所述验证步骤通过性能数据采集任务配置为多个任务队列。
  9. 根据权利要求3所述的身份验证配置方法,其特征在于,所述加密规则通过循环队列位移规则配置为多个任务队列。
  10. 根据权利要求3所述的身份验证配置方法,其特征在于,所述解密规则通过循环队列位移规则配置为多个任务队列。
  11. 根据权利要求3所述的身份验证配置方法,其特征在于,所述验签规则通过轨迹与服务端内预存的核签轨迹进行拟合。
  12. 一种电子装置,其特征在于,所述电子装置包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的身份验证配置程序,所述身份验证配置程序被所述处理器执行时实现如下步骤:
    在FreeMarker模板引擎中将加密规则、解密规则、签名规则、验签规则的数据模型分别进行封装;
    通过FreeMarker模板引擎建立身份验证配置模板,生成.ftl文件,其中,在所述身份验证配置模板中,通过${}来设置可替换的数据;
    将所述身份验证配置模板作为依赖包嵌入到JAVA应用中,在所述JAVA应用运行时通过接口调用所述身份验证配置模板,将封装的加密规则、解密规则、签名规则、验签规则替换${}中的可替换的数据,从而生成对应的身份验证页面,
    或者,所述身份验证配置模板存放在服务器上,应用通过HTTP访问所述身份验证配置模板,FreeMarker模板引擎动态转换身份验证配置模板,用封装的加密规则、解密规则、签名规则、验签规则替换身份验证配置模板中${..}的可替换的数据,从而生成对应的身份验证页面。
  13. 根据权利要求12所述的电子装置,其特征在于,
    利用FreeMarker模板引擎建立身份验证配置模板的步骤包括:
    新建Maven项目;
    修改.xml配置文件,增加freemark依赖;
    在src/main/java的包下添加目录,用于存放所有的freemarker模板;
    在src/main/java/templates目录下添加.ftl的FreeMarker模板。
  14. 根据权利要求12所述的电子装置,其特征在于,
    加密规则、解密规则采用的算法至少包括MD5、RSA、DES、AES、Base64;签名规则、验签规则采用的算法至少包括RSA、DSA和ECDSA。
  15. 根据权利要求12所述的电子装置,其特征在于,
    FreeMarker模板引擎中的身份验证配置模板包括配置步骤,所述配置步骤通过性能数据采集任务配置为多个任务队列。
  16. 根据权利要求12所述的电子装置,其特征在于,
    FreeMarker模板引擎中的身份验证配置模板包括验证步骤,所述验证步骤通过性能数据采集任务配置为多个任务队列。
  17. 根据权利要求12所述的电子装置,其特征在于,
    所述加密规则通过循环队列位移规则配置为多个任务队列。
  18. 根据权利要求12所述的电子装置,其特征在于,
    所述解密规则通过循环队列位移规则配置为多个任务队列。
  19. 根据权利要求12所述的电子装置,其特征在于,
    所述验签规则通过轨迹与服务端内预存的核签轨迹进行拟合。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中包括身份验证配置程序,所述身份验证配置程序被处理器执行时,实现如权利要求1至11中任一项所述的身份验证配置方法的步骤。
PCT/CN2019/089183 2018-12-12 2019-05-30 一种身份验证配置方法、装置及计算机可读存储介质 WO2020119037A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811518453.8 2018-12-12
CN201811518453.8A CN109787768B (zh) 2018-12-12 2018-12-12 一种身份验证配置方法、装置及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2020119037A1 true WO2020119037A1 (zh) 2020-06-18

Family

ID=66495850

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089183 WO2020119037A1 (zh) 2018-12-12 2019-05-30 一种身份验证配置方法、装置及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN109787768B (zh)
WO (1) WO2020119037A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109787768B (zh) * 2018-12-12 2021-08-03 平安科技(深圳)有限公司 一种身份验证配置方法、装置及计算机可读存储介质
CN110336819A (zh) * 2019-07-09 2019-10-15 四川新网银行股份有限公司 基于机器学习的加解密自助组合方法
CN110611674B (zh) * 2019-09-20 2021-01-01 北京三快在线科技有限公司 不同计算机系统之间的协议交互方法、系统及存储介质
CN111190587A (zh) * 2019-12-26 2020-05-22 曙光信息产业(北京)有限公司 一种基于jdbc自动生成工程化前端代码的方法及系统
CN111917783B (zh) * 2020-08-06 2023-06-23 吉林亿联银行股份有限公司 一种通用报文的验证方法、装置及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068552A1 (en) * 2012-09-05 2014-03-06 Vojtech Szocs Infrastructure for automatically generating boilerplate code using annotations and code-generators
CN106453517A (zh) * 2016-09-20 2017-02-22 郑州云海信息技术有限公司 一种基于freemarker的配置文件生成方法
CN109787768A (zh) * 2018-12-12 2019-05-21 平安科技(深圳)有限公司 一种身份验证配置方法、装置及计算机可读存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI231441B (en) * 2003-12-24 2005-04-21 Inst Information Industry Automated integration method of hardware/software interface for SIP development
KR100965093B1 (ko) * 2007-11-13 2010-06-23 에스케이 텔레콤주식회사 동적인 블로그 형성 시스템 및 방법, 그리고 이에 적용되는 서버
CN102629204B (zh) * 2012-03-09 2015-07-29 中国联合网络通信集团有限公司 网页源代码生成方法及装置
CN104537012B (zh) * 2014-12-17 2019-03-26 广州酷狗计算机科技有限公司 数据处理方法和装置
CN106447277A (zh) * 2015-08-10 2017-02-22 威海兴达信息科技有限公司 一种办公自动化管理系统
CN106598620A (zh) * 2016-12-21 2017-04-26 深圳南北互联网金融服务有限公司 代码生成方法及代码生成器

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140068552A1 (en) * 2012-09-05 2014-03-06 Vojtech Szocs Infrastructure for automatically generating boilerplate code using annotations and code-generators
CN106453517A (zh) * 2016-09-20 2017-02-22 郑州云海信息技术有限公司 一种基于freemarker的配置文件生成方法
CN109787768A (zh) * 2018-12-12 2019-05-21 平安科技(深圳)有限公司 一种身份验证配置方法、装置及计算机可读存储介质

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LIN, YUJIE ET AL.: "Research and Design of Code Generator for Enterprise Web Application based on FreeMarker Template Engine", INFORMATION TECHNOLOGY, 30 September 2016 (2016-09-30) *
XIE, MAN ET AL.: "The Design and Implementation of User-Defined Control Based on FreeMarker", JOURNAL OF DONGGUAN UNIVERSITY OF TECHNOLOGY, vol. 22, no. 5, 31 October 2015 (2015-10-31), pages 32 - 35 *

Also Published As

Publication number Publication date
CN109787768A (zh) 2019-05-21
CN109787768B (zh) 2021-08-03

Similar Documents

Publication Publication Date Title
WO2020119037A1 (zh) 一种身份验证配置方法、装置及计算机可读存储介质
JP5990654B2 (ja) アプリケーションコード難読化装置及びその方法
CN109067528B (zh) 密码运算、创建工作密钥的方法、密码服务平台及设备
CN111475824B (zh) 数据访问方法、装置、设备和存储介质
US9973480B2 (en) Multi-level security enforcement utilizing data typing
US11500988B2 (en) Binding secure keys of secure guests to a hardware security module
TWI773960B (zh) 用於以加密金鑰指令計算數位簽章驗證標記之電腦程式產品、電腦系統及電腦實施方法
CN110138818B (zh) 传递参数的方法、网站应用、系统、装置以及服务后端
US11196548B1 (en) Hypervisor protected key
WO2019062015A1 (zh) 源代码保护方法、应用服务器及计算机可读存储介质
CN113055380B (zh) 报文处理方法、装置、电子设备及介质
US11366894B1 (en) Secure computing resource deployment using homomorphic encryption
US6754819B1 (en) Method and system for providing cryptographic services in a distributed application
US20140059341A1 (en) Creating and accessing encrypted web based content in hybrid applications
CN113544674A (zh) 用于安全接口控件的安全执行客户机所有者控制
TWI811514B (zh) 用於計算數位簽章認證標記指令之電腦程式產品、電腦系統及電腦實施方法
CN112966227A (zh) 代码加密解密方法和装置、存储介质
CN109769010B (zh) 基于SDK访问CloudStack服务器的方法、装置、设备及存储介质
US11507355B2 (en) Enforcement of signatures for software deployment configuration
CN112115430A (zh) 一种apk的加固方法、电子设备及存储介质
CN111078224A (zh) 软件包文件数据处理方法、装置、计算机设备及存储介质
WO2023279698A1 (zh) 数据传输方法、系统、计算机设备及存储介质
CN112817615B (zh) 文件处理方法、设备、系统和存储介质
CN107968793A (zh) 一种下载白盒密钥的方法、装置及系统
CN108427559B (zh) 一种脚本文件生成和调用方法以及装置

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: 19897282

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 29.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19897282

Country of ref document: EP

Kind code of ref document: A1