CN103176987A - Method and device for controlling database access - Google Patents

Method and device for controlling database access Download PDF

Info

Publication number
CN103176987A
CN103176987A CN2011104311063A CN201110431106A CN103176987A CN 103176987 A CN103176987 A CN 103176987A CN 2011104311063 A CN2011104311063 A CN 2011104311063A CN 201110431106 A CN201110431106 A CN 201110431106A CN 103176987 A CN103176987 A CN 103176987A
Authority
CN
China
Prior art keywords
visitor
database
address
progress information
port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011104311063A
Other languages
Chinese (zh)
Inventor
向勇
陈康
黄铭琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN2011104311063A priority Critical patent/CN103176987A/en
Publication of CN103176987A publication Critical patent/CN103176987A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a device for controlling database access. The method comprises: network connection information of current visitors logged in a database is checked; process information utilized by the visitors who build network connection with a port of the database is obtained; whether the process information accords with the preset process access rules aiming at the visitors or not is judged; and when the process information does not accord with the preset process access rules aiming at the visitors, safety control operations aiming at the visitors are executed. The method and the device for controlling the data access can control the access control to the database to the process level of an application program accurately, prevent illegal application programs from conducting the database access by utilizing legal account numbers, and enhance the access control to the database.

Description

A kind of Access and control strategy of database method and apparatus
Technical field
The present invention relates to information security field, particularly a kind of method and apparatus of Access and control strategy of database.
Background technology
In the system in usage data storehouse, database is distributed to the account information (for example username and password information) of specified application, so that the user uses application program log database to carry out data base manipulation.But the account information of application program may be used on other nonpermissive terminals.Database can be bound with account mutually by the IP address that the terminal of application program operation is used, and only allows from the terminal use account accessing database of legal application program from being allowed to.
But the method that the IP address of account and terminal is bound mutually, but can't be identified and management and control, thereby bring risk to database security specifying the upper multiplexing phenomenon of account of initiating of application system place server (being legal terminal) for directly.
Summary of the invention
The present inventor finds above-mentioned the problems of the prior art, a kind of new technical scheme has been proposed, make accurately to control to the process-level of application program to the access control of database, thereby prevent that the multiplexing account of illegal application program from carrying out database access.
An object of the present invention is to provide a kind of Access and control strategy of database method and apparatus.
According to a first aspect of the invention, provide a kind of Access and control strategy of database method, the method comprises:
Check the current network connection information that has logged in the visitor of database;
Obtain with the port of described database and set up the progress information that visitor that network is connected uses;
Judge whether described progress information meets the predefined process access rule for described visitor;
When judging that described progress information does not meet for the predefined process access rule of described visitor, carry out the security control operation for described visitor.
Preferably, described network connection information comprises described visitor's IP address of terminal, and the method also comprises:
Judge whether described IP address of terminal meets for the predefined IP of described visitor address access rule;
When judging that described IP address of terminal does not meet for the predefined IP of described visitor address access rule, carries out described security control for described visitor and operate.
Preferably, described progress information comprises process name and process path.
Preferably, the described mode of obtaining process name and process path comprises the following steps:
Scan the network of setting up with the port of described database on described visitor's terminal and is connected, according to the progress information corresponding with the port of described database in described network connection, obtain the process number of the port that is connected to described database;
Check the corresponding process name of described process number according to described process number;
Obtain described process path according to described process name.
Preferably, described security control operation comprises at least one item in following two:
Send alarm prompt;
Carry out default safe operation.
Preferably, the described alarm prompt that sends comprises:
Display alarm interface on the terminal of described database;
Send SMS notification to described data base administrator;
The equipment of handling to the data base administrator sends email notification.
Preferably, the default safe operation of described execution comprises:
Closing described visitor is connected with the network of described database;
Finish described visitor to the operation of described database.
According to a second aspect of the invention, provide a kind of Access and control strategy of database device, this device comprises:
The network connection information acquiring unit is used for checking the current network connection information that has logged in the visitor of database;
The progress information acquiring unit is used for obtaining with the port of described database and sets up the progress information that visitor that network is connected uses;
Process rule judgment unit is used for judging whether described progress information meets the predefined process access rule for described visitor;
The first safe operation unit is used for when judging that described progress information does not meet for the predefined process access rule of described visitor, and the security control of carrying out for described visitor operates.
Preferably, described network connection information comprises described visitor's IP address of terminal, and this device also comprises:
Rule judgment unit, IP address is used for judging whether described IP address of terminal meets for the predefined IP of described visitor address access rule;
The second safe operation unit is used for when judging that described IP address of terminal does not meet for the predefined IP of described visitor address access rule, carries out described security control operation for described visitor.
Preferably, described progress information comprises process name and process path.
Preferably, the progress information acquiring unit also comprises:
The process number acquisition module, be connected for the network of setting up with the port of described database on the terminal that scans described visitor, according to the progress information corresponding with the port of described database in described network connection, obtain the process number of the port that is connected to described database;
The process name acquisition module is used for checking the corresponding process name of described process number according to described process number;
The process path acquisition module is used for obtaining described process path according to described process name.
In the scheme of Access and control strategy of database provided by the present invention, according to the current network connection information that has logged in the visitor of database, further obtain with the port of database and set up the progress information that visitor that network is connected uses, according to predefined process access rule, judge whether this progress information meets the process access rule of setting for this visitor, this is regular in the situation that do not meet, and carries out next step security control operation.Thereby, can the process-level of application program will be controlled to accurately to the access control of database, prevent that illegal program process from utilizing legal account to carry out account multiplexing with accessing database, strengthened Access and control strategy of database, improved thus the security of database.
In another embodiment, can also increase the IP address of terminal that the visitor is used and check, thereby prevent that illegal program process from utilizing legal account and legal terminal to carry out database access.
By referring to the detailed description of accompanying drawing to exemplary embodiment of the present invention, it is clear that further feature of the present invention and advantage thereof will become.
Description of drawings
The accompanying drawing that consists of the part of instructions has been described embodiments of the invention, and is used for explaining principle of the present invention together with the description.
With reference to accompanying drawing, according to following detailed description, can more be expressly understood the present invention, wherein:
Fig. 1 is the schematic flow sheet that illustrates according to the Access and control strategy of database method of the embodiment of the present invention;
Fig. 2 illustrates the structural representation according to the Access and control strategy of database device of the embodiment of the present invention.
Embodiment
Describe various exemplary embodiment of the present invention in detail now with reference to accompanying drawing.It should be noted that: unless illustrate in addition, the parts of setting forth in these embodiments and the positioned opposite of step do not limit the scope of the invention.
Simultaneously, should be understood that for convenience of description, the size of the various piece shown in accompanying drawing is not to draw according to the proportionate relationship of reality.
Below be illustrative to the description only actually of at least one exemplary embodiment, never as any restriction to the present invention and application or use.
May not discuss in detail for the known technology of person of ordinary skill in the relevant, method and apparatus, but in suitable situation, described technology, method and apparatus should be regarded as authorizing the part of instructions.
In all examples with discussing shown here, it is exemplary that any occurrence should be construed as merely, rather than as restriction.Therefore, other example of exemplary embodiment can have different values.
It should be noted that: represent similar terms in similar label and letter accompanying drawing below, therefore, in case be defined in an a certain Xiang Zaiyi accompanying drawing, do not need it is further discussed in accompanying drawing subsequently.
Method, device and the embodiment of Access and control strategy of database provided by the invention are described as an example of oracle database example in following examples.But it will be understood by those skilled in the art that method and apparatus of the present invention also is applicable to other databases.
Simultaneously, those skilled in the art will be appreciated that the terminal that the visitor uses may operate on Windows operating system, also may operate on other operating systems, may use different networking commands for different operating system.
The method of Access and control strategy of database
With reference to shown in Figure 1, this figure is the schematic flow sheet of the embodiment of the method for Access and control strategy of database provided by the invention, and the below introduces the step of the method embodiment in detail.
Step 101 is checked the current network connection information that has logged in the visitor of database.
For making the application program can accessing database, database have been set up different accounts for each application program usually, and for example username and password, be connected also log database for the application program with the Database network.Check the visitor of current log database, can obtain the current network connection information that has logged in the visitor of database.
Check that the visitor's of log database network connection information is well known to those skilled in the art, specifically take oracle database as example, the visitor who obtains in the following manner login sets up network and connects the account name information of using:
SELECT?sys_context(′USERENV′,′SESSION_USER′)FROMDUAL。After carrying out mentioned order, login the account name ' USERENV ' of use with obtaining the visitor.
In another preferred embodiment, can also can also comprise the IP address of terminal that the visitor uses by network connection information, can obtain by the following method the IP address that in network connection information, visitor's terminal is used:
SELECT?sys_context(′USERENV′,′IP_ADDRESS′)FROM?DUAL。After carrying out mentioned order, will obtain the corresponding IP address information of account name ' USERENV '.
Check that the visitor's of log database network connects and can periodically check according to different needs.For example, check for the first time all network connections of the visitor of log database, and carry out follow-up progress information validity decision for each visitor.After this, can contrast last scanning result in visitor's log-on message of predetermined time gap periods ground scan database, carry out follow-up progress information validity decision for new visitor.
Step 102 is obtained with the port of database and is set up the progress information that visitor that network is connected uses.
Process is that operating system is the entity of the application assigned resource carried out.The visitor is connected the application program used corresponding to a process with Database.
Set up with the port of database progress information that visitor that network is connected uses and can comprise multiplely, for example the process number of process, can be also process path.Therefore, according to different progress informations corresponding from the database port in network connection information, can be obtained by diverse ways the progress information of the process used when the visitor logs in database.
Comprise that take progress information process name and process path as example, below introduce preferred embodiment a kind of.
As a rule, set up network between database and visitor's program process and be connected, network connects and comprises port information.The port that database uses can be to generally acknowledge that port (Well known) can be also other ports, can connect by the network on scanning visitor's terminal, obtain network and connect with the port of database and set up the progress information that visitor that network is connected uses.
Take visitor's terminal operating in Windows operating system as example, executive system order " netstat-a " on visitor's terminal, for the netsta order, parameter a has shown that all networks of having set up connect, wherein comprise the port of local and far-end (database port), thereby can obtain the local port that the network set up with the database port is connected.Further, can check that this port is shared by which local process by netstat-ano|findstr "<local port number〉" order.Particularly, parameter o has shown the process number of setting up the local process that this network connects, and incorporating parametric findstr "<local port number〉" can check the process number of the local process that takies this local port.
In addition, also can directly check the local process that connects with the database port number by netstat-ano|findstr "<database port〉" order.
According to foregoing description, when operating in other operating systems for the process of application program, those skilled in the art will be appreciated that the concrete implementation method for different operating system, describe in detail no longer one by one here.
In the progress information of the process that the visitor uses, process number may be that process is distributed when creating, and therefore may also need to check the corresponding process name of process number according to process number.The method of checking process name can be different, for example can obtain process name by carrying out tasklist|findstr "<process number〉", the perhaps task manager of the operating system by checking application terminal, demonstrate the process of current operation in the mode of process number, thereby obtain the corresponding process name of process number.
Next, can obtain process path according to process name, specifically, can fill order: wmic process where " caption=' process name " ' get commandline, thus obtain process path corresponding to process name.
Step 103 judges whether progress information meets the predefined process access rule for the visitor.
After obtaining by step 102 progress information that the visitor uses, according to for the predefined process access rule of visitor, judge whether progress information meets the predefined process access rule for the visitor.For example, a predefined rule can be specifically:
Account A--(process name, process path)
In aforementioned another kind of preferred embodiment, check the IP address of terminal that also comprises the visitor in the network connection information that obtains the current visitor who has logged in database, therefore can also judge further whether IP address of terminal meets for the predefined IP of this visitor address access rule, for example, a predefined rule can be specifically:
Account A--(IP address, process name, process path)
Step 104 when determinating processes information does not meet the predefined process access rule for the visitor, is carried out the security control operation for the visitor.
According to the judged result in step 103, when determinating processes information does not meet the predefined process access rule for the visitor, can according to different needs, carry out the security control operation for this visitor.
Similarly, when judging that IP address of terminal does not meet for the predefined IP of visitor address access rule, also can carry out the security control operation for this visitor.
Concrete security control operation can comprise sends alarm prompt and at least one item of carrying out in default safe operation.For example, can only send alarm prompt or directly carry out default safe operation, carrying out default safe operation when also can send alarm prompt.
The specific implementation of sending alarm prompt can be included in display alarm interface on the terminal of database, also can send SMS notification or send mail notification to the equipment that the data base administrator handles to the data base administrator.
Carrying out default safe operation can be to close this visitor be connected with the network of database or finish the visitor to the operation of database.
The device of Access and control strategy of database
With reference to shown in Figure 2, this figure is the structural representation of the device embodiment of Access and control strategy of database provided by the invention, below introduce in detail the device embodiment corresponding with above-mentioned Access and control strategy of database method.
This device comprises network connection information acquiring unit 201, progress information acquiring unit 202, process rule judgment unit 203 and the first safe operation unit 204.
Network connection information acquiring unit 201 is used for checking the current network connection information that has logged in the visitor of database.These network connection informations can be to log in the account name that uses.
Progress information acquiring unit 202 is used for obtaining with the port of database sets up the progress information that visitor that network is connected uses.
Progress information comprises process name and process path.Accordingly, progress information acquiring unit 202 specifically can comprise process number acquisition module, process name acquisition module process path acquisition module.
The process number acquisition module is connected for the network of setting up with the port of database on scanning visitor's terminal, according to the progress information corresponding with the port of database in the network connection, obtains the process number of the port that is connected to database.
The process name acquisition module is used for process number and checks the corresponding process name of described process number.
The process path acquisition module is used for process name and obtains process path.
The progress information that visitor that network is connected uses is set up according to the current visitor's who has logged in database network connection information and with the port of database in process rule judgment unit 203, judges whether progress information meets the predefined process access rule for the visitor.
The first safe operation unit 204 is used for when determinating processes information does not meet for the predefined process access rule of visitor, and the security control of carrying out for the visitor operates.
In another kind of embodiment, network connection information can also comprise visitor's IP address of terminal, and this device can further include rule judgment unit, IP address and the second safe operation unit.
Rule judgment unit, IP address is used for judging whether IP address of terminal meets for the predefined IP of visitor address access rule.
The second safe operation unit is used for when judging that IP address of terminal does not meet for the predefined IP of visitor address access rule, carries out the security control operation for the visitor.
So far, described a kind of Access and control strategy of database method and apparatus according to the embodiment of the present invention in detail.For fear of covering design of the present invention, details more known in the field are not described.Those skilled in the art can understand how to implement technical scheme disclosed herein fully according to top description.
May realize in many ways method of the present invention, system and equipment.For example, can realize method and system of the present invention by any combination of software, hardware, firmware or software, hardware, firmware.The said sequence that is used for the step of described method is only in order to describe, and the step of method of the present invention is not limited to above specifically described order, unless otherwise specify.In addition, in certain embodiments, can be also the program that is recorded in recording medium with the invention process, these programs comprise be used to the machine readable instructions that realizes the method according to this invention.Thereby the present invention also covers the recording medium that storage is used for the program of execution the method according to this invention.
Although by example, specific embodiments more of the present invention are had been described in detail, it should be appreciated by those skilled in the art, above example is only in order to describe, rather than in order to limit the scope of the invention.It should be appreciated by those skilled in the art, can in the situation that do not depart from the scope of the present invention and spirit, above embodiment be modified.Scope of the present invention is limited by claims.

Claims (11)

1. an Access and control strategy of database method, is characterized in that, the method comprises:
Check the current network connection information that has logged in the visitor of database;
Obtain with the port of described database and set up the progress information that visitor that network is connected uses;
Judge whether described progress information meets the predefined process access rule for described visitor;
When judging that described progress information does not meet for the predefined process access rule of described visitor, carry out the security control operation for described visitor.
2. method according to claim 1, is characterized in that, described network connection information comprises described visitor's IP address of terminal, and the method also comprises:
Judge whether described IP address of terminal meets for the predefined IP of described visitor address access rule;
When judging that described IP address of terminal does not meet for the predefined IP of described visitor address access rule, carries out described security control for described visitor and operate.
3. method according to claim 1, is characterized in that, described progress information comprises process name and process path.
4. method according to claim 3, is characterized in that, the described mode of obtaining process name and process path comprises the following steps:
Scan the network of setting up with the port of described database on described visitor's terminal and is connected, according to the progress information corresponding with the port of described database in described network connection, obtain the process number of the port that is connected to described database;
Check the corresponding process name of described process number according to described process number;
Obtain described process path according to described process name.
5. method according to claim 1, is characterized in that, described security control operation comprises at least one in following two:
Send alarm prompt;
Carry out default safe operation.
6. method according to claim 5, is characterized in that, the described alarm prompt that sends comprises:
Display alarm interface on the terminal of described database;
Send SMS notification to described data base administrator;
The equipment of handling to the data base administrator sends email notification.
7. method according to claim 5, is characterized in that, the default safe operation of described execution comprises:
Closing described visitor is connected with the network of described database;
Finish described visitor to the operation of described database.
8. an Access and control strategy of database device, is characterized in that, this device comprises:
The network connection information acquiring unit is used for checking the current network connection information that has logged in the visitor of database;
The progress information acquiring unit is used for obtaining with the port of described database and sets up the progress information that visitor that network is connected uses;
Process rule judgment unit is used for judging whether described progress information meets the predefined process access rule for described visitor;
The first safe operation unit is used for when judging that described progress information does not meet for the predefined process access rule of described visitor, and the security control of carrying out for described visitor operates.
9. device according to claim 8, is characterized in that, described network connection information comprises described visitor's IP address of terminal, and this device also comprises:
Rule judgment unit, IP address is used for judging whether described IP address of terminal meets for the predefined IP of described visitor address access rule;
The second safe operation unit is used for when judging that described IP address of terminal does not meet for the predefined IP of described visitor address access rule, carries out described security control operation for described visitor.
10. device according to claim 8, is characterized in that, described progress information comprises process name and process path.
11. device according to claim 10 is characterized in that, described progress information acquiring unit comprises:
The process number acquisition module, be connected for the network of setting up with the port of described database on the terminal that scans described visitor, according to the progress information corresponding with the port of described database in described network connection, obtain the process number of the port that is connected to described database;
The process name acquisition module is used for checking the corresponding process name of described process number according to described process number;
The process path acquisition module is used for obtaining described process path according to described process name.
CN2011104311063A 2011-12-21 2011-12-21 Method and device for controlling database access Pending CN103176987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104311063A CN103176987A (en) 2011-12-21 2011-12-21 Method and device for controlling database access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104311063A CN103176987A (en) 2011-12-21 2011-12-21 Method and device for controlling database access

Publications (1)

Publication Number Publication Date
CN103176987A true CN103176987A (en) 2013-06-26

Family

ID=48636868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104311063A Pending CN103176987A (en) 2011-12-21 2011-12-21 Method and device for controlling database access

Country Status (1)

Country Link
CN (1) CN103176987A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219052A (en) * 2014-08-22 2014-12-17 小米科技有限责任公司 Verification method and verification device for service program
CN104915252A (en) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 Process port management device and method
CN105306465A (en) * 2015-10-30 2016-02-03 新浪网技术(中国)有限公司 Website secure access realization method and apparatus
CN108769278A (en) * 2018-04-11 2018-11-06 北京中科闻歌科技股份有限公司 A kind of social media account management method and system
CN110647771A (en) * 2019-09-10 2020-01-03 许昌许继软件技术有限公司 Mysql database storage integrity verification protection method and device
CN111753270A (en) * 2020-06-28 2020-10-09 支付宝(杭州)信息技术有限公司 Application program login verification method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564530A (en) * 2004-04-15 2005-01-12 沈春和 Network safety guarded distributing invading detection and internal net monitoring system and method thereof
US20080077788A1 (en) * 2006-09-26 2008-03-27 Microsoft Corporation Secure Tunnel Over HTTPS Connection
CN101355427A (en) * 2008-07-22 2009-01-28 中国移动通信集团江苏有限公司 Internally-control safety method for information gateway-service support system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1564530A (en) * 2004-04-15 2005-01-12 沈春和 Network safety guarded distributing invading detection and internal net monitoring system and method thereof
US20080077788A1 (en) * 2006-09-26 2008-03-27 Microsoft Corporation Secure Tunnel Over HTTPS Connection
CN101355427A (en) * 2008-07-22 2009-01-28 中国移动通信集团江苏有限公司 Internally-control safety method for information gateway-service support system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219052A (en) * 2014-08-22 2014-12-17 小米科技有限责任公司 Verification method and verification device for service program
CN104915252A (en) * 2015-06-15 2015-09-16 上海斐讯数据通信技术有限公司 Process port management device and method
CN104915252B (en) * 2015-06-15 2018-04-06 上海斐讯数据通信技术有限公司 A kind of process port management means and method
CN105306465A (en) * 2015-10-30 2016-02-03 新浪网技术(中国)有限公司 Website secure access realization method and apparatus
CN108769278A (en) * 2018-04-11 2018-11-06 北京中科闻歌科技股份有限公司 A kind of social media account management method and system
CN110647771A (en) * 2019-09-10 2020-01-03 许昌许继软件技术有限公司 Mysql database storage integrity verification protection method and device
CN110647771B (en) * 2019-09-10 2021-11-16 许昌许继软件技术有限公司 Mysql database storage integrity verification protection method and device
CN111753270A (en) * 2020-06-28 2020-10-09 支付宝(杭州)信息技术有限公司 Application program login verification method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6895431B2 (en) Passwordless authentication for access control
CN109150828B (en) Verification registration method and system
CN107210916B (en) Conditional access promotion
CN107070945B (en) Identity login method and equipment
EP2883340B1 (en) Authorization method, apparatus, and system
US8990909B2 (en) Out-of-band challenge question authentication
CN108200050A (en) Single logging-on server, method and computer readable storage medium
CN105577662B (en) Terminal environments method of controlling security and server
KR101569753B1 (en) System, Method and Apparatus for Secure Login
CN103986584A (en) Double-factor identity verification method based on intelligent equipment
CN112534792A (en) Method and system for providing secure access to cloud services in a cloud computing environment
CN103176987A (en) Method and device for controlling database access
CN102821085A (en) Third party authorization login method, open platform and system
CN103945380A (en) Method and system for network login authentication based on graphic code
US20220294788A1 (en) Customizing authentication and handling pre and post authentication in identity cloud service
CN105959276A (en) Application control method, device, and terminal device based on third party account login
CN105429943B (en) Information processing method and terminal thereof
CN109698809A (en) A kind of recognition methods of account abnormal login and device
CN104796436A (en) User login method and system, first platform server and related platform server
CN111433770A (en) User-selected key authentication
CN109714345B (en) Character bastion machine method and system without perception of user
CN107196893A (en) Login method, login service device and login client
CN106302606A (en) A kind of across application access method and device
CN104954343A (en) Verification information processing method, server and system
CN107483477B (en) Account management method and account management system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130626