Commit Graph

64 Commits

Author SHA1 Message Date
Chris McCarthy
81bcf99855 #2646 - Added a custom pre-commit hook that ensure the copyright clause is added to .py and .rst files. 2024-06-05 09:11:37 +01:00
Charlie Crane
5ee23dcb17 Merged PR 348: #2462 - Refactor of DatabaseClient and DatabaseServer
## Summary
Refactor of `DatabaseClient` and `DatabaseService` to update how connection IDs are generated. These are now provided by DatabaseService when establishing a connection.
Creation of `DatabaseClientConnection` class. This is used by `DatabaseClient` to hold a dictionary of active db connections.

## Test process
Tests have been updated to reflect the changes and all pass

## Checklist
- [X] PR is linked to a **work item**
- [X] **acceptance criteria** of linked ticket are met
- [X] performed **self-review** of the code
- [X] written **tests** for any new functionality added with this PR
- [X] updated the **documentation** if this PR changes or adds functionality
- [ ] written/updated **design docs** if this PR implements new functionality
- [X] updated the **change log**
- [X] ran **pre-commit** checks for code style
- [X] attended to any **TO-DOs** left in the code

Related work items: #2462
2024-04-26 14:52:21 +00:00
Marek Wolan
62ebca8c08 #2417 Remove references to old obs names and add link obs 2024-03-31 21:39:24 +01:00
Marek Wolan
d1480e4477 Apply suggestions from PR review. 2024-03-04 09:58:57 +00:00
Marek Wolan
070655cfce Update data manipulation bot documentation 2024-03-03 11:47:50 +00:00
Czar Echavez
49a4e1fb56 #2257: added common node attributes page + ability to set node operating state via config + tests 2024-02-29 15:20:54 +00:00
Czar Echavez
9a4587155b #2257: specifically stating that enpoint refs are node hostnames + remove TODO 2024-02-29 11:07:21 +00:00
Czar Echavez
13db07dc11 Merge remote-tracking branch 'origin/dev' into feature/2257-router-routes-cannot-be-represented-in-config-file 2024-02-28 15:09:23 +00:00
Czar Echavez
6d43c61058 #2257: apply PR suggestions 2024-02-28 15:08:00 +00:00
Czar Echavez
d738a23709 #2257: list of db payloads 2024-02-26 11:35:17 +00:00
Czar Echavez
fb148dc4fb #2257: applications and services docs 2024-02-23 16:49:01 +00:00
Chris McCarthy
52677538a8 #2238 - Tidied up code, added more docstrings, and implemented suggestions from PR. 2024-02-23 15:12:46 +00:00
Czar Echavez
5836ea68e3 #2257: rearrange software pages + creating a list of applications and services which is hopefully a single point that should be referred to 2024-02-23 08:55:32 +00:00
Chris McCarthy
771a68dccb #2238 - Implement NMNE detection and logging in NetworkInterface.
- Enhance NicObservation for detailed NMNE event monitoring.
- Add nmne_config options to simulation settings for customizable NMNE capturing.
- Update documentation and tests for new NMNE features and simulation config.
2024-02-22 22:43:14 +00:00
Czar Echavez
2e2d83c3e9 #2257: update sphinx version + cleaning up some errors + splitting configuration page into multiple pages 2024-02-16 16:14:36 +00:00
Nick Todd
8520f22e22 2306: Updated documentation 2024-02-14 13:35:08 +00:00
Christopher McCarthy
9835b31dc5 Merged PR 272: #2205 - Firewall Node
## Description:

This pull request introduces the Firewall class and extends the ACLRule functionality within PrimAITE to provide comprehensive network traffic management and security capabilities. These enhancements enable detailed control over data flow through network simulations, mimicking real-world firewall operations and ACL configurations. The updates focus on the addition of a Firewall node that extends the Router class functionalities and the enhancement of ACLRule to support IP ranges through wildcard masking, thus offering granular traffic filtering based on IP addresses, protocols, ports, and more.

## Key Features:

**Firewall Class:** A new class that extends the Router class, incorporating firewall-specific logic for inspecting, directing, and filtering traffic between the internal, external, and DMZ (De-Militarized Zone) network interfaces. The Firewall class supports configuring network interfaces and applying Access Control Lists (ACLs) for inbound and outbound traffic control.

**Enhanced ACLRule:** The ACLRule class has been updated to support IP ranges using wildcard masking. This allows for more flexible rule definitions, enabling users to specify broad network ranges or individual IP addresses in ACL rules.

**Comprehensive ACL Configuration:** Six distinct ACLs (internal inbound, internal outbound, DMZ inbound, DMZ outbound, external inbound, and external outbound) provide meticulous control over traffic flow, ensuring robust network security. Examples included in the documentation illustrate how to configure ACLs for common scenarios, such as blocking external threats, permitting specific services, and restricting access to sensitive internal resources.

**Intuitive Interface and ACL Management:** Simplified methods for configuring firewall interfaces and ACL rules enhance usability. The Firewall class offers intuitive functions for rule management, including adding, removing, and listing ACL rules.

**Detailed Documentation and Examples:** Accompanying the code updates, comprehensive documentation and example configurations are provided, detailing the use and configuration of the Firewall node and ACL rules within PrimAITE simulations.

## Impact:

The introduction of the Firewall class and the enhancement of ACLRule significantly broaden PrimAITE's capabilities for simulating realistic network security scenarios. Users can now accurately model the behavior of firewalls in their network simulations, applying complex ACLs to control traffic flow and enforce security policies. This update enables more detailed network security analyses, teaching, and experimentation within the PrimAITE environment.

## Test process
Extensive unit tests have been added to cover the new functionality, ensuring reliability and correctness. Tests include scenarios for firewall configuration, ACL rule application, traffic filtering based on various criteria, and interaction between different network zones.

## Checklist
- [X] PR is linked to ...
2024-02-13 13:56:56 +00:00
Nick Todd
4c66d2b252 2297: Change missed reference TCP to UDP. 2024-02-12 17:24:28 +00:00
Nick Todd
697e53def8 2297: Doc update. 2024-02-12 17:12:59 +00:00
Chris McCarthy
cfd64333e2 #2205 - Added wireless router tests and documentation. Refactored some code based on PR suggestions. 2024-02-12 12:31:08 +00:00
Chris McCarthy
a8c1e2b9d9 #2205 - Fixed ACLRule.is_permitted function by returning a bool that indicates whether the rule was matched or not to allow the AccessControlList to know whether to pay attention to the rule or not when it's iterating over them. 2024-02-10 21:32:13 +00:00
Chris McCarthy
58af58810d #2205 - Introduced a Firewall class for enhanced network security and control, extending Router functionalities. Updated ACLRule to support IP ranges via wildcard masking for refined traffic filtering. Includes documentation updates. 2024-02-09 23:29:06 +00:00
Chris McCarthy
0acd9a2938 #2248 - Removed redundant code and added more documentation from PR suggestions 2024-02-09 10:27:22 +00:00
Chris McCarthy
a036160515 #2248 - Enhances the PrimAITE documentation, covering the Node, network interfaces, Session Manager, Software Manager, PCAP service, SysLog functionality, and network devices like Routers, Switches, Computers, and Switch Nodes. It details their roles, workflows, and integration within the simulation, focusing on frame processing, software management, and logging. The documentation also clarifies the frame reception process, including port checks and application-level dispatching, ensuring a thorough understanding of network operations within the simulation 2024-02-08 22:37:21 +00:00
Chris McCarthy
7bbfd564fb #2248 - Big refactor of base with all Network Interface subclasses created to allow for proper management of ports on devices as it was starting to get messy with the Router. Some routing tests still need fixing as ARP doesn't seem to be working properly 2024-02-05 08:44:10 +00:00
Nick Todd
39694fcec2 Merge branch 'dev' into feature/2041_2042-Add-NTP-Services 2023-12-04 11:23:35 +00:00
Czar Echavez
3cf21e4015 #2084: change all instances of retrieving software from software['software_name'] to software.get() + adding some tests for describe state 2023-11-30 13:49:37 +00:00
Czar Echavez
7c1ffb5ba1 #2084: change all instances of retrieving software from software['software_name'] to software.get() + adding some tests for describe state 2023-11-30 13:48:57 +00:00
Marek Wolan
21b865d8a8 Merge origin/dev into feature/1859 2023-11-27 22:13:42 +00:00
Nick Todd
95f6cf6691 Merged PR 221: Version 3 beta 2 doc changes
## Summary
*Replace this text with an explanation of what the changes are and how you implemented them. Can this impact any other parts of the codebase that we should keep in mind?*

## Test process
*How have you tested this (if applicable)?*

## Checklist
- [Y] PR is linked to a **work item**
- [Y] **acceptance criteria** of linked ticket are met
- [Y ] performed **self-review** of the code
- [N] written **tests** for any new functionality added with this PR
- [Y] updated the **documentation** if this PR changes or adds functionality
- [N] written/updated **design docs** if this PR implements new functionality
- [N] updated the **change log**
- [Y] ran **pre-commit** checks for code style
- [N] attended to any **TO-DOs** left in the code

Related work items: #2068
2023-11-27 21:35:37 +00:00
Nick Todd
40d596c373 Merge branch 'dev' into feature/2041_2042-Add-NTP-Services 2023-11-27 15:07:06 +00:00
Czar Echavez
299729d5b4 #2064: documentation EVERYWHERE 2023-11-27 11:38:03 +00:00
Nick Todd
a2a27697a3 Merge branch 'dev' into feature/2068-Validate_documentation 2023-11-24 15:27:33 +00:00
Nick Todd
355cbedbae #2068: Further typo and formatting changes. 2023-11-24 15:17:08 +00:00
Jake Walker
e6f75f8b32 Improve data manipulation bot documentation 2023-11-24 15:15:24 +00:00
Jake Walker
4e104a4d99 Update data manipulation bot 2023-11-24 10:33:19 +00:00
Jake Walker
178d911be0 Update data manipulation bot 2023-11-24 10:05:36 +00:00
Nick Todd
dd7c2b05f8 #2041: Add RST doc 2023-11-22 08:54:39 +00:00
Marek Wolan
fdb48c0ded Update docs for Database 2023-11-18 03:46:24 +00:00
Marek Wolan
77f3806ba7 Remove real database in favour of simulated 2023-11-18 03:40:08 +00:00
Marek Wolan
1ec1b319e5 Fix formatting in docs 2023-10-27 12:24:22 +01:00
Czar.Echavez
ac23633d82 #1947: Added documentation on how the node initialisation works 2023-10-24 15:41:39 +01:00
Czar.Echavez
853bb9eecc #1943: unit tests + refactoring HTTP -> Http 2023-10-06 12:10:57 +01:00
Czar.Echavez
4699e87ea8 Merge branch 'dev' into feature/1943-service-web-server 2023-10-04 16:35:23 +01:00
Czar.Echavez
97f0267539 #1796: apply PR suggestions + fix tests 2023-10-04 11:33:18 +01:00
Czar.Echavez
82da21b073 \#1943:
- changelog added
- added documentation + example of using web server + web browser
- extended web server so that it also accepts ip addresses
- web server can differentiate between a normal page request and one that propagates into a DB request
- rename WebServerService -> WebServer
2023-10-03 16:56:35 +01:00
Czar.Echavez
bca3e6344e #1796: documentation 2023-09-28 14:09:32 +01:00
Czar.Echavez
c096d06bcd #1796: pre installing system software 2023-09-26 15:14:24 +01:00
Czar.Echavez
79615243e4 #1916: Added example usage for FTP 2023-09-26 12:09:41 +01:00
Czar.Echavez
2520b67889 #1916:
- Added FTP to changelog
- Added FTP to documentation
- Added documentation in code
- Clean up of methods - prevent repeats of the same code
2023-09-25 14:31:57 +01:00