Skip to content

Commit ce933ce

Browse files
authored
Merge pull request #1899 from CactuseSecurity/develop
merge develop into main v6.0
2 parents 421c632 + 5149957 commit ce933ce

499 files changed

Lines changed: 29935 additions & 5571 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-install.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,27 @@ on:
2121

2222
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2323
jobs:
24-
build:
25-
name: test build on merge
26-
runs-on: ubuntu-latest
24+
# ubuntu18 was unstable at github (2022-07-06 - 2022-07-11)
25+
# test_ubuntu_18:
26+
# name: test build on ubuntu_18
27+
# runs-on: ubuntu-18.04
28+
# steps:
29+
# - uses: actions/checkout@v2
30+
# - name: do test install in case of merged pull request
31+
# run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator && ansible-playbook -e run_on_github=yes --skip-tags test site.yml -K
32+
33+
test_ubuntu_20:
34+
name: test build on ubuntu_20
35+
runs-on: ubuntu-20.04
2736
steps:
2837
- uses: actions/checkout@v2
2938
- name: do test install in case of merged pull request
30-
run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator && ansible-playbook -e 'run_on_github=yes testkeys=yes' --skip-tags test site.yml -K
39+
run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator && ansible-playbook -e run_on_github=yes --skip-tags test site.yml -K
3140

32-
review:
33-
name: Review code
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v2
37-
- name: do test install in case of reviewable PR
38-
run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator && ansible-playbook -e 'run_on_github=yes testkeys=yes' --skip-tags test site.yml -K
41+
# test_ubuntu_22:
42+
# name: test build on ubuntu_22
43+
# runs-on: ubuntu-22.04
44+
# steps:
45+
# - uses: actions/checkout@v2
46+
# - name: do test install in case of merged pull request
47+
# run: cd /home/runner/work/firewall-orchestrator/firewall-orchestrator && ansible-playbook -e run_on_github=yes --skip-tags test site.yml -K

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.vs/
22
.idea/
3+
.test_data/
4+
roles/importer/venv/

.vscode/launch.json

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,18 @@
5050
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
5151
},
5252
"args": [
53-
"-m8",
54-
"-d4",
53+
"-m5",
54+
"-d9",
5555
"-f",
56+
"-s",
57+
//"-xhttp://10.6.5.10:3128",
5658
//"-ihttps://fwodemodata.cactus.de/demo04_cpr8x.json",
57-
//"-c",
59+
//"-ihttps://fwodemodata.cactus.de/demo01_fortiMgrLab.json"
60+
//"-ihttps://fwodemodata.cactus.de/demo05_fortiMgr2.json"
61+
// "-ihttps://fwodemodata.cactus.de/big/fortiMgr_78111944ad43fe045687d8d6dc92256e.json"
62+
//"-c"
5863
// 41 - lab fortimanager
59-
//"-i/tmp/mgm_id_8_config_native.json",
64+
//"-i/home/tim/Downloads/mgm_id_9_config_native.json.anon"
6065
//"-i/home/tim/tmp/configs/mgm_id_56_config_native.json.anon", // all rules, all objs local mgm_id 4
6166
// "-i/home/tim/tmp/configs/mgm_id_56_config_native.json.anon", // 30k rules, local mgm_id 45
6267
//"-i/home/tim/tmp/configs/mgm_id_52_config_native.json.anon", // many gateways, local mgm_id 49
@@ -74,9 +79,33 @@
7479
//"-i/home/tim/tmp/configs/mgm_id_54_config_native.json.anon",
7580
//"-i/home/tim/tmp/configs/mgm_id_56_config_native.json.anon", // local id 55
7681
//"-i/home/tim/tmp/configs/mgm_id_1176_config_native.json.anon_error_in_fprs100-s999-rz99-xxx-PolicyNetwork.anon-with-broken-svc",
77-
"-l250"
82+
//"-l250"
83+
]
84+
},
85+
{
86+
"name": "py-acquire-lock",
87+
"type": "python",
88+
"request": "launch",
89+
"program": "${workspaceFolder}/roles/common/files/acquire_lock.py",
90+
"console": "integratedTerminal",
91+
"env": {
92+
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
93+
},
94+
"args": [
95+
"/var/fworch/lock/FWO.Middleware.Server_log.lock"
7896
]
7997
},
98+
{
99+
"name": "py-generate-tenant-data",
100+
"type": "python",
101+
"request": "launch",
102+
"program": "${workspaceFolder}/roles/test/files/tenant_networks/create_tenant_network_data.py",
103+
"console": "integratedTerminal",
104+
"env": {
105+
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
106+
},
107+
"args": []
108+
},
80109
{
81110
"name": "py-change-comment",
82111
"type": "python",
@@ -148,6 +177,19 @@
148177
"-rFirstLayer shared with inline layer"
149178
]
150179
},
180+
{
181+
"name": "py-cpr8x-api-test-call",
182+
"type": "python",
183+
"request": "launch",
184+
"program": "${workspaceFolder}/roles/importer/files/importer/checkpointR8x/api-test-call.py",
185+
"console": "integratedTerminal",
186+
"env": {
187+
"PYTHONPATH": "${PYTHONPATH}:${workspaceRoot}"
188+
},
189+
"args": [
190+
"--help"
191+
]
192+
},
151193
{
152194
"name": "py-get-config-fm7",
153195
"type": "python",
@@ -261,7 +303,9 @@
261303
"request": "launch",
262304
"preLaunchTask": "build_test",
263305
"program": "/usr/bin/dotnet",
264-
"args": [ "test" ],
306+
"args": [
307+
"test"
308+
],
265309
"cwd": "${workspaceFolder}/roles/test/files/FWO.Test",
266310
"stopAtEntry": true,
267311
"console": "integratedTerminal"

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"python.pythonPath": "/usr/bin/python3"
2+
"editor.formatOnPaste": false,
3+
"editor.formatOnSave": false
34
}

CODING_GUIDELINES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- lists should be used instead of arrays
2323
- only use comment per line (//, #), no block comments
2424
- continue style of existing code in source file
25+
- all recursion needs to be limited (default max. value: 100) to avoid stack overflows
2526

2627
## C# specific
2728
- avoid null references

CONTRIBUTING.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ Please follow our [Code of conduct](code-of-conduct.md) in the context of any co
3131

3232
## 2. Repo overview
3333

34-
[Firewall Orchestrator](https://github.com/CactuseSecurity/firewall-orchestrator) has the following contributing guides:
35-
36-
For all contributions, a CLA (Contributor License Agreement) needs to be signed [here](https://cla-assistant.io/CactuseSecurity/firewall-orchestrator) before (or after) the pull request has been submitted. A bot will prompt contributors to sign the CLA via a pull request comment, if necessary.
37-
3834
<a name="first-timers"></a>
3935

4036
## 3. First time contributors welcome!
@@ -88,7 +84,7 @@ Our goal is to keep our Firewall Orchestrator stable and secure. If you would li
8884

8985
- If you're working on an issue, please comment that you are doing so to prevent duplicate work by others also.
9086

91-
- Squash your commits and refer to the issue using `fix #<issue-no>` or `close #<issue-no>` in the commit message, at the end.
87+
- Refer to an issue using `fix #<issue-no>` or `close #<issue-no>` in the commit message, at the end.
9288
For example: `resolve answers to everything (fix #42)` or `resolve answers to everything, fix #42`
9389

9490
- Rebase master with your branch before submitting a pull request.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![Open Source Love svg1](https://github.com/ellerbrock/open-source-badges/blob/master/badges/open-source-v1/open-source.svg)](https://github.com/ellerbrock/open-source-badges/)
66
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
77

8-
- Import firewall configurations (rules) of various brands (Check Point, Fortinet, Juniper, Barracuda, Netscreen)
8+
- Import firewall configurations (rules) of various brands (Check Point, Fortinet, Cisco, Juniper, Barracuda, Netscreen)
99
- Display reports on firewall configuration and changes
1010
- Regularly re-certify firewall rules to clean up your rulebase
1111
- Use the built-in GraphQL API to integrate with your existing infrastructure (Directory Service, ITSM, IPAM, ...)
@@ -14,7 +14,7 @@
1414

1515
## Installation instructions
1616

17-
See [installation instructions](documentation/installer/server-install.md).
17+
See [installation instructions](documentation/installer/basic-installation.md).
1818

1919
If your system is positioned behind a proxy or you have other specific installation needs like in a distributed installation, see [advanced server installation instructions](documentation/installer/install-advanced.md). Here you can also find information on upgrading and uninstalling the product.
2020

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Reporting a Vulnerability
44

5-
We’re extremely grateful for security researchers and users that report vulnerabilities to the Hasura Community. All reports are thoroughly investigated by a set of community volunteers and the Hasura team.
5+
We’re extremely grateful for security researchers and users that report vulnerabilities to the Firewall Orchestrator Community. All reports are thoroughly investigated by the Firewall Orchestrator team.
66

77
In case you discover a security issue/vulnerability, please contact security@cactus.de with all the details, attaching necessary information if possible.
88

@@ -27,7 +27,7 @@ The reporter will be kept updated at every stage of the issue's analysis and res
2727

2828
## Public Disclosure Timing
2929

30-
A public disclosure date is negotiated by the Hasura product security team and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to a few weeks. We expect the time-frame between a report to a public disclosure to typically be in the order of 7 days. The Firewall Orchestrator maintainers and the security team will take the final call on setting a disclosure date.
30+
A public disclosure date is negotiated by the security team and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to a few weeks. We expect the time-frame between a report to a public disclosure to typically be in the order of 7 days. The Firewall Orchestrator maintainers and the security team will take the final call on setting a disclosure date.
3131

3232
(Some sections have been inspired and adapted from [https://github.com/kubernetes/website/blob/master/content/en/docs/reference/issues-security/security.md](https://github.com/kubernetes/website/blob/master/content/en/docs/reference/issues-security/security.md)).
3333

ansible.cfg

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ stdout_callback = yaml
88
gathering = smart
99
gather_subset = !hardware,!facter,!ohai
1010

11+
ansible_conditional_bare_vars=false
12+
1113
fact_caching_connection = /tmp/ansible_fact_cache
1214
fact_caching = jsonfile
1315

1416
# expire the fact cache after 2 hours
1517
fact_caching_timeout = 7200
16-
17-
[ssh_connection]
18-
# from ansible 2.10 onwards, pipelining does not work anymore
19-
# instead the ansible playbook must be run via sudo
20-
pipelining = False
18+
pipelining = True

design/readme.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,26 @@ https://www.networkstraining.com/best-firewall-management-software-tools
3737

3838
- Client
3939

40-
- Apollo (<https://www.apollographql.com/>)
41-
- fat client: .NET core/5 with eto forms
40+
- browser-only
4241

4342
## Functional requirements (high-Level)
4443

4544
- low-cost alternative to core functionality of competition (Tufin, Algosec, Skybox, Firemon)
4645
- fullfil regulatory requirements (documentation of config changes, recertification of config)
4746
- "network CMDB"
48-
- do not include high risk functionality (e.g. write config changes to firewalls) in core product
49-
- offer API for automation purposes
47+
- do not include high risk functionality (e.g. write config changes to firewalls) in core product at first
48+
- offer full API for automation purposes
49+
- include granular role-basd access model
5050

5151
## Architecture: "encapsulate everything"
5252

5353
- API
5454

5555
- API modules (<https://medium.com/the-guild/why-is-true-modular-encapsulation-so-important-in-large-scale-graphql-projects-ed1778b03600>)
56-
- no direct DB access without API exception: login/auth module
57-
- API calls with resolvers: <https://medium.com/paypal-engineering/graphql-resolvers-best-practices-cd36fdbcef55>
56+
- no direct DB access without API
5857

5958
- UI
6059

6160
- UI display and data methods
6261

63-
- first impression, see <https://demo.itsecorg.de> manual
62+
- first impression, see <https://fwodemo.cactus.de>

0 commit comments

Comments
 (0)