-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from alf-cactus/alf/sample_data_changes
Alf/sample data changes
- Loading branch information
Showing
28 changed files
with
4,064 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,44 @@ | ||
It is recommended to create a personal fork and work on that, except you only make changes on documentation (but no code change). Just use the Fork button on the GitHub UI. | ||
|
||
<pre> | ||
|
||
hod@fworch-dev:~/firewall-orchestrator$ git pull | ||
Already up to date. | ||
12:36 | ||
Kann keine Aktion in Richtung CactuseSecurity/firewall-orchestrator Repo erkennen. | ||
Fork bleibt auf dem alten Stand und der Clone vom Fork auch | ||
12:38 | ||
Habe es nun so gemacht und es funktioniert:https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork | ||
12:58 | ||
git remote -v | ||
git remote add upstream https://github.com/CactuseSecurity/firewall-orchestrator.git | ||
git remote -v | ||
git fetch upstream | ||
git checkout master | ||
git merge upstream/master | ||
git push | ||
13:00 | ||
Und beim nächsten Mal nur noch: | ||
git fetch upstream | ||
git checkout master | ||
git merge upstream/master | ||
git push | ||
13:03 | ||
besser wäre natürlich | ||
git remote add upstream ssh://github.com/CactuseSecurity/firewall-orchestrator.git | ||
13:12 | ||
umbenennen mit git remote set-url upstream ssh://github.com/CactuseSecurity/firewall-orchestrator.git | ||
</pre> | ||
From that fork you can create local clones. | ||
|
||
It is possible to sync your fork via the GitHub UI, but it leads at least to an ugly additional commit in your fork history: | ||
(https://rick.cogley.info/post/update-your-forked-repository-directly-on-github/) | ||
|
||
So better use the command line: | ||
|
||
Source: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork | ||
|
||
Add ssh key to profile (Profile - Settings - ssh keys) | ||
|
||
# First time add upstream URL (only has to be done once): | ||
|
||
git remote -v | ||
git remote add upstream https://github.com/CactuseSecurity/firewall-orchestrator.git | ||
git remote -v | ||
|
||
# Sync with upstream | ||
|
||
git fetch upstream | ||
git checkout master | ||
git merge upstream/master | ||
git push | ||
|
||
|
||
# Working via ssh | ||
|
||
git remote add upstream ssh://github.com/CactuseSecurity/firewall-orchestrator.git | ||
|
||
# Change upstream name | ||
|
||
git remote set-url upstream ssh://github.com/CactuseSecurity/firewall-orchestrator.git | ||
|
||
# Example with non-master branch | ||
|
||
git clone [email protected]:tpurschke/firewall-orchestrator.git -b tim/make-api-reinstallable | ||
cd firewall-orchestrator/ | ||
git remote add upstream [email protected]:CactuseSecurity/firewall-orchestrator.git | ||
git fetch upstream | ||
git checkout tim/make-api-reinstallable | ||
git merge upstream/tim/make-api-reinstallable | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# concepts | ||
- schema: describes available functionality | ||
- data types | ||
- (object) type | ||
- scalar | ||
- Int, Float, String, Boolean, ID | ||
- query | ||
- mutation | ||
- subscription | ||
- enum | ||
|
||
|
||
# tools | ||
- graphql query tool insomnia | ||
- ubuntu: sudo snap install insomnia oder: | ||
- https://insomnia.rest/download/core/?&ref= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
# concepts and tools | ||
- hasura metadata: Hasura metadata stores information about your tables, | ||
relationships, permissions, etc. that is used to generate the GraphQL schema and API: | ||
see https://hasura.io/docs/1.0/graphql/manual/how-it-works/metadata-schema.html | ||
- graphiql - https://demo.itsecorg.de/api/console/api-explorer | ||
- track tables, views, relations --> create queries and expose these | ||
- permissions can be set here: https://demo.itsecorg.de/api/console/data/schema/public/permissions | ||
|
||
# hasura database | ||
- hasura creates the schemas hdb_catalog and hdb_views in parallel to public (see https://hasura.io/docs/1.0/graphql/manual/how-it-works/metadata-schema.html) | ||
- hdb_catalog.hdb_relationship contains the forein key constraints of the original database | ||
- hdb_catalog.hdb_permission contains the roles' permissions | ||
- hdb_catalog.view.hdb_role contains roles | ||
|
||
# authentication | ||
- https://hasura.io/blog/hasura-authentication-explained/#jwt-auth | ||
- how to devine roles & permissions in hasura: |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
changelog_object | ||
|
||
fetch data from the table: "changelog_object" | ||
[changelog_object!]! | ||
distinct_on: [changelog_object_select_column!] | ||
|
||
distinct select on columns | ||
limit: Int | ||
|
||
limit the number of rows returned | ||
offset: Int | ||
|
||
skip the first n rows. Use only with order_by | ||
order_by: [changelog_object_order_by!] | ||
|
||
sort the rows by one or more columns | ||
where: changelog_object_bool_exp | ||
|
||
filter the rows returned | ||
|
||
|
||
rules | ||
|
||
An array relationship | ||
[rule!]! | ||
distinct_on: [rule_select_column!] | ||
|
||
distinct select on columns | ||
limit: Int | ||
|
||
limit the number of rows returned | ||
offset: Int | ||
|
||
skip the first n rows. Use only with order_by | ||
order_by: [rule_order_by!] | ||
|
||
sort the rows by one or more columns | ||
where: rule_bool_exp | ||
|
||
filter the rows returned | ||
|
||
|
||
enum sec_gateway_type { | ||
FIREWALL | ||
PROXY | ||
IPS | ||
LOADBALANCER | ||
WAF | ||
} | ||
|
||
interface rule_object { | ||
id: ID | ||
name: String | ||
sec_manager: sec_manager | ||
sec_gateway: sec_gateway | ||
uid: String | ||
} | ||
|
||
type nw_object implements rule_object { | ||
id: ID | ||
name: String | ||
sec_manager: sec_manager | ||
} | ||
|
||
type sec_gateway { | ||
name: String | ||
id: ID | ||
sec_gateway_type: sec_gateway_type | ||
product: product | ||
product_version: product_version | ||
sec_manager: sec_manager | ||
} | ||
|
||
type product { | ||
vendor: String | ||
os: String | ||
} | ||
|
||
type product_version { | ||
version: String | ||
} | ||
|
||
type sec_manager { | ||
name: String | ||
id: ID | ||
sec_gw: [sec_gateway] | ||
} | ||
|
||
type rule { | ||
source: [nw_object] | ||
destination: [nw_object] | ||
service: [service] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ansible_python_interpreter: /usr/bin/python3 | ||
|
||
http_proxy: "" | ||
#http_proxy: http://admsrv.int.cactus:3128 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.