(string name) where TEvent : class, IEvent;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/roles/middleware/files/FWO.Middleware.Server/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "profiles": {
4 | "FWO.Middleware": {
5 | "commandName": "Project",
6 | "dotnetRunMessages": "true",
7 | "launchBrowser": true,
8 | "launchUrl": "swagger",
9 | "applicationUrl": "http://localhost:8880",
10 | "environmentVariables": {
11 | "ASPNETCORE_ENVIRONMENT": "Development"
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/roles/middleware/files/FWO.Middleware.Server/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/roles/middleware/files/FWO.Middleware.Server/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/roles/middleware/files/get_pg_version.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ver=$(psql --version | cut -d " " -f 3)
3 | major_ver=$(echo "$ver" | cut -d "." -f 1)
4 | minor_ver=$(echo "$ver" | cut -d "." -f 2)
5 | # return only major version from pg 10 onwards
6 | if [ $((major_ver * 1)) -gt 9 ]
7 | then
8 | ver=$major_ver
9 | fi
10 | echo -n "$ver"
11 |
--------------------------------------------------------------------------------
/roles/middleware/files/jwt_test_public_key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN PUBLIC KEY-----
2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ILANCqxJZazBoskdWdx
3 | m0Rvyb6iYt1eiecep5eCHbq+Hmq4NJpJkIcLadzd2m/n0q0VkOAwrpN499RtZxZ4
4 | HKgheD9Z/uzrgIKDQFmnd9KygYjIAubQXxC/CFgv79CfG9+LIyKCu4oNXueoYJnS
5 | XjzV9NNBF05bVj2zZsJneZlujQKNt7xMXhFo7uWpbAx8qYP1n1RjBVTyIaKc4dDB
6 | 90bNhpSBz/L3/09h4+r26xZloZRhzfMrplUWBVYyzH2g/b0VOjXS2Coe8HV10Rt8
7 | zecBrz/JYbf9HVY7g3sWTueyd5+XdCWkIbZy0A3yiO5jCltbZWl86BjzUsFwzS10
8 | aQIDAQAB
9 | -----END PUBLIC KEY-----
--------------------------------------------------------------------------------
/roles/middleware/tasks/upgrade/5.5.1.yml:
--------------------------------------------------------------------------------
1 |
2 | # - name: stop old middleware server
3 | # systemd:
4 | # name: "{{ middleware_service_name }}"
5 | # enabled: false
6 | # status: stopped
7 | # become: true
8 |
9 | # - name: remove debugging middleware server
10 | # file:
11 | # path: "/usr/local/fworch/middleware/files/FWO.Middleware.Server/bin/Debug"
12 | # state: absent
13 | # become: true
14 |
--------------------------------------------------------------------------------
/roles/middleware/tasks/upgrade/5.5.5.yml:
--------------------------------------------------------------------------------
1 | - name: set ldap tenant level to 5
2 | postgresql_query:
3 | db: "{{ fworch_db_name }}"
4 | query: >
5 | DO $do$ BEGIN IF EXISTS
6 | (SELECT * FROM ldap_connection
7 | WHERE ldap_server='{{ openldap_server }}')
8 | THEN UPDATE ldap_connection
9 | SET ldap_tenant_level=5;
10 | END IF; END $do$
11 | become: true
12 | become_user: postgres
13 |
--------------------------------------------------------------------------------
/roles/middleware/templates/ldif_files/tree_level_0.ldif.j2:
--------------------------------------------------------------------------------
1 | dn: {{ openldap_path }}
2 | changetype: {{ ldif_changetype }}
3 | {% if ldif_changetype != 'delete' -%}
4 | objectClass: dcObject
5 | objectClass: organization
6 | o: root of {{ product_name }} internal ldap
7 | {%- endif %}
8 |
--------------------------------------------------------------------------------
/roles/middleware/templates/ldif_files/tree_level_2.ldif.j2:
--------------------------------------------------------------------------------
1 | dn: ou=systemuser,ou=user,{{ openldap_path }}
2 | changetype: {{ ldif_changetype }}
3 | {% if ldif_changetype != 'delete' -%}
4 | objectClass: top
5 | objectClass: organizationalUnit
6 | ou: systemuser
7 | {%- endif %}
8 |
9 |
10 | dn: ou=operator,ou=user,{{ openldap_path }}
11 | changetype: {{ ldif_changetype }}
12 | {% if ldif_changetype != 'delete' -%}
13 | objectClass: top
14 | objectClass: organizationalUnit
15 | ou: operator
16 | {%- endif %}
17 |
--------------------------------------------------------------------------------
/roles/middleware/templates/ldif_files/tree_tenant0.ldif.j2:
--------------------------------------------------------------------------------
1 | dn: ou=tenant0,ou=operator,ou=user,{{ openldap_path }}
2 | changetype: {{ ldif_changetype }}
3 | {% if ldif_changetype != 'delete' -%}
4 | objectClass: top
5 | objectClass: organizationalUnit
6 | ou: tenant0
7 | {%- endif %}
8 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.1.1.ldif.j2:
--------------------------------------------------------------------------------
1 | # test
2 |
3 | dn: uid=admin2,ou=tenant0,ou=operator,ou=user,{{ openldap_path }}
4 | changetype: add
5 | objectClass: top
6 | objectclass: inetorgperson
7 | cn: admin2
8 | sn: admin2
9 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.1.2.ldif.j2:
--------------------------------------------------------------------------------
1 | # test
2 |
3 | dn: cn=admin,ou=role,{{ openldap_path }}
4 | changetype: modify
5 | add: uniquemember
6 | uniquemember: uid=admin2,ou=tenant0,ou=operator,ou=user,dc=fworch,dc=internal
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.1.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=anonymous,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0001
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.10.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=fw-admin,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0010
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.11.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=admin,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0011
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.2.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=middleware-server,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0002
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.3.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=reporter,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0003
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.4.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=reporter-viewall,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0004
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.5.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=importer,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0005
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.6.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=dbbackup,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0006
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.7.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=auditor,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0007
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.8.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=workflow-user,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0008
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.2.9.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=workflow-admin,ou=role,{{ openldap_path }}
3 | changetype: modify
4 | replace: description
5 | description: T0009
6 |
7 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.2.5.ldif.j2:
--------------------------------------------------------------------------------
1 | # add new role recertifier
2 |
3 | dn: cn=recertifier,ou=role,{{ openldap_path }}
4 | changetype: add
5 | objectClass: top
6 | objectClass: groupofuniquenames
7 | cn: recertifier
8 | uniqueMember:
9 | description: T0012
10 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/5.4.1.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: uid=importer,ou=tenant0,ou=operator,ou=user,{{ openldap_path }}
3 | changetype: add
4 | objectClass: top
5 | objectclass: inetorgperson
6 | cn: importer
7 | sn: user
8 |
9 |
10 | dn: cn=importer,ou=role,{{ openldap_path }}
11 | changetype: modify
12 | add: uniquemember
13 | uniquemember: uid=importer,ou=tenant0,ou=operator,ou=user,dc=fworch,dc=internal
14 |
--------------------------------------------------------------------------------
/roles/middleware/templates/upgrade/7.2.4.ldif.j2:
--------------------------------------------------------------------------------
1 |
2 | dn: cn=modeller,ou=role,{{ openldap_path }}
3 | changetype: add
4 | objectClass: top
5 | objectClass: groupofuniquenames
6 | cn: modeller
7 | uniqueMember:
8 | description: T0018
9 |
10 |
--------------------------------------------------------------------------------
/roles/openldap-server/handlers/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - name: restart slapd
3 | service: name=slapd state=restarted enabled=true
4 | become: true
5 |
--------------------------------------------------------------------------------
/roles/openldap-server/meta/main.yml:
--------------------------------------------------------------------------------
1 | galaxy_info:
2 | author: "Benno Joy"
3 | company: AnsibleWorks
4 | license: BSD
5 | min_ansible_version: 1.4
6 | platforms:
7 | - name: EL
8 | versions:
9 | - 5
10 | - 6
11 | - name: Fedora
12 | versions:
13 | - 16
14 | - 17
15 | - 18
16 | - name: Ubuntu
17 | versions:
18 | - precise
19 | - quantal
20 | - raring
21 | - saucy
22 | categories:
23 | - system
24 | dependencies: []
25 |
--------------------------------------------------------------------------------
/roles/openldap-server/tasks/upgrade/5.1.17.yml:
--------------------------------------------------------------------------------
1 | - debug:
2 | msg:
3 | - "running dummy common upgrade script"
4 |
--------------------------------------------------------------------------------
/roles/openldap-server/tasks/upgrade/5.4.1.yml:
--------------------------------------------------------------------------------
1 | - name: copy associated ldif files to system
2 | template:
3 | src: upgrade/5.4.1.ldif.j2
4 | dest: "{{ middleware_ldif_dir }}/5.4.1.ldif"
5 | force: true
6 | become: true
7 |
8 | - name: upgrade olcAccess policy
9 | command: "ldapmodify -H {{ openldap_url }} -D cn=config -y {{ ldap_manager_pwd_file }} -x -f {{ middleware_ldif_dir }}/5.4.1.ldif"
10 | become: true
11 |
--------------------------------------------------------------------------------
/roles/openldap-server/tasks/upgrade/5.7.1.yml:
--------------------------------------------------------------------------------
1 | - name: rename old ldap manager pwd file in case of pre-5.7.1 upgrade
2 | copy:
3 | src: "{{ fworch_secrets_dir }}/ldap_manager_pw.txt"
4 | dest: "{{ ldap_manager_pwd_file }}"
5 | force: true
6 | remote_src: true
7 | become: true
8 | ignore_errors: true
9 |
--------------------------------------------------------------------------------
/roles/openldap-server/tasks/upgrade/6.4.9.yml:
--------------------------------------------------------------------------------
1 | - name: copy associated ldif files to system
2 | template:
3 | src: upgrade/6.4.9.ldif.j2
4 | dest: "{{ middleware_ldif_dir }}/6.4.9.ldif"
5 | force: true
6 | become: true
7 |
8 | - name: upgrade sample group roles
9 | command: "ldapmodify -H {{ openldap_url }} -D {{ openldap_superuser_dn }} -y {{ ldap_manager_pwd_file }} -x -f {{ middleware_ldif_dir }}/6.4.9.ldif -c"
10 | become: true
11 | ignore_errors: true
12 |
--------------------------------------------------------------------------------
/roles/openldap-server/templates/override.conf.j2:
--------------------------------------------------------------------------------
1 | [Service]
2 | ExecStartPre=/bin/mkdir -p /run/slapd
3 | ExecStartPre=/bin/chown openldap:openldap /run/slapd
4 | ExecStart=
5 | ExecStart=/usr/sbin/slapd -F /etc/ldap/slapd.d -u {{ openldap_server_user }} -g {{ openldap_server_user }} -h "ldap://{{ openldap_server }} ldaps:///"
6 |
--------------------------------------------------------------------------------
/roles/openldap-server/vars/Debian.yml:
--------------------------------------------------------------------------------
1 | openldap_server_pkgs:
2 | - slapd
3 | - ldap-utils
4 | - openssl
5 | - python3-openssl
6 |
7 | openldap_server_app_path: "/etc/ldap"
8 | openldap_server_user: "openldap"
9 |
--------------------------------------------------------------------------------
/roles/openldap-server/vars/RedHat.yml:
--------------------------------------------------------------------------------
1 | openldap_server_pkgs:
2 | - openldap-servers
3 | - openldap-clients
4 | - openssl
5 | - python3-openssl
6 |
7 | openldap_server_app_path: "/etc/openldap"
8 | openldap_server_user: ldap
9 |
--------------------------------------------------------------------------------
/roles/openldap-server/vars/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | env:
4 | RUNLEVEL: 1
5 |
--------------------------------------------------------------------------------
/roles/sample-auth-data/defaults/main.yml:
--------------------------------------------------------------------------------
1 | test_ldap_external_ad_add_connection: no
--------------------------------------------------------------------------------
/roles/sample-data/templates/second_db.ldif.j2:
--------------------------------------------------------------------------------
1 | dn: olcDatabase=mdb,cn=config
2 | changetype: add
3 | objectClass: olcDatabaseConfig
4 | objectClass: olcMdbConfig
5 | olcDatabase: mdb
6 | olcSuffix: {{ sample_ldap_path }}
7 | olcDbDirectory: /var/lib/ldap/{{ sample_ldap_domain_name }}/
8 | olcRootDN: {{ openldap_superuser_dn }}
9 | olcDbIndex: objectClass eq
10 |
--------------------------------------------------------------------------------
/roles/tests-integration/files/api/test-graphql.md:
--------------------------------------------------------------------------------
1 | # API testing graphql
2 |
3 | ## sources
4 |
5 | -
6 |
--------------------------------------------------------------------------------
/roles/tests-integration/files/importer/anonymizer/strings-customer-003.txt:
--------------------------------------------------------------------------------
1 | cactus
2 | CACTUS
3 | lhystems
4 | sting
5 | ralf
6 | Ralf
7 | kids
8 | ubuntu
9 |
--------------------------------------------------------------------------------
/roles/tests-integration/files/importer/anonymizer/use_current_version_from_github.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/tests-integration/files/importer/anonymizer/use_current_version_from_github.txt
--------------------------------------------------------------------------------
/roles/tests-integration/files/importer/sample-configs/checkpoint_demo/fwauth.NDB:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/tests-integration/files/importer/sample-configs/checkpoint_demo/fwauth.NDB
--------------------------------------------------------------------------------
/roles/tests-integration/tasks/b64pad.yml:
--------------------------------------------------------------------------------
1 | ## adding potentially missing base64 = padding to base64encoded string:
2 | - set_fact: item="{{ item }}=" cacheable=true
3 | when: "item|length % 4 > 0"
4 | loop:
5 | - 1
6 | - 2
7 | - 3
--------------------------------------------------------------------------------
/roles/tests-integration/tasks/test-database.yml:
--------------------------------------------------------------------------------
1 | # add integration tests for database here
2 | # - import test
3 | # - report test
4 |
5 | # pg_prove -U postgres /pgjwt/test.sql
6 |
7 | - debug:
8 | msg: starting database integration tests
9 |
--------------------------------------------------------------------------------
/roles/tests-integration/tasks/write-config-test-user-creds.yml:
--------------------------------------------------------------------------------
1 | - name: set config values
2 | set_fact:
3 | config_json:
4 | user: "user1{{ test_postfix }}"
5 | password: "{{ test_user1_pw }}"
6 | when: installation_mode != "uninstall"
7 |
8 | - name: create test user credential config file
9 | copy:
10 | content: "{{ config_json | to_nice_json }}"
11 | dest: "{{ fworch_secrets_dir }}/TestUserCreds.json"
12 | when: installation_mode != "uninstall"
13 | become: true
14 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Data/CSVFileUploadErrorModel.cs:
--------------------------------------------------------------------------------
1 | namespace FWO.Ui.Data
2 | {
3 | ///
4 | /// Defines a model for errors that occured on csv file upload
5 | ///
6 | public class CSVFileUploadErrorModel : ErrorBaseModel
7 | {
8 | public CSVFileUploadErrorModel() : base()
9 | {
10 | }
11 |
12 | ///
13 | /// Additional Data/Info
14 | ///
15 | public string? EntryData { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Data/FileUploadCase.cs:
--------------------------------------------------------------------------------
1 | namespace FWO.Ui.Data
2 | {
3 | public enum FileUploadCase
4 | {
5 | Undefined,
6 | ImportAppServerFromCSV
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Data/MessageType.cs:
--------------------------------------------------------------------------------
1 | namespace FWO.Ui.Data
2 | {
3 | public enum MessageType
4 | {
5 | Info,
6 | Success,
7 | Warning,
8 | Error
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Data/OrderMode.cs:
--------------------------------------------------------------------------------
1 | namespace FWO.Ui.Data
2 | {
3 | ///
4 | /// Defines the mode that should be used to order a collection.
5 | ///
6 | public enum OrderMode
7 | {
8 | Asc,
9 | Desc
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Data/PopupSize.cs:
--------------------------------------------------------------------------------
1 | namespace FWO.Ui.Services
2 | {
3 | public enum PopupSize
4 | {
5 | FullScreen,
6 | XLarge,
7 | Large,
8 | Medium,
9 | Small,
10 | XSmall
11 | }
12 | }
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpApi.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/API"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpAPISidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("api")
16 | @(Html.Raw(userConfig.GetText("H6001")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpApiFwoHasura.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/API/hasura"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpAPISidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("hasura")
16 | @(Html.Raw(userConfig.GetText("H6201")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpApiLogout.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/API/logout"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpAPISidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("logout")
16 | @(Html.Raw(userConfig.GetText("H6601")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpApiSecurity.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/API/security"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpAPISidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("security")
16 | @(Html.Raw(userConfig.GetText("H6301")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpArchitechture.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/architecture"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpEmptySidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("architecture")
16 |

17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpEmptySidebar.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpModelling.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/modelling"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpModellingSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("modelling")
16 | @(Html.Raw(userConfig.GetText("H9001")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpModellingApplications.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/modelling/applications"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpModellingSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("applications")
16 | @(Html.Raw(userConfig.GetText("H9011")))
17 |
18 |
19 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpMonitoringAutodiscovery.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/monitoring/autodiscovery"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpMonitoringSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("autodiscovery")
16 | @(Html.Raw(userConfig.GetText("H7201")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpMonitoringExternalRequestTickets.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/monitoring/external_request_tickets"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpMonitoringSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("ext_request_tickets")
16 | @(Html.Raw(userConfig.GetText("H9060")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpMonitoringUiMessages.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/monitoring/ui_messages"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpMonitoringSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("ui_messages")
16 | @(Html.Raw(userConfig.GetText("H7401")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpRecertification.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/recertification"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpRecertificationSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("recertification")
16 | @(Html.Raw(userConfig.GetText("H4031")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpReporting.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/reporting"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpReportingSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("reporting")
16 | @(Html.Raw(userConfig.GetText("H1001")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpReportingArchive.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/reporting/archive"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpReportingSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("archive")
16 | @(Html.Raw(userConfig.GetText("H3001")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpReportingTypes.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/reporting/reporttypes"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpReportingSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@userConfig.GetText("report_types")
16 | @(Html.Raw(userConfig.GetText("H1102")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpSettingsPassword.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/settings/password"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpSettingsSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@(userConfig.GetText("password"))
16 | @(Html.Raw(userConfig.GetText("H5451")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpWorkflowChecklist.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/workflow/checklist"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpWorkflowSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@(userConfig.GetText("checklist"))
16 | @(Html.Raw(userConfig.GetText("H8601")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/HelpWorkflowStates.cshtml:
--------------------------------------------------------------------------------
1 | @page "/help/workflow/states"
2 | @model FWO.Ui.Pages.Help.MainModel
3 | @{
4 | Layout = "HelpLayout";
5 | }
6 | @section sidebar{
7 | @{
8 | await Html.RenderPartialAsync("HelpWorkflowSidebar.cshtml");
9 | }
10 | }
11 | @using FWO.Config.Api
12 | @inject UserConfig userConfig
13 |
14 |
15 |
@(userConfig.GetText("state_handling"))
16 | @(Html.Raw(userConfig.GetText("H8401")))
17 |
18 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Help/Index.cshtml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc.RazorPages;
2 | using FWO.Config.Api;
3 |
4 | namespace FWO.Ui.Pages.Help
5 | {
6 | public class MainModel : PageModel
7 | {
8 | public UserConfig userConfig { get; set; }
9 |
10 | public MainModel(UserConfig userConfig)
11 | {
12 | this.userConfig = userConfig;
13 | }
14 |
15 | public void OnGet(string lang)
16 | {
17 | userConfig.SetLanguage(lang);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Monitoring/_Imports.razor:
--------------------------------------------------------------------------------
1 | @layout MonitoringLayout
2 |
3 | @using BlazorTable
4 | @using FWO.Api.Client
5 | @using FWO.Api.Client.Queries
6 | @using FWO.Basics
7 | @using FWO.Config.Api
8 | @using FWO.Config.Api.Data
9 | @using FWO.Data
10 | @using FWO.Services
11 | @using FWO.Ui.Shared
12 |
13 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/NetworkModelling/EditAppRole.razor.css:
--------------------------------------------------------------------------------
1 | .dropzone-scrollable {
2 | height: 200px;
3 | overflow-y: auto;
4 | overflow-x: hidden;
5 | }
6 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/NetworkModelling/SearchInterface.razor.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/Pages/NetworkModelling/SearchInterface.razor.css
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/NetworkModelling/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using BlazorTable
2 | @using FWO.Api.Client
3 | @using FWO.Api.Client.Queries
4 | @using FWO.Basics
5 | @using FWO.Config.Api
6 | @using FWO.Data
7 | @using FWO.Data.Modelling
8 | @using FWO.Services
9 | @using FWO.Ui.Shared
10 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Reporting/Reports/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using BlazorTable
2 | @using FWO.Config.Api
3 | @using FWO.Api.Client
4 | @using FWO.Api.Client.Queries
5 | @using FWO.Basics
6 | @using FWO.Data
7 | @using FWO.Data.Report
8 | @using FWO.Ui.Shared
9 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Reporting/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using BlazorTable
2 | @using FWO.Api.Client
3 | @using FWO.Api.Client.Queries
4 | @using FWO.Basics
5 | @using FWO.Config.Api
6 | @using FWO.Data
7 | @using FWO.Data.Report
8 | @using FWO.Services
9 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Request/_Imports.razor:
--------------------------------------------------------------------------------
1 | @layout RequestLayout
2 |
3 | @using BlazorTable
4 | @using FWO.Api.Client
5 | @using FWO.Api.Client.Queries
6 | @using FWO.Basics
7 | @using FWO.Config.Api
8 | @using FWO.Config.Api.Data
9 | @using FWO.Data
10 | @using FWO.Data.Workflow
11 | @using FWO.Services
12 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Settings/SettingsMain.razor:
--------------------------------------------------------------------------------
1 | @page "/settings"
2 |
3 | @inject UserConfig userConfig
4 |
5 |
6 |
@(userConfig.GetText("settings"))
7 |
8 |
9 | @(userConfig.GetText("U5001"))
10 |
11 |
12 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/Settings/_Imports.razor:
--------------------------------------------------------------------------------
1 | @layout SettingsLayout
2 |
3 | @using BlazorTable
4 | @using FWO.Api.Client
5 | @using FWO.Api.Client.Queries
6 | @using FWO.Basics
7 | @using FWO.Config.Api
8 | @using FWO.Config.Api.Data
9 | @using FWO.Data
10 | @using FWO.Data.Workflow
11 | @using FWO.Data.Modelling
12 | @using FWO.Data.Report
13 | @using FWO.Services
14 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Pages/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using BlazorTable
2 | @using FWO.Api.Client
3 | @using FWO.Api.Client.Queries
4 | @using FWO.Basics
5 | @using FWO.Data
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "FWO.Ui": {
4 | "commandName": "Project",
5 | "launchBrowser": true,
6 | "applicationUrl": "http://localhost:5000",
7 | "environmentVariables": {
8 | "ASPNETCORE_ENVIRONMENT": "Development"
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Services/KeyboardInputService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Components.Web;
2 | using FWO.Ui.Data;
3 |
4 | namespace FWO.Ui.Services
5 | {
6 | public class KeyboardInputService
7 | {
8 | public bool ShiftPressed { get; set; } = false;
9 | public bool ControlPressed { get; set; } = false;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/ConnectionTable.razor.css:
--------------------------------------------------------------------------------
1 | .show-scrollbar .table-responsive {
2 | overflow: scroll;
3 | }
4 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/EditList.razor.css:
--------------------------------------------------------------------------------
1 | .bg-success-subtle {
2 | background: rgb(83, 175, 36, 0.5) !important
3 | }
4 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/EmptyLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 |
3 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/HelpLink.razor:
--------------------------------------------------------------------------------
1 | @inject UserConfig userConfig
2 | @inject IJSRuntime jsRuntime
3 |
4 |
5 | @ChildContent
6 |
7 |
8 | @code
9 | {
10 | [Parameter]
11 | public RenderFragment? ChildContent { get; set; }
12 |
13 | [Parameter]
14 | public string? Page { get; set; } = "";
15 | }
16 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/PageSizeComponent.razor.css:
--------------------------------------------------------------------------------
1 | .cwidth-70{
2 | width: 70px;
3 | }
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/Tooltip.razor:
--------------------------------------------------------------------------------
1 |
2 | @Text
3 | @ChildContent
4 |
5 |
6 | @code {
7 | [Parameter] public RenderFragment? ChildContent { get; set; }
8 | [Parameter] public string Text { get; set; } = "";
9 | }
10 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/Shared/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using BlazorTable
2 | @using FWO.Api.Client
3 | @using FWO.Api.Client.Queries
4 | @using FWO.Basics
5 | @using FWO.Config.Api
6 | @using FWO.Config.Api.Data
7 | @using FWO.Data
8 | @using FWO.Services
9 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using Microsoft.AspNetCore.Authorization
3 | @using Microsoft.AspNetCore.Components.Authorization
4 | @using Microsoft.AspNetCore.Components.Forms
5 | @using Microsoft.AspNetCore.Components.Routing
6 | @using Microsoft.AspNetCore.Components.Web
7 | @using Microsoft.JSInterop
8 | @using FWO.Ui.Shared
9 | @using FWO.Ui.Pages
10 | @using FWO.Ui.Services
11 | @using FWO.Logging
12 | @using FWO.Config
13 | @using FWO.Config.Api
14 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "DetailedErrors": true,
3 | "Logging": {
4 | "LogLevel": {
5 | "Default": "Information",
6 | "Microsoft": "Warning",
7 | "Microsoft.Hosting.Lifetime": "Information",
8 | "Microsoft.AspNetCore.SignalR": "Information"
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | },
9 | "AllowedHosts": "*"
10 | }
11 |
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.eot
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.otf
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/css/open-iconic/font/fonts/open-iconic.woff
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/favicon.ico
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/images/FWO_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/images/FWO_logo.png
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/images/FWO_logo_navbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CactuseSecurity/firewall-orchestrator/c40c905b136c2f06244dbbe506dba35b75fdc0f2/roles/ui/files/FWO.UI/wwwroot/images/FWO_logo_navbar.png
--------------------------------------------------------------------------------
/roles/ui/files/FWO.UI/wwwroot/js/clipboardCopy.js:
--------------------------------------------------------------------------------
1 | function copyText(text) {
2 | navigator.clipboard.writeText(text);
3 | }
4 |
--------------------------------------------------------------------------------
/roles/ui/tasks/upgrade/5.1.17.yml:
--------------------------------------------------------------------------------
1 | - debug:
2 | msg:
3 | - "running dummy common upgrade script"
4 |
--------------------------------------------------------------------------------
/roles/webhook/defaults/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | webhook_port: 60355
3 | webhook_secret: "changeMeSoon"
--------------------------------------------------------------------------------
/roles/webhook/handlers/main.yml:
--------------------------------------------------------------------------------
1 | - name: Reload service systemctl
2 | systemd:
3 | daemon_reload: true
4 | listen: "restart daemons"
5 | become: true
6 |
7 | - name: restart webhook service
8 | service:
9 | name: fworch-webhook-receiver
10 | state: restarted
11 | listen: "restart daemons"
12 | become: true
13 |
--------------------------------------------------------------------------------
/roles/webhook/templates/fworch-webhook-receiver.service.j2:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=FW Orch Webhook receiver for github
3 | After=network.target remote-fs.target nss-lookup.target
4 | [Service]
5 | WorkingDirectory={{ fworchtest_home }}
6 | ExecStart=/usr/bin/python3 {{ fworchtest_home }}/fworch-webhook-receiver.py
7 | StandardOutput=journal
8 | StandardError=journal
9 | SyslogIdentifier=fworch-webhook
10 | User=fworchtest
11 | Environment=
12 | [Install]
13 | WantedBy=multi-user.target
14 |
--------------------------------------------------------------------------------
/scripts/customizing/modelling/customizingConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "username": "abc",
3 | "password": "def",
4 | "ldapPath": "CN={USERID},OU=Benutzer,DC=CACTUS,DC=DE",
5 | "subnetData": "/usr/local/fworch/scripts/customizing/modelling/NwObjDataOrigExample.csv",
6 | "apiBaseUri": "/usr/local/fworch/scripts/customizing/modelling/sampleOwnerDataOrig.json"
7 | }
8 |
--------------------------------------------------------------------------------
/scripts/devsrv-manual-install.sh:
--------------------------------------------------------------------------------
1 | cd
2 | rm -rf firewall-orchestrator
3 | ssh-agent bash -c 'ssh-add .ssh/id_github_deploy && git clone git@github.com:CactuseSecurity/firewall-orchestrator.git'
4 | cd firewall-orchestrator
5 | ansible-playbook site.yml -e "installation_mode=uninstall"
6 | ansible-playbook site.yml -e "installation_mode=new"
7 |
--------------------------------------------------------------------------------
/scripts/generate_import_status_file.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # fworch import status writing script
3 | # to be run via cron every minute
4 |
5 | PHP=/usr/bin/php
6 | FWORCHHOME=/usr/local/fworch
7 | IMPORT_STATUS_DIR=/var/fworch
8 | IMPORT_STATUS_FILE=import_status.txt
9 | MKDIR=/bin/mkdir
10 |
11 | $MKDIR -p $IMPORT_STATUS_DIR
12 | $PHP $FWORCHHOME/web/htdocs/config/import_status_iframe.php --outputmode=text | sed 's/
/\n/g' > $IMPORT_STATUS_DIR/$IMPORT_STATUS_FILE
--------------------------------------------------------------------------------
/scripts/get_pg_version.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ver=$(psql --version | cut -d " " -f 3)
3 | major_ver=$(echo "$ver" | cut -d "." -f 1)
4 | minor_ver=$(echo "$ver" | cut -d "." -f 2)
5 | # return only major version from pg 10 onwards
6 | if [ $((major_ver * 1)) -gt 9 ]
7 | then
8 | ver=$major_ver
9 | fi
10 | echo -n "$ver"
11 |
--------------------------------------------------------------------------------
/scripts/import_phion-mc-agent.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | {
3 | /usr/bin/id
4 | /bin/date
5 | } >> /var/tmp/itsecorg.log 2>&1;
6 | /bin/cp -u -r /opt/phion/rangetree/configroot/* /var/phion/home/itsecorg/ >> /var/tmp/itsecorg.log 2>&1;
7 | /bin/chown -R itsecorg:users /var/phion/home/itsecorg >> /var/tmp/itsecorg.log 2>&1;
8 |
--------------------------------------------------------------------------------
/scripts/json_pretty_print.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | # takes json from stdin and converts it from ugly to pretty json format
3 |
4 | import json
5 | json_obj = json.loads(input())
6 | print(json.dumps(json_obj, indent=2))
7 |
--------------------------------------------------------------------------------
/scripts/release_lock.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | import sys
4 | from time import sleep
5 |
6 | assert len(sys.argv) == 2
7 | lock_file_path = sys.argv[1]
8 |
9 | while True:
10 | try:
11 | with open(lock_file_path, "a") as lock_file:
12 | lock_file.write("RELEASED\n")
13 | print("Lock was released.")
14 | exit()
15 | except Exception as e:
16 | sleep(0.1)
17 | print(e)
18 | sleep(0.1)
19 |
--------------------------------------------------------------------------------
/scripts/show-fworch-listeners.yml:
--------------------------------------------------------------------------------
1 | ---
2 | - block:
3 |
4 | - name: check if netstat exists
5 | stat:
6 | path: /bin/netstat
7 | register: netstat_file_exists
8 |
9 | - name: get running tcp services
10 | command: netstat -tlpen
11 | register: netstat_result
12 | when: netstat_file_exists.stat.exists == true
13 |
14 | - name: show running tcp services
15 | debug: var=netstat_result.stdout_lines
16 | when: netstat_file_exists.stat.exists == true
17 |
18 | become: yes
19 |
--------------------------------------------------------------------------------