A method and system for managing and operating an audit system for user operation permissions

The method manages user permissions in operativenance audit systems by monitoring session connections and enforcing access controls, addressing data leaks and losses due to human error or bypasses.

CN113868610BActive Publication Date: 2025-07-15HANGZHOU DBAPPSECURITY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111128606.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-26
Publication Date
2025-07-15
Estimated Expiration
2041-09-26

AI Technical Summary

Technical Problem

The existing operation and maintenance audit system cannot effectively avoid asset data leakage and loss caused by human error operations or technical bypass.

Method used

By obtaining the account information and directory information of the operation and maintenance audit system users, generating permission control scripts and rule configuration files, and starting the session monitoring process in the target server, processing access control permissions based on the session connection status and rule configuration files.

Benefits of technology

Improves the security of the server, prevents asset data leakage and loss caused by human misoperation or technical bypass, and realizes precise permission control for a single user to access a single file or directory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113868610B_ABST
    Figure CN113868610B_ABST
Patent Text Reader

Abstract

The present application relates to a method, system, device and storage medium for managing and operating an audit system for user operation permissions. By obtaining the account information of the operation and maintenance audit system user who logs in to the target server, the directory information of the target file requested by the operation and maintenance audit system user to access, and obtaining the corresponding permission control script and rule configuration file according to the account information and the directory information; uploading the permission control script and the rule configuration file to the target server via the operation and maintenance audit system, and executing the permission control script to start the session monitoring process; obtaining the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process, and instructing the target server to process the access control permission of the target file according to the session connection status and the rule configuration file, which solves the problem that the operation and maintenance audit system cannot directly avoid asset data leakage and loss caused by human misoperation, technical bypass and other means, and improves the security of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security, and in particular, to a method, a system, a device, and a storage medium for managing and operating and maintaining the user operation permissions of an audit system. Background Art

[0002] An operation and maintenance audit system is a device for recording and auditing the entire process of an operator from logging in to a server to ending a remote session. According to the traditional process, when the operator executes a dangerous instruction during the operation process or accesses certain directory files storing important data, the operation and maintenance audit system can detect the command from the client, determine whether it is dangerous, and thus intercept and block the session.

[0003] However, the existing operation and maintenance audit systems cannot directly avoid the leakage and loss of asset data caused by human misoperation or technical bypass.

[0004] Regarding the problem of asset data leakage and loss existing in the current operation and maintenance audit system, no effective solution has been proposed yet. Summary of the Invention

[0005] In this embodiment, a method, a system, a device, and a storage medium for managing the user operation permissions of an operation and maintenance audit system are provided to solve the problems in the related technologies.

[0006] In a first aspect, in this embodiment, a method for managing the user operation permissions of an operation and maintenance audit system is provided, including:

[0007] Obtain the account information of the operation and maintenance audit system user who logs in to the target server, the directory information of the target file requested by the operation and maintenance audit system user to access, and obtain the corresponding permission control script and rule configuration file according to the account information and the directory information;

[0008] Upload the permission control script and the rule configuration file to the target server via the operation and maintenance audit system, and execute the permission control script to start a session monitoring process;

[0009] Obtain the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process, and instruct the target server to process the access control permission of the target file according to the session connection status and the rule configuration file.

[0010] In some of these embodiments, executing the permission control script to start a session monitoring process includes:

[0011] Execute the permission control script according to the administrator permission;

[0012] When the session monitoring process has been started, a session monitoring subprocess is generated, where the session monitoring subprocess is used to monitor the session connection status between the current operation and maintenance audit system and the target server;

[0013] And, when the session monitoring process has not been started, start the session monitoring process and generate a session monitoring subprocess.

[0014] In some embodiments, obtaining the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process includes:

[0015] Periodically detect whether the process ID file of the session monitoring process exists;

[0016] When it is detected that the process ID file of the session monitoring process exists, determine that the session connection status is the first state;

[0017] And, when it is detected that the process ID file of the session monitoring process does not exist, determine that the session connection status is the second state.

[0018] In some embodiments, instructing the target server to process the access control permission of the target file according to the session connection status and the rule configuration file includes:

[0019] When the session connection status is the first state, instruct the target server to modify the access control permission of the target file;

[0020] And, when the session connection status is the second state, instruct the target server to restore the access control permission of the target file.

[0021] In some embodiments, when the session connection status is the first state, instructing the target server to modify the access control permission of the target file includes:

[0022] When the session connection status is the first state, determine whether the access control permission form of the target file has been created;

[0023] When it is determined that the access control permission form of the target file has not been created yet, create the access control permission form and write the access control permission record of the initial access control permission into the access control permission form;

[0024] Add an access control permission record in the access control permission form according to the rule configuration file;

[0025] Set the access control permission of the target file according to the newly added access control permission record.

[0026] In some of these embodiments, when the session connection state is the second state, instructing the target server to restore the access control permission of the target file includes:

[0027] In the case where the session connection state is the second state, delete the newly added access control permission record when the session connection state is the first state;

[0028] Obtain the account information according to the session connection state, and determine whether there is an access control permission record about the account information in the current access control permission form;

[0029] In the case where it is determined that there is an access control permission record about the account information in the access control permission form, set the access control permission of the target file according to the latest access control permission record of the account information;

[0030] And, in the case where it is determined that there is no access control permission record about the account information in the access control permission form, set the access control permission of the target file according to the access control permission record of the initial access control permission.

[0031] In some of these embodiments, when the session connection state is the second state, after instructing the target server to restore the access control permission of the target file, the method further includes:

[0032] Determine whether the operation and maintenance audit system user using the account information has exited the target server;

[0033] In the case where it is determined that the operation and maintenance audit system user using the account information has exited the target server, delete the relevant data of the session monitoring process.

[0034] In a second aspect, in this embodiment, a system for managing the operation and maintenance audit system user operation permissions is provided, including: an operation and maintenance audit system and a target server, where the operation and maintenance audit system is used to implement the method for managing the operation and maintenance audit system user operation permissions described in the first aspect above.

[0035] In a third aspect, in this embodiment, an electronic device is provided, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for managing the operation and maintenance audit system user operation permissions described in the first aspect above.

[0036] Fourthly, in this embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for managing and operating an audit system user operation permission described in the first aspect above are implemented.

[0037] Compared with the related art, in the method, system, device, and storage medium for managing and operating an audit system user operation permission provided in this embodiment, by obtaining the account information of the operation and maintenance audit system user logging in to the target server, the directory information of the target file requested by the operation and maintenance audit system user, and obtaining the corresponding permission control script and rule configuration file according to the account information and the directory information; uploading the permission control script and rule configuration file to the target server via the operation and maintenance audit system, and executing the permission control script to start a session monitoring process; obtaining the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process, and instructing the target server to process the access control permission of the target file according to the session connection status and the rule configuration file, the problem that the operation and maintenance audit system cannot directly avoid asset data leakage and loss caused by human misoperation, technical bypass, etc. is solved, and the security of the server is improved.

[0038] The details of one or more embodiments of the present application are set forth in the following drawings and description to make the other features, objects, and advantages of the present application more comprehensible. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0040] Figure 1 is a hardware structure block diagram of a terminal of the method for managing and operating an audit system user operation permission in an embodiment of the present application;

[0041] Figure 2 is a flowchart of the method for managing and operating an audit system user operation permission in an embodiment of the present application;

[0042] Figure 3 is an architecture diagram of the system for managing and operating an audit system user operation permission in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] To understand the purpose, technical solution, and advantages of the present application more clearly, the present application will be described and illustrated below with reference to the drawings and embodiments.

[0044] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meanings understood by those with ordinary skills in the technical field to which this application belongs. In this application, words such as "a", "an", "one kind", "the", "these", etc. do not indicate a limitation in quantity, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent in these processes, methods, products or devices. The terms "connected", "coupled", etc. involved in this application do not limit to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. Usually, the character " / " indicates that the objects associated before and after are an "or" relationship. The terms "first", "second", "third", etc. involved in this application only distinguish similar objects and do not represent a specific sorting of the objects.

[0045] The method embodiment provided in this embodiment can be executed on a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 is a hardware structure block diagram of the terminal of the method for managing and operating and auditing system user operation permissions in this embodiment. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 and a memory 104 for storing data. Among them, the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than those shown in Figure 1 the figure, or have a different configuration from that shown in Figure 1 the figure.

[0046] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for managing operation and maintenance audit system user operation permissions in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories can be connected to the terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations.

[0047] The transmission device 106 is used to receive or send data via a network. The above-mentioned network includes the wireless network provided by the communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (abbreviated as RF) module, which is used to communicate with the Internet wirelessly.

[0048] Through research, it is found that the current form of access control is usually to match in the rule library of the operation and maintenance audit system after detecting the command input by the client and pressing the carriage return character. If the match is successful, the execution of the command is restricted. However, this method has the risk of being bypassed. The operation and maintenance personnel can execute various operation instructions by manually inputting or uploading scripts, etc. And because the script is directly executed on the server, the operation and maintenance audit system cannot effectively detect and block it. To solve the above problems, in this embodiment, a method for managing operation and maintenance audit system user operation permissions is provided. Figure 2 It is the flowchart of the method for managing operation and maintenance audit system user operation permissions in this embodiment, as Figure 2 shown, this process includes the following steps:

[0049] Step S201, obtain the account information of the operation and maintenance audit system user logging in to the target server, the directory information of the target file requested by the operation and maintenance audit system user to access, and obtain the corresponding permission control script and rule configuration file according to the account information and the directory information.

[0050] Among them, the operation and maintenance audit system has been pre-configured with corresponding permission control scripts and rule configuration files. When a user of the operation and maintenance audit system logs in to the target server through the protocol proxy forwarding of the operation and maintenance audit system using the account name test or logs in in other ways and requests to access the / etc / passwd file, the corresponding permission control script access_control.sh and rule configuration file acl_cfg can be obtained in the operation and maintenance system. The rule configuration file acl_cfg defines the corresponding directory / file access rules, such as: prohibiting the user test from accessing the / etc / passwd file.

[0051] Step S202, the operation and maintenance audit system uploads the permission control script and the rule configuration file to the target server and executes the permission control script to start the session monitoring process.

[0052] The operation and maintenance audit system uploads the permission control script access_control.sh and the rule configuration file acl_cfg to the hidden directory / home / test / .access_control under the user test directory on the target server. If this directory has not been created before, it will be created directly. After executing the access_control.sh script, the session monitoring process can be started.

[0053] Step S203, obtain the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process, and instruct the target server to process the access control permissions of the target file according to the session connection status and the rule configuration file.

[0054] In the above steps S201 to S203, by uploading the permission control script and the rule configuration file to the target server and then having the target server manage the user's access permissions by itself, the problems of asset data leakage and loss caused by the operation and maintenance personnel executing various operation instructions by manually inputting or uploading scripts are solved, the security of the server is improved, and the security of the asset data is guaranteed.

[0055] In addition, current access control is usually implemented based on regular expressions for command control. Although this method can effectively match various commands, it is difficult to precisely define the read, write, and execution permissions for a certain directory or file. For example, for just the operation of reading a file, it can be achieved through various instructions such as cat / tac / more / less / head / tail, and even by creating soft links and / or hard links to read the file content to bypass command control. Therefore, it is very difficult to achieve all-round permission control solely relying on regular expressions, with low control granularity and great difficulty in achieving precise control. In the above steps S201 to S203, when the target server processes the access control permissions of the target file based on the rule configuration file for a certain account to access a certain target file, it realizes the permission control for a single user to access a single file or directory, improving the accuracy of permission control.

[0056] In some of these embodiments, executing the permission control script to start the session monitoring process includes:

[0057] Executing the permission control script according to the administrator's permissions;

[0058] When the session monitoring process has been started, generating a session monitoring subprocess, where the session monitoring subprocess is used to monitor the session connection status between the current operation and maintenance auditing system and the target server;

[0059] And when the session monitoring process has not been started, starting the session monitoring process and generating a session monitoring subprocess.

[0060] Among them, before executing the permission control script according to the administrator's permissions, the administrator's password has been entrusted to the bastion host. The operation and maintenance auditing system has also uploaded the permission control script access_control.sh and the rule configuration file acl_cfg to the hidden directory / home / test / .access_control under the user test directory of the target server. After executing the command line su -c "sh access_control.sh" and filling in the administrator password entrusted to the bastion host in advance, the permission control script access_control.sh can be executed with the administrator's permissions. After this script is executed, it will detect whether the session monitoring process session_monitor exists. If it exists, a session monitoring subprocess chil_monitor_x will be generated to monitor the current session connection status. If it does not exist, the session monitoring process session_monitor will be started first, and then the first session monitoring subprocess chil_monitor_1 will be generated to monitor the current session connection status.

[0061] In some of these embodiments, obtaining the session connection status between the operation and maintenance auditing system and the target server according to the session monitoring process includes:

[0062] Periodically detect whether the process ID file of the session monitoring process exists;

[0063] When it is detected that the process ID file of the session monitoring process exists, determine that the session connection status is the first state;

[0064] And when it is detected that the process ID file of the session monitoring process does not exist, determine that the session connection status is the second state.

[0065] Among them, the session monitoring subprocess will periodically detect whether the process ID file of the monitored session exists. The process ID file is a pid file under the / proc / directory. When the pid file exists, it represents that the session connection status is the first state, and the session monitoring subprocess calls the program acl_control(), passing the parameter as true; when the pid file does not exist, it represents that the session connection status is the second state, and the session monitoring subprocess calls the program acl_control(), passing the parameter as false.

[0066] In some of these embodiments, instructing the target server to process the access control permission of the target file according to the session connection status and the rule configuration file includes:

[0067] When the session connection status is the first state, instruct the target server to modify the access control permission of the target file;

[0068] And when the session connection status is the second state, instruct the target server to restore the access control permission of the target file.

[0069] Among them, when the session monitoring subprocess is created, the session connection status is defaulted to the first state, and the program acl_control() is directly called, passing the parameter as true, indicating to execute modifying the access control permission of the target file. Until the session connection is in the second state, execute modifying the access control permission of the target file.

[0070] In some of these embodiments, when the session connection status is the first state, instructing the target server to modify the access control permission of the target file includes:

[0071] When the session connection status is the first state, determine whether the access control permission form of the target file has been created;

[0072] When it is determined that the access control permission form of the target file has not been created yet, create the access control permission form, and write the access control permission record of the initial access control permission into the access control permission form;

[0073] Add access control permission records in the access control permission form according to the rule configuration file;

[0074] Set the access control permission of the target file according to the newly added access control permission records.

[0075] When the program acl_control() is called and the passed parameter is true, it means that the session connection status is the first status and permission settings need to be made for the target file. acl_control will create and maintain an access control permission form acl_record to record the changes in the access control permissions of the target file. This form will record the situation from the initial state of the target file to the most recent update. For example, if three users user1, user2, and user3 access the target file / etc / passwd, then acl_record will generate a total of four access control permission records. The access control permission records record the rule status of the permissions, and the first access control permission record is the initial state. For example, the initial state of the target file / etc / passwd is recorded as status1, the second permission rule status after user1 logs in is recorded as status2, the third permission rule status after user2 logs in is recorded as status3, and the fourth permission rule status after user3 logs in is recorded as status4.

[0076] An example of the record information in the initial state status1 is as follows:

[0077] #file:etc / passwd

[0078] #owner:root

[0079] #group:root

[0080] user::rw-

[0081] group::r--

[0082] other::r—

[0083] After the user test logs in to the target server, an example of the record information in the second permission rule status status2 is as follows:

[0084] status:2login:operator account:test

[0085] #file:etc / passwd

[0086] #owner:root

[0087] #group:root

[0088] user::rw-

[0089] user:test:---

[0090] group::r--

[0091] other::r—

[0092] It can be seen that compared with status1, status2 only adds one item "user:test:---", indicating that user test is prohibited from accessing the file / etc / passwd.

[0093] In some of these embodiments, when the session connection state is the second state, indicating that the target server restores the access control permission of the target file includes:

[0094] In the case where the session connection state is the second state, delete the newly added access control permission record when the session connection state is the first state;

[0095] Obtain the account information according to the session connection state, and determine whether there is an access control permission record for the account information in the current access control permission form;

[0096] In the case where it is determined that there is an access control permission record for the account information in the access control permission form, set the access control permission of the target file according to the latest access control permission record of the account information;

[0097] And, in the case where it is determined that there is no access control permission record for the account information in the access control permission form, set the access control permission of the target file according to the access control permission record of the initial access control permission.

[0098] When the program acl_control() is called by chil_monitor_x and the parameter passed is false, it means that the session connection state is in the second state, and the permission settings for the target file need to be deleted, that is, the permission rules added when the session connection state is in the first state need to be deleted. If there are multiple permission rule states in the current / etc / passwd, when the account test exits the system, if other permission rule states have not configured permissions for test, you only need to revoke the permissions added by the permission rule state. You can use the shell command "setfacl-x u:test / etc / passwd" to directly cancel the original permission settings, and then move the subsequent permission rule states forward one position in turn to update the order of the permission rule states; if there is a permission rule state that has set permissions for test and is located after the permission rule state, there is no need to perform additional permission settings, and the subsequent permission rule states are directly moved forward one position in turn to update the order of the permission rule states; if there is a permission rule state that has set permissions for test and is located before the permission rule state, re-set permissions according to the last permission rule state that has set permissions for test.

[0099] In some embodiments, when the session connection state is the second state, after instructing the target server to restore the access control authority of the target file, the method further includes:

[0100] Determine whether the operation and maintenance audit system user who uses the account information has logged out of the target server;

[0101] When it is determined that the operation and maintenance audit system user who uses the account information has logged out of the target server, the relevant data of the session monitoring process is deleted.

[0102] The session monitoring process session_monitor will detect the session connection status of all child processes chil_monitor_x. The session connection status can be determined by periodically checking whether the pid file of the child process exists in the / proc / directory. When it is determined that a child process has exited the program, that is, the session is disconnected, session_monitor will call the data_clean program to clean up the data related to the session.

[0103] In some of these embodiments, the session monitoring process session_monitor, as a global session status monitoring process, needs to be set to start automatically when the system boots up to avoid situations where the session connection has been interrupted due to special circumstances such as power outages, but the permission settings have not been restored. In such a special situation, if the session_monitor program that starts automatically when the system boots up detects that all sessions have been interrupted, it will still continue to execute acl_control() to restore permissions and data_clean() to clean up data.

[0104] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0105] In one embodiment, a system for managing and operating the audit system user operation permissions is also provided, including: an operation and maintenance audit system and a target server. Among them, the operation and maintenance audit system is used to obtain the account information of the operation and maintenance audit system user who logs in to the target server, the directory information of the target file that the operation and maintenance audit system user requests to access, and obtain the corresponding permission control script and rule configuration file according to the account information and the directory information; upload the permission control script and the rule configuration file to the target server, execute the permission control script to start the session monitoring process; obtain the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process, and instruct the target server to process the access control permission of the target file according to the session connection status and the rule configuration file.

[0106] In some of these embodiments, the system for managing and operating the audit system user operation permissions further includes: a client, a session monitoring module, a permission control module, and a data cleaning module, as Figure 3 shown in the architecture diagram of the system for managing and operating the audit system user operation permissions of this embodiment.

[0107] The operation and maintenance personnel can log in to the operation and maintenance audit system through the client SSH, SFTP or RDP tool, and then forward the login to the asset server through the protocol proxy of the operation and maintenance audit system.

[0108] The session monitoring module is used to globally monitor the operation and maintenance audit system and the target server (that is Figure 3The session connection status between the asset server shown will be resident in the target server after startup. Whenever a new session connection is generated, the session monitoring module will generate a corresponding subprocess child_monitor to monitor the status of this session. The session monitoring module periodically detects the status of all child_monitors. When it is found that a certain child_monitor exits (indicating that the corresponding session connection is interrupted), session_monitor will call the data cleaning module to clean up the residual data generated by this connection. The child_monitor subprocess only focuses on the status of a single session. When a single session is generated, it calls the permission control module to record and update the system permissions, and then periodically detects the status of the corresponding session. When it determines that the monitored session ends, it calls the permission control module again to restore the file permissions and automatically exits the program.

[0109] The permission control module realizes the recording, modification, and restoration of the access control permissions for the specified directories / files on the target server by maintaining the access control permission form acl_record. This module only accepts calls from the session monitoring module and there are two call situations:

[0110] 1) Permission setting: Obtain the current access control permissions of the specified directory / file, record this permission as a permission rule status in the acl_record form, and then set the access control permissions of the specified directory / file through the rule configuration file acl_cfg issued by the operation and maintenance audit system, and record the set permissions as a permission rule status in the acl_record form;

[0111] 2) Permission restoration: When a certain session ends (the session connection status is the second state), restore the access control permissions of the specified directory / file according to the acl_record form, that is, revoke the permission status generated when a certain session successfully establishes a connection (the session connection status is the first state).

[0112] The data cleaning module is used to clean up the residual processes and file data. When the subprocess child_monitor exits, the session_monitor parent process calls this module to clean up the data related to the subprocess.

[0113] In one embodiment, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is set to run the computer program to execute the method for managing the operation and maintenance audit system user operation permissions in the above embodiment.

[0114] In one embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for managing and operating an audit system user operation permission in the above embodiment are implemented.

[0115] It should be understood that the specific embodiments described herein are only used to explain this application, rather than to limit it. According to the embodiments provided in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present application.

[0116] Obviously, the drawings are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it can be understood that although the work done during the development process may be complex and time-consuming, for those of ordinary skill in the art, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be regarded as insufficient disclosure of the present application.

[0117] The term "embodiment" in the present application means that the specific features, structures or characteristics described in connection with the embodiment may be included in at least one embodiment of the present application. The phrase appears in various positions in the specification and does not necessarily mean the same embodiment, nor does it mean independence or alternative to other embodiments. Those of ordinary skill in the art can clearly or implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.

[0118] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of patent protection. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A method for managing and operating an audit system for user operation permissions, characterized in that, Including: Obtain the account information of the user of the operation and maintenance audit system who logs in to the target server, the directory information of the target file requested by the user of the operation and maintenance audit system, and obtain the corresponding permission control script and rule configuration file according to the account information and the directory information; Upload the permission control script and rule configuration file to the target server via the operation and maintenance audit system, and execute the permission control script to start the session monitoring process; Obtain the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process; When the session connection status is the first state, determine whether the access control permission form of the target file has been created; In the case where it is determined that the access control permission form of the target file has not been created yet, create the access control permission form, and write the access control permission record of the initial access control permission into the access control permission form; Add access control permission records in the access control permission form according to the rule configuration file; Set the access control permission of the target file according to the newly added access control permission record, where the first state is used to represent the session continuous state between the operation and maintenance audit system and the target server, and the access control permission form is used to represent the change situation of the access control permission of the target file; When the session connection status is the second state, delete the newly added access control permission record when the session connection status is the first state; obtain the account information according to the session connection status, and determine whether there is an access control permission record about the account information in the current access control permission form; in the case where it is determined that there is an access control permission record about the account information in the access control permission form, set the access control permission of the target file according to the latest access control permission record of the account information; and, in the case where it is determined that there is no access control permission record about the account information in the access control permission form, set the access control permission of the target file according to the access control permission record of the initial access control permission, where the second state is used to represent the session end state between the operation and maintenance audit system and the target server, and the process of deleting the newly added access control permission record when the session connection status is the first state is completed through shell commands.

2. The method for managing and operating an audit system for user operation permissions according to claim 1, characterized in that Executing the permission control script to start the session monitoring process includes: Execute the permission control script according to the administrator permission; Generate a session monitoring subprocess in the case where the session monitoring process has been started, where the session monitoring subprocess is used to monitor the session connection status of the current operation and maintenance audit system and the target server; And, in the case where the session monitoring process has not been started, start the session monitoring process and generate a session monitoring subprocess.

3. The method for managing and operating an audit system for user operation permissions according to claim 1, characterized in that, Obtaining the session connection status between the operation and maintenance audit system and the target server according to the session monitoring process includes: Periodically detect whether the process ID file of the session monitoring process exists; In the case where the process ID file of the session monitoring process is detected to exist, determine that the session connection status is the first state; And, in the case where the process ID file of the session monitoring process is detected to not exist, determine that the session connection status is the second state.

4. The method for managing and operating the audit system for user operation permissions according to claim 1, wherein When the session connection status is the second state, after instructing the target server to restore the access control right of the target file, the method further includes: Determine whether the operation and maintenance audit system user using the account information has exited the target server; In the case where it is determined that the operation and maintenance audit system user using the account information has exited the target server, delete the relevant data of the session monitoring process.

5. A system for managing and operating an audit system for user operation permissions, characterized in that, Including: An operation and maintenance audit system and a target server, wherein the operation and maintenance audit system is used to execute the method for managing the operation permission of the operation and maintenance audit system user according to any one of claims 1 to 4.

6. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for managing the operation permission of the operation and maintenance audit system user according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method for managing the operation permission of the operation and maintenance audit system user according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • File access method, control node, client and electronic equipment

    CN110602026A

  • Operation and maintenance access method and system of operation and maintenance auditing system

    CN113114643A

  • A server access control system by periodic authentification of the smart card

    KR101545897B1