Web-based application program access control test method and system
Through the web-based application access control testing method, the problem of low efficiency of traditional command line operations is solved, visual policy configuration and verification is realized, testing efficiency and quality is improved, and it is suitable for primary testers.
Patent Information
- Application Number
- CN202410930451.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-05
Smart Images

Figure CN118897797A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of industrial control software testing, and relates to a Web-based application program access control testing method and system. Background Art
[0002] The application trusted verification function in the trusted computing module can set a mandatory access policy based on the subject and the object, limiting the specified object files to be read, written, and executed only by the set subject program. Other process files cannot read, write, execute, delete, or rename the object files. This function can effectively protect the integrity of the file system and the credibility of the data source.
[0003] Files on operating systems with integrated trusted computing functions need to be tested after configuring application access control policies. There are thousands of directories and files on the operating system. Since the subject and object of application access control are many-to-many, the traditional command line operation is to enter commands to configure application access control policies for applications and object files in each directory, and then enter commands to verify whether the application trusted verification function is normal. This is slow and prone to omissions and errors. The command line has high technical requirements, which is not conducive to junior testers to be familiar with functions and conduct tests. If comprehensive verification is to be performed, repetitive operations will take a lot of time and affect the progress and quality of the test. Summary of the invention
[0004] In order to solve the above problems, save manpower and improve testing efficiency, the present invention proposes a Web-based application access control testing method and system.
[0005] To achieve the above purpose, the present invention adopts the following technical means:
[0006] The first aspect of the present invention is to provide a Web-based application access control testing method, comprising:
[0007] Get all directories and files on the operating system, and display the file directory, file name and file type in each directory in the Web environment;
[0008] Select a directory or file to specify the object file and subject file to configure the application access control policy and configuration permissions. The object file is a common file or directory, and the subject file is a binary executable command file.
[0009] After the configuration is completed, the application access control policy is executed on the object file and the subject file;
[0010] Verify that configuration policies, deletion policies, and application access control trusted business functions are normal.
[0011] As a further improvement of the present invention, the Web environment is pre-deployed on the operating system.
[0012] As a further improvement of the present invention, the displaying of the file directory, the file name and the file type under each directory in the Web environment includes:
[0013] Use the browser to enter the IP address and port to access the Web environment. All file directories, file names under the directories, file types, and the correspondence between the subject and object policies of the files in the system are displayed visually in a table. The file types include ordinary files and executable files. Directories and files are displayed in different colors.
[0014] As a further improvement of the present invention, selecting a directory or a file to respectively specify an object file and a subject file to configure an application access control policy and configure permissions, wherein configuring the application access control policy includes:
[0015] Read, write, execute, delete, rename, and upload files.
[0016] As a further improvement of the present invention, the rules for configuring the application access control policy are the following combinations:
[0017] a) Take the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy;
[0018] b) Take the subdirectory of the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy;
[0019] c) Take any common file in the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy;
[0020] d) Take any executable file in the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy.
[0021] As a further improvement of the present invention, the configuration permissions include:
[0022] The subject can perform read, write, and execute permission operations on the object. It is a single permission or any combination of three permissions. It supports multiple configurations, and the most recently configured subject's policy permissions on the object shall prevail.
[0023] As a further improvement of the present invention, an application access control policy is executed on the object file and the subject file, including:
[0024] Select the object file and use the Read, Write, Execute, Delete, and Rename buttons to simulate the non-subject file to perform read, write, execute, delete, and rename operations on the object file;
[0025] Select the subject file, then select a corresponding object file, and use the Read, Write, Execute, Delete, and Rename buttons to perform read, write, execute, delete, and rename operations;
[0026] Select the object file and click the Delete Policy button to delete the application access control policies of all subjects corresponding to the specified object;
[0027] Select the subject file and click the Delete Policy button to delete the application access control policies of all subjects corresponding to the specified object.
[0028] As a further improvement of the present invention, executing the application access control policy on the object file and the subject file further includes: uploading the file;
[0029] In addition to the files already on the system, users can upload files to configure application access control policies. Uploading of single files, multiple files, and folders is supported.
[0030] As a further improvement of the present invention, after the receiving terminal processes the operation request result of the trusted function, the method further includes:
[0031] The trusted function log file records the audit log of all dynamic operation processes, including the operator, operation time, operation file, execution action, and verification result.
[0032] A second aspect of the present invention is to provide a Web-based application access control testing system, comprising:
[0033] The acquisition module is used to obtain all directories and files on the operating system, and display the file directory, the file name and file type under each directory in the Web environment;
[0034] A configuration module is used to select a directory or file to specify an object file and a subject file to configure application access control policies and configuration permissions, wherein the object file is a common file or directory, and the subject file is a binary executable command file;
[0035] An execution module is used to execute the application access control policy on the object file and the subject file after the configuration is completed;
[0036] The verification module is used to verify whether the configuration policy, deletion policy, and application access control trusted business functions are normal.
[0037] A third aspect of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the Web-based application access control testing method when executing the computer program.
[0038] A fourth aspect of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Web-based application access control testing method is implemented.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] Through the visual graphical interface, users can select controlled objects and applications to mark application access control policies according to actual test needs, and mark the subject file's operating permissions on the object file. After the policy configuration is completed, you can select the object file or object files to perform read, write, execute, delete, and rename operations to verify whether the trusted function is normal. After the verification is completed, the system displays the operation results (such as whether the rename is successful) in a pop-up window, and the user can choose to specify the subject or object file deletion policy. This method helps testers to intuitively see the files and directories under the operating system, reducing a large number of operations on file configuration policies and verification policies. It is more convenient to operate, easier to understand and familiar with trusted functions, and helps testers get started quickly and improve test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flow chart of a Web-based application access control testing method provided by the present invention;
[0042] Figure 2 It is a flow chart of a Web-based application access control test provided by an embodiment of the present invention;
[0043] Figure 3 A Web-based application access control test system provided by the present invention;
[0044] Figure 4 A schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0047] In addition, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.
[0048] Terminology Note:
[0049] JavaWeb is the sum of technologies that use Java technology to solve related web Internet fields. The Web consists of two parts: the Web server and the Web client. Java is rarely used on the client side, but is widely used on the server side, such as Servlet, JSP, and third-party frameworks. These technologies have injected strong impetus into the development of the Web field.
[0050] like Figure 1 As shown, the first object of the present invention is to provide a Web-based application access control testing method, comprising the following steps:
[0051] S1, obtain all directories and files on the operating system, and display the file directory, the file name and file type under each directory in the Web environment;
[0052] S2, selecting a directory or file to specify an object file and a subject file to configure application access control policy and configuration permissions, wherein the object file is a common file or directory, and the subject file is a binary executable command file;
[0053] S3, after configuration is completed, the application access control policy is executed on the object file and the subject file;
[0054] S4, verify whether the configuration policy, deletion policy, and application access control trusted business functions are normal.
[0055] The present invention is a process of managing, configuring and deleting application access control policies on a trusted computing module system, and involves the display of a Web environment and the verification of application access control policy functions. The process enhances the transparency and manageability of the trusted computing module by providing detailed policy management functions.
[0056] The principle of the present invention is as follows:
[0057] Get and display system directories and files; the system first scans all files on the system and collects relevant information. This information is then transmitted to the Web environment and displayed to the user in some form (such as a table or list).
[0058] Displays complete directory file information; file directory, file name and file type under each directory, where file types include common files and binary executable files, and directories and files are displayed in different colors.
[0059] Specify the subject and object file marking application access control policy; users can select the controlled object and application marking policy according to actual test requirements, and mark the subject file's operation permissions on the object file.
[0060] After the configuration policy is completed, verify the trusted function; select the object file or object file to perform read, write, execute, delete, and rename operations. After the verification is completed, the system displays the operation results (such as whether the rename is successful) in a pop-up window
[0061] Deletion policy: Users can choose to specify the subject or object file deletion policy.
[0062] like Figure 2 As shown, the present invention proposes a Web-based application access control testing method, comprising the following steps:
[0063] Deploy and start the JavaWeb environment on the operating system and obtain all directories and files on the system;
[0064] Use a browser to access the Java Web environment, and intuitively display the system's file directory, the file name and file type in each directory in a table format. The file types include common files and executable files, and the directories and files are displayed in different colors.
[0065] Operation buttons include configuring policies, deleting policies, reading, writing, executing, deleting, renaming, and uploading files;
[0066] Select Directory or File to specify the object file and subject file respectively to configure the application access control policy. The object file can be a common file or directory, and the subject file can only be a binary executable command file.
[0067] The configuration strategy can be the following combinations:
[0068] 1) Take the current directory as the controlled object, and select any executable file in the current directory as the main program to mark the application access control policy;
[0069] 2) Taking the subdirectory of the current directory as the controlled object, any executable file in the current directory can be selected as the main program to mark the application access control policy;
[0070] 3) Take any common file in the current directory as the controlled object, and any executable file in the current directory can be selected as the main program to mark the application access control policy;
[0071] 4) Any executable file in the current directory can be selected as the controlled object to mark the application access control policy;
[0072] When configuring policies, you can choose to configure permissions, that is, which permissions the subject can read, write, and execute on the object. It can be a single permission or any combination of the three permissions. Multiple configurations are supported, and the most recently configured policy permissions of the subject on the object will prevail.
[0073] After the configuration is completed, select the object file, and you can use the Read, Write, Execute, Delete, and Rename buttons to simulate the non-subject file to read, write, execute, delete, and rename the object file;
[0074] After the configuration is completed, select the subject file, then select a corresponding object file, and use the Read, Write, Execute, Delete, and Rename buttons to perform read, write, execute, delete, and rename operations;
[0075] After the configuration is complete, check the object file and click the Delete Policy button to delete the application access control policies of all subjects corresponding to the specified object;
[0076] After the configuration is complete, check the subject file and click the Delete Policy button to delete the application access control policy for all objects corresponding to the specified subject.
[0077] Upload files: In addition to the existing files on the system, users can upload files to configure application access control policies. It supports uploading single files, multiple files, and folders.
[0078] The above operations all give the operation results in the form of pop-up windows to verify whether the configuration policy, deletion of application access control policy and actual trusted business functions are normal.
[0079] Among them, Figure 2 As shown, the steps in the terminal include:
[0080] Run the test program;
[0081] Receiving an operation request of a trusted function;
[0082] Processing operation requests of trusted functions;
[0083] Record operation audit logs.
[0084] The operations in the browser web terminal include:
[0085] The browser page opens;
[0086] Upload files;
[0087] Select the subject file and object file to mark the application access control policy;
[0088] Read, write, execute, delete, and rename object files;
[0089] Select the subject file and object file to delete the corresponding application access control policy
[0090] Pop-up window displays operation results and error prompts;
[0091] Obtain trusted functional verification conclusions.
[0092] Among them, the application access control policy is executed and sent to the terminal; the terminal receives the operation request of the trusted function, processes the operation request result of the trusted function, and then sends the execution result to the Web environment.
[0093] Through this method, a visual graphical interface helps testers to intuitively see the files and directories under the operating system, reducing a large number of operations on file configuration policies and verification of whether the policies are effective. It is more convenient to operate, easier to understand and familiar with trusted functions, and helps testers to quickly get started and improve test efficiency.
[0094] A specific embodiment is given below as a detailed description of the method of the present invention:
[0095] Steps of the whole method Figure 2 As shown:
[0096] Deploy a JavaWeb environment based on Springboot+SpringMVC on the DCS system, customize an unused port on the system, run the JavaWeb service program in any directory, enter the IP address and port in the browser to access the JavaWeb environment, and a visual table shows all the running file directories on the system, the file names and file types in each directory, and the subject and object policies corresponding to the files; testers can operate through the page buttons to verify whether the application access control policy is normal:
[0097] Select Directory or File to specify the object file and subject file respectively to configure the application access control policy. The object file can be a common file or directory, and the subject file can only be a binary executable command file.
[0098] The configuration strategy can be the following combinations:
[0099] 1) Take the current directory as the controlled object, and select any executable file in the current directory as the main program to mark the application access control policy;
[0100] 2) Take the subdirectories under the current directory as the controlled object, and select any executable file under the current directory as the main program to mark the application access control policy;
[0101] 3) Take any common file in the current directory as the controlled object, and any executable file in the current directory can be selected as the main program to mark the application access control policy;
[0102] 4) Any executable file in the current directory can be selected as the controlled object to mark the application access control policy;
[0103] When configuring policies, you can choose to configure permissions, that is, which permissions the subject can read, write, and execute on the object. It can be a single permission or any combination of the three permissions. Multiple configurations are supported, and the most recently configured policy permissions of the subject on the object will prevail.
[0104] After the configuration is completed, select the object file, and you can use the Read, Write, Execute, Delete, and Rename buttons to simulate the non-subject file to read, write, execute, delete, and rename the object file;
[0105] After the configuration is completed, select the subject file, then select a corresponding object file, and use the Read, Write, Execute, Delete, and Rename buttons to perform read, write, execute, delete, and rename operations;
[0106] After the configuration is complete, check the object file and click the Delete Policy button to delete the application access control policies of all subjects corresponding to the specified object;
[0107] After the configuration is complete, check the subject file and click the Delete Policy button to delete the application access control policy for all objects corresponding to the specified subject.
[0108] The above operations all give the operation results in the form of pop-up windows to verify whether the configuration and deletion of application access control policies and actual trusted business functions are normal.
[0109] The trusted function log file will record the audit log of application access control for all operations. The trusted audit record includes the operator, operation time, operation file, execution action, and verification result.
[0110] like Figure 3 As shown, the present invention also provides a Web-based application access control testing system, comprising:
[0111] The acquisition module is used to obtain all directories and files on the operating system, and display the file directory, the file name and file type under each directory in the Web environment;
[0112] A configuration module is used to select a directory or file to specify an object file and a subject file to configure application access control policies and configuration permissions, wherein the object file is a common file or directory, and the subject file is a binary executable command file;
[0113] An execution module is used to execute the application access control policy on the object file and the subject file after the configuration is completed;
[0114] The verification module is used to verify whether the configuration policy, deletion policy, and application access control trusted business functions are normal.
[0115] like Figure 4 As shown, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the Web-based application access control testing method when executing the computer program.
[0116] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Web-based application program access control testing method is implemented.
[0117] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0118] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0119] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A Web-based application access control testing method, characterized in that: include: Get all directories and files on the operating system, and display the file directory, file name and file type in each directory in the Web environment; Select a directory or file to specify the object file and subject file to configure application access control policies and configure permissions. The object file is a common file or directory, and the subject file is a binary executable command file. After the configuration is complete, the application access control policy is executed on the object file and the subject file; Verify that configuration policies, deletion policies, and application access control trusted business functions are normal.
2. A Web-based application access control testing method according to claim 1, characterized in that: The Web environment is pre-deployed on the operating system.
3. A Web-based application access control testing method according to claim 1, characterized in that: The display of the file directory, the file name and file type in each directory in the Web environment includes: Use the browser to enter the IP address and port to access the Web environment. A table will be used to visually display all the file directories, file names under the directories, file types, and the correspondence between the subject and object policies of the files in the system. The file types include ordinary files and executable files. Directories and files are displayed in different colors.
4. A Web-based application access control testing method according to claim 1, characterized in that: The rules for configuring application access control policies are the following combinations: a) Take the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy; b) Use the subdirectories of the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy; c) Use any common file in the current directory as the controlled object and any executable file in the current directory as the subject program to mark the application access control policy; d) Take any executable file in the current directory as the controlled object and select any executable file in the current directory as the main program to mark the application access control policy.
5. A Web-based application access control testing method according to claim 1, characterized in that: The configuration permissions include: The subject can perform read, write, and execute permission operations on the object. It can be a single permission or any combination of the three permissions. Multiple configurations are supported, and the policy permissions of the subject to the object with the latest configuration shall prevail.
6. A Web-based application access control testing method according to claim 1, characterized in that: Enforce application access control policies on object and subject files, including: Select the object file and use the Read, Write, Execute, Delete, and Rename buttons to simulate the non-subject file to perform read, write, execute, delete, and rename operations on the object file; Select the subject file, then select a corresponding object file, and use the Read, Write, Execute, Delete, and Rename buttons to perform read, write, execute, delete, and rename operations; Select an object file and click the Delete Policy button to delete the application access control policy for all subjects corresponding to the specified object. Select the subject file and click the Delete Policy button to delete the application access control policy for all subjects corresponding to the specified object.
7. A Web-based application access control testing method according to claim 1, characterized in that: Executing application access control policies on object files and subject files also includes: uploading files; In addition to existing files on the system, users can upload files to configure application access control policies. Uploading of single files, multiple files, and folders is supported.
8. A Web-based application access control testing method according to claim 1, characterized in that: After receiving the result of the operation request for processing the trusted function of the terminal, the method further includes: The audit log of all dynamic operation processes is recorded in the log file of the trusted function, including the operator, operation time, operation file, execution action, and verification result.
9. A Web-based application access control testing system, characterized in that: include: The acquisition module is used to obtain all directories and files on the operating system and display the file directory, file name and file type in each directory in the Web environment; The configuration module is used to select directories or files to specify object files and subject files to configure application access control policies and configuration permissions, where object files are ordinary files or directories and subject files are binary executable command files; The execution module is used to execute the application access control policy on the object file and the subject file after the configuration is completed; The verification module is used to verify whether the configuration policy, deletion policy, and application access control trusted business functions are normal.
10. An electronic device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for testing access control of a Web-based application program according to any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the Web-based application access control testing method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
TCG protocol function test method and device, readable storage medium and electronic equipment
CN121565225A
