forked from faucetsdn/daq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
482 additions
and
114 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
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,52 +1,65 @@ | ||
## MUD ACL generator prototype | ||
|
||
The MUD ACL generator prototoype combines MUD files with a currently static set of system configuration | ||
files to produce FAUCET-compatible ACLs. This feature is in the early stages, so some assembly is | ||
The MUD ACL generator prototoype combines | ||
[IETF MUD files](https://datatracker.ietf.org/doc/draft-ietf-opsawg-mud/) | ||
with the dynamic state of the system to produce FAUCET-compatible network ACLs. | ||
This feature is in the early stages, so some assembly is | ||
required. Specifically, as a development feature, the system will need to be setup for running in | ||
development mode (see [build documentation](build.md)). Everything here is subject to change. | ||
Initially, this only provides a limited subset of | ||
policy enforcement; additional restrictions will manifest as the system improves. | ||
|
||
The basic combinator application (invoked with `bin/mudacl`) combines the following pieces of information: | ||
The basic combinator application (invoked with `bin/mudacl`) combines the system configuration | ||
(`inst/faucet.yaml`) with a set of pre-defined MUD files (`mud_files/`). The script will output | ||
compiled results into the `inst/acl_templates/` directory (and also does some other basic | ||
system setup tasks). | ||
|
||
* <b>Switch Topology</b>: Specified by `inst/faucet.yaml` (shouldn't need to change). | ||
* <b>Device Topology</b>: Specified in `local/devices.json` (copied into place by `bin/mudacl`). | ||
* <b>Device Types</b>: Specified in `local/types.json` (copied into place by `bin/mudacl`). | ||
* <b>MUD Files</b>: Specified in `mud_files/`. | ||
|
||
The `bin/mudacl` script will output compiled results into `inst/port_acls/`, where they are then | ||
included by the FAUCET runtime (see include directives in `inst/faucet.yaml`). | ||
If there is a device type configuration file (`inst/device_types.json`), the runtime system | ||
will monitor for referenced devices and apply the resolved ACL files appropriately. | ||
|
||
The following steps show how it all works for a test against the internal faux device. Just requires | ||
a simple edit to the default `system.conf` file to enable some deviant device behavior. First it runs | ||
DAQ without MUD, showing the exposed telnet port, and then again with MUD enforcement which should not | ||
allow telnet. | ||
|
||
``` | ||
~/daq$ diff misc/system.conf local/system.conf | ||
<pre> | ||
<b>~/daq$</b> diff local/system.conf misc/system.conf | ||
7c7 | ||
< daq_intf=faux-1! | ||
--- | ||
> daq_intf=faux! | ||
13c13 | ||
< #faux_args="telnet" | ||
< faux_args="telnet" | ||
--- | ||
> faux_args="telnet" | ||
~/daq$ sudo rm -rf inst/port_acls inst/faucet.log | ||
~/daq$ sudo cmd/exrun -s > daq_open.log 2>&1 | ||
~/daq$ fgrep port_1_acl inst/faucet.log | ||
Jul 24 22:19:30 faucet.config WARNING not a regular file or does not exist: /etc/faucet/port_acls/dp_sec_port_1_acl.yaml | ||
Jul 24 22:19:30 faucet.config WARNING skipping optional include file: /etc/faucet/port_acls/dp_sec_port_1_acl.yaml | ||
~/daq$ cat inst/run-port-01/nodes/nmap01/tmp/open.txt | ||
> #faux_args="telnet" | ||
<b>~/daq$</b> sudo rm -rf inst/port_acls inst/device_types.json | ||
<b>~/daq$</b> sudo cmd/exrun -s > daq_open.log 2>&1 | ||
<b>~/daq$</b> fgrep template daq_open.log | ||
<b>~/daq$</b> cat inst/run-port-01/nodes/nmap01/tmp/open.txt | ||
23/open/tcp//telnet/// | ||
~/daq$ bin/mudacl | ||
touch: setting times of 'inst/': Permission denied | ||
BUILD SUCCESSFUL in 1s | ||
<b>~/daq$</b> bin/mudacl | ||
|
||
BUILD SUCCESSFUL in 0s | ||
2 actionable tasks: 2 up-to-date | ||
|
||
Executing mudacl generator... | ||
Writing output files to /home/username/daq/inst/port_acls | ||
total 8 | ||
-rw-rw-r-- 1 username username 939 Jul 24 22:21 dp_sec_port_1_acl.yaml | ||
-rw-rw-r-- 1 username username 518 Jul 24 22:21 dp_sec_port_2_acl.yaml | ||
~/daq$ sudo rm inst/faucet.log | ||
~/daq$ sudo cmd/exrun -s > daq_mud.log 2>&1 | ||
~/daq$ fgrep port_1_acl inst/faucet.log | ||
~/daq$ cat inst/run-port-01/nodes/nmap01/tmp/open.txt | ||
~/daq$ | ||
``` | ||
Writing output files to /home/username/daq/inst/acl_templates | ||
-rw-r--r-- 1 username primarygroup 140 Jul 31 15:38 inst/device_types.json | ||
|
||
inst/acl_templates: | ||
total 16 | ||
-rw-r--r-- 1 username primarygroup 408 Jul 31 15:38 template_baseline_acl.yaml | ||
-rw-r--r-- 1 username primarygroup 44 Jul 31 15:38 template_default_acl.yaml | ||
-rw-r--r-- 1 username primarygroup 465 Jul 31 15:38 template_lightbulb_acl.yaml | ||
-rw-r--r-- 1 username primarygroup 217 Jul 31 15:38 template_telnet_acl.yaml | ||
|
||
inst/port_acls: | ||
total 0 | ||
<b>~/daq$</b> ls -l inst/device_types.json | ||
-rw-r--r-- 1 username primarygroup 140 Jul 31 15:38 inst/device_types.json | ||
<b>~/daq$</b> sudo cmd/exrun -s > daq_mud.log 2>&1 | ||
<b>~/daq$</b> fgrep template daq_mud.log | ||
INFO:network:Processing acl template for 9a:02:57:1e:8f:01/lightbulb | ||
<b>~/daq$</b> cat inst/run-port-01/nodes/nmap01/tmp/open.txt | ||
<b>~/daq$</b> | ||
</pre> |
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 +1 @@ | ||
fd56eb481546dd955edb40999a7597bac8826a15 | ||
0bca70c08c067ce3f965674807b4638ac6aa1b9a |
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,7 @@ | ||
{ | ||
"macAddrs": { | ||
"9a:02:57:1e:8f:01": { | ||
"type": "lightbulb" | ||
} | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"ietf-mud:mud": { | ||
"mud-version": 1, | ||
"last-update": "2018-03-02T11:20:51+01:00", | ||
"cache-validity": 48, | ||
"is-supported": true | ||
} | ||
} |
Oops, something went wrong.