CN113157721A - Method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data object) - Google Patents

Method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data object) Download PDF

Info

Publication number
CN113157721A
CN113157721A CN202110237127.5A CN202110237127A CN113157721A CN 113157721 A CN113157721 A CN 113157721A CN 202110237127 A CN202110237127 A CN 202110237127A CN 113157721 A CN113157721 A CN 113157721A
Authority
CN
China
Prior art keywords
pdo
php
sql
database
access
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.)
Granted
Application number
CN202110237127.5A
Other languages
Chinese (zh)
Other versions
CN113157721B (en
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.)
Beijing Zhongan Xingyun Software Technology Co ltd
Original Assignee
Beijing Zhongan Xingyun Software 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 Beijing Zhongan Xingyun Software Technology Co ltd filed Critical Beijing Zhongan Xingyun Software Technology Co ltd
Priority to CN202110237127.5A priority Critical patent/CN113157721B/en
Publication of CN113157721A publication Critical patent/CN113157721A/en
Application granted granted Critical
Publication of CN113157721B publication Critical patent/CN113157721B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for realizing association of application access and database access behaviors based on PHP extension PDO, which relates to the technical field of web development and comprises the steps of modifying the name PDO of a class providing PHP access by the original PDO extension into HOOK _ PDO; the method comprises the steps that a class is self-defined at a PHP source code level and is named as PDO, a HOOK _ PDO class is inherited, a user who reads operation application is realized in the self-defined PDO class, user information is added into original SQL in an SQL annotation mode, and the SQL with the added annotation is sent to a database auditing and protecting system; the database auditing and guarding system analyzes the annotated SQL, records the associated information of the user and the SQL, accesses the database and returns data to the PHP application program. According to the method, the user information and the SQL are associated and then sent to the database auditing and protecting system for operation and access tracing. Under the condition that the PHP application source code is not changed, the association between the PHP application access and the database access is realized more efficiently and more quickly, and the access tracing and the access control based on the system user are carried out.

Description

Method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data object)
Technical Field
The invention relates to the technical field of web development, in particular to a method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extension PDO (product data repository).
Background
PHP (Hypertext Preprocessor) is a universal open source script language, absorbs the characteristics of C language, Java and Perl, is beneficial to learning, is widely used and is mainly suitable for the field of Web development. The PDO extension defines a lightweight, consistent interface for PHP access databases, which provides a data access abstraction layer so that queries and data retrieval can be performed through consistent functions, regardless of the database used.
In practical application, the steps for realizing the association between the PHP application access and the database access are complex, and the PHP application source code is usually required to be changed.
Disclosure of Invention
In order to overcome the above problems or at least partially solve the above problems, embodiments of the present invention provide a method for implementing association between application access and database access behaviors based on a PHP extension PDO, which implements association between PHP application access and database access more efficiently and more quickly without changing the source code of the PHP application.
The embodiment of the invention is realized by the following steps:
the method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data repository) comprises the following steps of: modifying the PHP extension PDO source code to obtain a modified PDO extension, wherein the modified PDO extension modifies the name PDO of the class which is provided with PHP access by the original PDO extension into HOOK _ PDO; the method comprises the steps that a class is self-defined at a PHP source code level and is named as PDO, a HOOK _ PDO class is inherited, a user who reads operation application is realized in the self-defined PDO class, user information is added into original SQL in an SQL annotation mode, and the SQL with the added annotation is sent to a database auditing and protecting system; the database auditing and protecting system analyzes the annotated SQL and records the associated information of the user and the SQL; and the database auditing and protecting system accesses the database according to the user and SQL related information and returns data to the PHP application program.
According to the method, the customized PHP extension PDO is recompiled in each application server, the user information is obtained by utilizing the customized PDO extension, and the user information and the SQL are associated and then sent to the database auditing and protecting system for operation and access tracing. Under the condition that the PHP application source code is not changed, the association between the PHP application access and the database access is realized more efficiently and more quickly, and the access tracing and the access control based on the system user are carried out.
In some embodiments of the present invention, the step of modifying the modified PDO extension to modify the name PDO of the class for which the original PDO extension provides PHP access to the HOOK _ PDO includes:
the php main program calls an INIT _ CLASS _ ENTRY (ce, "HOOK _ PDO", PDO _ dbh _ functions) function to send the function to the modified PDO extension to perform HOOK _ PDO CLASS registration, and the modified PDO extension returns the information that the HOOK _ PDO CLASS registration is successful to the php main program.
In some embodiments of the present invention, the self-defining a name of a class as PDO at the PHP source code level, and the step of inheriting the HOOK _ PDO class includes:
the PHP main program calls a PHP _ MINIT method of the PDO driver and sends the method to the PDO driver, the PDO driver calls the PHP _ PDO _ register _ driver to register the PDO driver, and the modified PDO extension sends the information that the PDO driver is successfully registered back to the PDO driver and the PHP main program in sequence.
In some embodiments of the present invention, the step of adding user information to the original SQL by way of SQL annotation by a user who implements the read operation application in the PDO class, and sending the annotated SQL to the database auditing and protection system includes:
the PHP main program responds to the access operation of the user, calls a PHP _ RINIT method and sends the PHP _ RINIT method to the modified PDO extension for PDO class registration, and the modified PDO extension returns the information that the PDO class registration is successful to the PHP main program;
the PHP application program responds to the access of the PHP main program, acquires the PDO driver according to the configured database type, IP, port and library and sends the PDO driver to the modified PDO extension, and the modified PDO extension returns the PDO object to the PHP application program;
the PHP application program executes SQL and sends the SQL to the modified PDO extension, and the modified PDO extension adds the user information to the SQL in an annotation mode and sends an SQL request to the database auditing and protecting system.
In some embodiments of the present invention, the database audit and guard system parses annotated SQL, and the step of recording user and SQL association information comprises:
and the database auditing and protecting system receives and analyzes the annotated SQL, associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control.
In some embodiments of the present invention, the step of the database audit and guard system accessing the database according to the user and SQL associated information and returning the data to the PHP application includes:
and the database auditing and protecting system sends the user and SQL related information to the database to acquire corresponding data and returns the corresponding data to the PHP application program.
In some embodiments of the present invention, the method further includes sequentially returning the corresponding data to the database audit and protection system, the modified PDO extension, the PDO driver, the PHP application, and the PHP main program.
In some embodiments of the present invention, the SQL annotation is implemented as a single line annotation.
In some embodiments of the present invention, the SQL annotation is implemented as a multi-line annotation.
In some embodiments of the invention, the database comprises Cubridge, FreeTDS, Microsoft SQL Server, Sybase, Firebid, IBM DB2, IBM Informix Dynamic Server, Mysql, Oracle, PostgreSQL, SQLite, SQL Azure.
The embodiment of the invention at least has the following advantages or beneficial effects:
the method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data repository) comprises the following steps of: modifying the PHP extension PDO source code to obtain a modified PDO extension, wherein the modified PDO extension modifies the name PDO of the class which is provided with PHP access by the original PDO extension into HOOK _ PDO; the method comprises the steps that a class is self-defined at a PHP source code level and is named as PDO, a HOOK _ PDO class is inherited, a user who reads operation application is realized in the self-defined PDO class, user information is added into original SQL in an SQL annotation mode, and the SQL with the added annotation is sent to a database auditing and protecting system; the database auditing and protecting system analyzes the annotated SQL and records the associated information of the user and the SQL; and the database auditing and protecting system accesses the database according to the user and SQL related information and returns data to the PHP application program.
In the method, the PHP which is expanded by the customized PDO is deployed in the original PHP application server, so that the application is configured in the application to acquire the realization class name and the method name of the user information; when receiving SQL, the PDO driver reads the class name and the method name, calls the method to obtain the user information, and binds the user information with the SQL in an annotation form; the PDO driver calls a native PDO driver and transmits SQL bound with user information to the native PDO driver; after receiving the SQL information, the database auditing and protecting system analyzes the user information from the SQL information; and the database auditing and protecting system associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control. Therefore, the customized PHP extension PDO is recompiled in each application server, the user information is obtained by utilizing the customized PDO extension, and the user information and the SQL are associated and then sent to the database auditing and protecting system for operation and access tracing. Under the condition that the PHP application source code is not changed, the association between the PHP application access and the database access is realized more efficiently and more quickly, and the access tracing and the access control based on the system user are carried out.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flowchart illustrating an embodiment of a method for associating application access behavior with database access behavior based on PHP extended PDO according to the present invention;
FIG. 2 is a schematic diagram of an embodiment of a method for implementing association between application access and database access behaviors based on PHP extended PDO according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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 noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the embodiments of the present invention, it should be further noted that unless otherwise explicitly stated or limited, the terms "disposed" and "connected" should be interpreted broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Examples
Before describing the embodiments, the terms need to be interpreted to facilitate understanding by those skilled in the art:
PDO: the PHP access database defines a lightweight consistent interface that provides a data access abstraction layer that can query and retrieve data using the same functions (methods) regardless of which database is used.
Driving by PDO: the currently supported database types are Cubridge, FreeTDS, Microsoft SQL Server, Sybase, Firebard, IBM DB2, IBM Informix Dynamic Server, Mysql, Oracle, PostgreSQL QL, SQLite, Microsoft SQL Server, SQL Azure.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for implementing association between application access and database access behaviors based on PHP extended PDO according to the present invention;
the embodiment provides a method for realizing association of application access and database access behaviors based on PHP extended PDO, which comprises the following steps:
s11: modifying the PHP extension PDO source code to obtain a modified PDO extension, wherein the modified PDO extension modifies the name PDO of the class which is provided with PHP access by the original PDO extension into HOOK _ PDO;
illustratively, the php main program calls an INIT _ CLASS _ ENTRY (ce, "HOOK _ PDO", PDO _ dbh _ functions) function to send to the modified PDO extension to perform HOOK _ PDO CLASS registration, and the modified PDO extension returns the information that the HOOK _ PDO CLASS registration is successful to the php main program
S12: the method comprises the steps that a class is self-defined at a PHP source code level and is named as PDO, a HOOK _ PDO class is inherited, a user who reads operation application is realized in the self-defined PDO class, user information is added into original SQL in an SQL annotation mode, and the SQL with the added annotation is sent to a database auditing and protecting system;
illustratively, the PHP main program calls a PHP _ MINIT method of the PDO driver and sends the method to the PDO driver, the PDO driver calls the PHP _ PDO _ register _ driver to register itself, and the modified PDO extension sends the information that the PDO driver is successfully registered back to the PDO driver and the PHP main program in sequence. The PHP main program responds to the access operation of the user, calls a PHP _ RINIT method and sends the PHP _ RINIT method to the modified PDO extension for PDO class registration, and the modified PDO extension returns the information that the PDO class registration is successful to the PHP main program; the PHP application program responds to the access of the PHP main program, acquires the PDO driver according to the configured database type, IP, port and library and sends the PDO driver to the modified PDO extension, and the modified PDO extension returns the PDO object to the PHP application program; the PHP application program executes SQL and sends the SQL to the modified PDO extension, and the modified PDO extension adds the user information to the SQL in an annotation mode and sends an SQL request to the database auditing and protecting system.
S13: the database auditing and protecting system analyzes the annotated SQL and records the associated information of the user and the SQL; and the database auditing and protecting system accesses the database according to the user and SQL related information and returns data to the PHP application program.
Illustratively, the database auditing and guarding system receives and analyzes the annotated SQL, associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control. And the database auditing and protecting system sends the user and SQL related information to the database to acquire corresponding data and returns the corresponding data to the PHP application program.
The design principle of this application: after long-term research and practice, the inventor finds that in the prior art, the steps for realizing the association between PHP application access and database access are complex, and the PHP application source code is required to be changed. In view of this, the present application provides a method for implementing association between application access and database access behaviors based on PHP extension PDO.
In the method, the PHP which is expanded by the customized PDO is deployed in the original PHP application server, so that the application is configured in the application to acquire the realization class name and the method name of the user information; when receiving SQL, the PDO driver reads the class name and the method name, calls the method to obtain the user information, and binds the user information with the SQL in an annotation form; the PDO driver calls a native PDO driver and transmits SQL bound with user information to the native PDO driver; after receiving the SQL information, the database auditing and protecting system analyzes the user information from the SQL information; and the database auditing and protecting system associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control. Therefore, the customized PHP extension PDO is recompiled in each application server, the user information is obtained by utilizing the customized PDO extension, and the user information and the SQL are associated and then sent to the database auditing and protecting system for operation and access tracing. Under the condition that the PHP application source code is not changed, the association between the PHP application access and the database access is realized more efficiently and more quickly, and the access tracing and the access control based on the system user are carried out.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a method for implementing association between application access and database access behaviors based on PHP extended PDO according to the present invention.
In some embodiments of the present invention, the step of modifying the modified PDO extension to modify the name PDO of the class for which the original PDO extension provides PHP access to the HOOK _ PDO includes:
the php main program calls an INIT _ CLASS _ ENTRY (ce, "HOOK _ PDO", PDO _ dbh _ functions) function to send the function to the modified PDO extension to perform HOOK _ PDO CLASS registration, and the modified PDO extension returns the information that the HOOK _ PDO CLASS registration is successful to the php main program.
In some embodiments of the present invention, the self-defining a name of a class as PDO at the PHP source code level, and the step of inheriting the HOOK _ PDO class includes:
the PHP main program calls a PHP _ MINIT method of the PDO driver and sends the method to the PDO driver, the PDO driver calls the PHP _ PDO _ register _ driver to register the PDO driver, and the modified PDO extension sends the information that the PDO driver is successfully registered back to the PDO driver and the PHP main program in sequence.
In some embodiments of the present invention, the step of adding user information to the original SQL by way of SQL annotation by a user who implements the read operation application in the PDO class, and sending the annotated SQL to the database auditing and protection system includes:
the PHP main program responds to the access operation of the user, calls a PHP _ RINIT method and sends the PHP _ RINIT method to the modified PDO extension for PDO class registration, and the modified PDO extension returns the information that the PDO class registration is successful to the PHP main program;
the PHP application program responds to the access of the PHP main program, acquires the PDO driver according to the configured database type, IP, port and library and sends the PDO driver to the modified PDO extension, and the modified PDO extension returns the PDO object to the PHP application program;
the PHP application program executes SQL and sends the SQL to the modified PDO extension, and the modified PDO extension adds the user information to the SQL in an annotation mode and sends an SQL request to the database auditing and protecting system.
In some embodiments of the present invention, the database audit and guard system parses annotated SQL, and the step of recording user and SQL association information comprises:
and the database auditing and protecting system receives and analyzes the annotated SQL, associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control.
In some embodiments of the present invention, the step of the database audit and guard system accessing the database according to the user and SQL associated information and returning the data to the PHP application includes:
and the database auditing and protecting system sends the user and SQL related information to the database to acquire corresponding data and returns the corresponding data to the PHP application program.
In some embodiments of the present invention, the method further includes sequentially returning the corresponding data to the database audit and protection system, the modified PDO extension, the PDO driver, the PHP application, and the PHP main program.
In some embodiments of the present invention, the SQL annotation is implemented as a single line annotation.
In some embodiments of the present invention, the SQL annotation is implemented as a multi-line annotation.
In some embodiments of the invention, the database comprises Cubridge, FreeTDS, Microsoft SQL Server, Sybase, Firebid, IBM DB2, IBM Informix Dynamic Server, Mysql, Oracle, PostgreSQL, SQLite, SQL Azure.
In summary, an embodiment of the present invention provides a method for implementing association between application access and database access behaviors based on a PHP extended PDO, including the following steps: modifying the PHP extension PDO source code to obtain a modified PDO extension, wherein the modified PDO extension modifies the name PDO of the class which is provided with PHP access by the original PDO extension into HOOK _ PDO; the method comprises the steps that a class is self-defined at a PHP source code level and is named as PDO, a HOOK _ PDO class is inherited, a user who reads operation application is realized in the self-defined PDO class, user information is added into original SQL in an SQL annotation mode, and the SQL with the added annotation is sent to a database auditing and protecting system; the database auditing and protecting system analyzes the annotated SQL and records the associated information of the user and the SQL; and the database auditing and protecting system accesses the database according to the user and SQL related information and returns data to the PHP application program.
In the method, the PHP which is expanded by the customized PDO is deployed in the original PHP application server, so that the application is configured in the application to acquire the realization class name and the method name of the user information; when receiving SQL, the PDO driver reads the class name and the method name, calls the method to obtain the user information, and binds the user information with the SQL in an annotation form; the PDO driver calls a native PDO driver and transmits SQL bound with user information to the native PDO driver; after receiving the SQL information, the database auditing and protecting system analyzes the user information from the SQL information; and the database auditing and protecting system associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control. Therefore, the customized PHP extension PDO is recompiled in each application server, the user information is obtained by utilizing the customized PDO extension, and the user information and the SQL are associated and then sent to the database auditing and protecting system for operation and access tracing. Under the condition that the PHP application source code is not changed, the association between the PHP application access and the database access is realized more efficiently and more quickly, and the access tracing and the access control based on the system user are carried out.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. The method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data repository), is characterized by comprising the following steps of:
modifying the PHP extension PDO source code to obtain a modified PDO extension, wherein the modified PDO extension modifies the name PDO of the class which is provided with PHP access by the original PDO extension into HOOK _ PDO;
the method comprises the steps that a class is self-defined at a PHP source code level and is named as PDO, a HOOK _ PDO class is inherited, a user who reads operation application is realized in the self-defined PDO class, user information is added into original SQL in an SQL annotation mode, and the SQL with the added annotation is sent to a database auditing and protecting system;
the database auditing and protecting system analyzes the annotated SQL and records the associated information of the user and the SQL;
and the database auditing and protecting system accesses the database according to the user and SQL related information and returns data to the PHP application program.
2. The method for associating PHP extension PDO implementation application access and database access behaviors as claimed in claim 1, wherein the step of modifying the name PDO of the class providing PHP access by the original PDO extension to HOOK _ PDO by the modified PDO extension comprises:
the php main program calls an INIT _ CLASS _ ENTRY (ce, "HOOK _ PDO", PDO _ dbh _ functions) function to send the function to the modified PDO extension to perform HOOK _ PDO CLASS registration, and the modified PDO extension returns the information that the HOOK _ PDO CLASS registration is successful to the php main program.
3. The method of claim 2, wherein the defining a class name as PDO at PHP source level and inheriting the HOOK _ PDO class comprises:
the PHP main program calls a PHP _ MINIT method of the PDO driver and sends the method to the PDO driver, the PDO driver calls the PHP _ PDO _ register _ driver to register the PDO driver, and the modified PDO extension sends the information that the PDO driver is successfully registered back to the PDO driver and the PHP main program in sequence.
4. The method according to claim 3, wherein the method for associating the application access behavior with the database access behavior based on the PHP extended PDO, comprises the steps of, by a user who reads the application for operation in the PDO class, adding user information to the original SQL by means of SQL annotation, and sending the annotated SQL to the database auditing and guarding system:
the PHP main program responds to the access operation of the user, calls a PHP _ RINIT method and sends the PHP _ RINIT method to the modified PDO extension for PDO class registration, and the modified PDO extension returns the information that the PDO class registration is successful to the PHP main program;
the PHP application program responds to the access of the PHP main program, acquires the PDO driver according to the configured database type, IP, port and library and sends the PDO driver to the modified PDO extension, and the modified PDO extension returns the PDO object to the PHP application program;
the PHP application program executes SQL and sends the SQL to the modified PDO extension, and the modified PDO extension adds the user information to the SQL in an annotation mode and sends an SQL request to the database auditing and protecting system.
5. The method of claim 4 for associating application access and database access behaviors based on PHP extended PDO, wherein the step of the database audit and guard system parsing annotated SQL and recording user and SQL association information comprises:
and the database auditing and protecting system receives and analyzes the annotated SQL, associates the user access behavior with the database access behavior according to the analyzed SQL, the user information and the strategy information, and performs user-based access control.
6. The PHP extended PDO-based method for realizing association between application access and database access behaviors according to claim 5, wherein the step of accessing the database and returning data to the PHP application program by the database auditing and guarding system according to the association information between the user and SQL comprises the following steps:
and the database auditing and protecting system sends the user and SQL related information to the database to acquire corresponding data and returns the corresponding data to the PHP application program.
7. The method of claim 6, further comprising returning the corresponding data to the database audit and protection system, the modified PDO extension, the PDO driver, the PHP application, and the PHP master program in sequence.
8. The PHP-extended PDO-based method for correlating application access behavior with database access behavior according to claim 1, wherein the SQL annotation is a single line annotation.
9. The PHP extension PDO-based method for associating application access and database access behaviors as claimed in claim 1, wherein the SQL annotation is implemented by multi-line annotation.
10. The method of claim 1, wherein said database comprises Cubridge, FreeTDS, Microsoft SQL Server, Sybase, Firebird, IBM DB2, IBMINFORMix Dynamic Server, Mysql, Oracle, PostgreSQL, SQLite, SQL Azure.
CN202110237127.5A 2021-03-03 2021-03-03 PHP (PHP-based extended PDO (Power oriented architecture) based method for realizing association of application access and database access behaviors Active CN113157721B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110237127.5A CN113157721B (en) 2021-03-03 2021-03-03 PHP (PHP-based extended PDO (Power oriented architecture) based method for realizing association of application access and database access behaviors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110237127.5A CN113157721B (en) 2021-03-03 2021-03-03 PHP (PHP-based extended PDO (Power oriented architecture) based method for realizing association of application access and database access behaviors

Publications (2)

Publication Number Publication Date
CN113157721A true CN113157721A (en) 2021-07-23
CN113157721B CN113157721B (en) 2024-07-12

Family

ID=76884111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110237127.5A Active CN113157721B (en) 2021-03-03 2021-03-03 PHP (PHP-based extended PDO (Power oriented architecture) based method for realizing association of application access and database access behaviors

Country Status (1)

Country Link
CN (1) CN113157721B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968725A (en) * 2022-06-23 2022-08-30 中国平安财产保险股份有限公司 Task dependency relationship correction method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078172A1 (en) * 2001-06-22 2004-04-22 Moore Richard S. Structured system for the planning, integration, analysis and management of new product development on a real-time, enterprise-wide basis
CN103647794A (en) * 2013-12-31 2014-03-19 北京启明星辰信息安全技术有限公司 Data correlation method based on J2EE platform and correlation plug-in
CN107493299A (en) * 2017-09-20 2017-12-19 杭州安恒信息技术有限公司 A kind of user behavior source tracing method based on three-tier architecture
US20170364686A1 (en) * 2016-06-21 2017-12-21 Shadow-Soft, LLC Auto-injection of security protocols
CN111428141A (en) * 2020-04-23 2020-07-17 北京中安星云软件技术有限公司 Method and device for associating application and database access behavior based on driving agent
CN112052045A (en) * 2020-08-31 2020-12-08 郑州信大捷安信息技术股份有限公司 Equipment control method and system based on IRP hook
CN112395843A (en) * 2020-11-16 2021-02-23 杭州安恒信息技术股份有限公司 PHP code-based service processing method, device, equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040078172A1 (en) * 2001-06-22 2004-04-22 Moore Richard S. Structured system for the planning, integration, analysis and management of new product development on a real-time, enterprise-wide basis
CN103647794A (en) * 2013-12-31 2014-03-19 北京启明星辰信息安全技术有限公司 Data correlation method based on J2EE platform and correlation plug-in
US20170364686A1 (en) * 2016-06-21 2017-12-21 Shadow-Soft, LLC Auto-injection of security protocols
CN107493299A (en) * 2017-09-20 2017-12-19 杭州安恒信息技术有限公司 A kind of user behavior source tracing method based on three-tier architecture
CN111428141A (en) * 2020-04-23 2020-07-17 北京中安星云软件技术有限公司 Method and device for associating application and database access behavior based on driving agent
CN112052045A (en) * 2020-08-31 2020-12-08 郑州信大捷安信息技术股份有限公司 Equipment control method and system based on IRP hook
CN112395843A (en) * 2020-11-16 2021-02-23 杭州安恒信息技术股份有限公司 PHP code-based service processing method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968725A (en) * 2022-06-23 2022-08-30 中国平安财产保险股份有限公司 Task dependency relationship correction method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113157721B (en) 2024-07-12

Similar Documents

Publication Publication Date Title
US11907247B2 (en) Metadata hub for metadata models of database objects
US7039658B2 (en) Method and apparatus for generating web pages from templates
US6697808B1 (en) Method and system for performing advanced object searching of a metadata repository used by a decision support system
US9229971B2 (en) Matching data based on numeric difference
US20040187111A1 (en) Content management portal and method for communicating media content
US20040002982A1 (en) Dynamic metabase store
US20040186860A1 (en) Method and architecture for providing data-change alerts to external applications via a push service
US9542467B2 (en) Efficiently firing mapping and transform rules during bidirectional synchronization
KR20120002579A (en) Extending collaboration capabilities to external data
US8713368B2 (en) Methods for testing OData services
GB2499500A (en) Document merge
US20070234306A1 (en) Tracing performance of machine-readable instructions
US11487742B2 (en) Consistency checks between database systems
US8407235B2 (en) Exposing and using metadata and meta-metadata
US10452628B2 (en) Data analysis schema and method of use in parallel processing of check methods
US20060230075A1 (en) Method and apparatus for exchanging data with a database
US11561976B1 (en) System and method for facilitating metadata identification and import
CN114385763A (en) Data blood margin analysis method, device and system and readable storage medium
US20180046779A1 (en) Caching technology for clinical data sources
CN113157721A (en) Method for realizing association of application access and database access behaviors based on PHP (hypertext preprocessor) extended PDO (product data object)
CN110019306B (en) SQL statement searching method and system based on XML format file
US20080306947A1 (en) Taxonomy editor
US20240119071A1 (en) Relationship-based display of computer-implemented documents
US20240134883A1 (en) Data object management using data object clusters
US11940951B2 (en) Identification and import of metadata for extensions to database artefacts

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
GR01 Patent grant
GR01 Patent grant