Subject: [Mud] Some more mudmaker changes

From: Eliot Lear <[email-masked]>
Date: Tue, 3 Mar 2020 21:14:28 +0100

Hi everyone,

Following up on my earlier note, I’ve made a few other changes.  First, in order to avoid some browser interop issues, I’ve moved some stuff around, as follows:

You can still go to https://www.mudmaker.org/mudpp <https://www.mudmaker.org/mudpp> to get a pretty printed version of a MUD file.  However, that is just an alias for https://www.mudmaker.org/mudrest/mudpp <https://www.mudmaker.org/mudrest/mudpp>.  If you have a MUD file and want to get an HTMLized prettyprinted version in some freeware code, there’s a new project at https://www.github.com/iot-onboarding/mudpp <https://www.github.com/iot-onboarding/mudpp>.  That’s the back end of all of this.

If you’d rather just run it through a RESTful interface to me, you can do that too, but the endpoint has changed from what I posted earlier: it’s now https://www.mudmaker.org/mudrest/mudpp <https://www.mudmaker.org/mudrest/mudpp>.

At the bottom of this page is a curl example you can try.  This code is all checked in to GitHub.  The prettyprinter can be invoked directly after the MUD file is generated with the click of a button.

ToDo: I’d like to combine things a bit when the ACLs are reflexive, so that there are fewer lines.  The example below demonstrates what happens when things get a bit long.

Eliot

curl --location --request POST 'https://www.mudmaker.org/mudrest/mudpp/' \
--header 'Content-Type: application/json' \
--data-raw '{
  "ietf-mud:mud": {
    "mud-version": 1,
    "mud-url": "https://mud.igor-tech.com/mud/igor-networknode-mudfile-v1.json",
	"mud-signature": "https://mud.igor-tech.com/mud/igor-networknode-mudfile-v1.p7s",
    "last-update": "2019-07-30T16:32:28+00:00",
    "cache-validity": 48,
    "is-supported": true,
    "systeminfo": "Network Nodes",
    "mfg-name": "Igor",
    "documentation": "https://igor-tech.com",
    "model-name": "networknodes",
    "from-device-policy": {
      "access-lists": {
        "access-list": [
          {
            "name": "mud-63672-v4fr"
          }
        ]
      }
    },
    "to-device-policy": {
      "access-lists": {
        "access-list": [
          {
            "name": "mud-63672-v4to"
          }
        ]
      }
    }
  },
  "ietf-access-control-list:acls": {
    "acl": [
      {
        "name": "mud-63672-v4to",
        "type": "ipv4-acl-type",
        "aces": {
          "ace": [
            {
              "name": "myctl0-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 80
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl1-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 88
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl2-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 80
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl3-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 88
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl4-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 69
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl5-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 1050
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl6-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 5683
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl7-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50195
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl8-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50196
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl9-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50197
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl10-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50198
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl11-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50199
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl12-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 69
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl13-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 1050
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl14-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 5683
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl15-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50195
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl16-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50196
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl17-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50197
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl18-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50198
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl19-todev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50199
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            }
          ]
        }
      },
      {
        "name": "mud-63672-v4fr",
        "type": "ipv4-acl-type",
        "aces": {
          "ace": [
            {
              "name": "myctl0-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 80
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl1-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 88
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl2-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 80
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl3-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 6
                },
                "tcp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 88
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl4-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 69
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl5-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 1050
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl6-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 5683
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl7-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50195
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl8-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50196
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl9-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50197
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl10-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50198
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl11-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "source-port": {
                    "operator": "eq",
                    "port": 50199
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl12-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 69
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl13-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 1050
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl14-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 5683
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl15-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50195
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl16-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50196
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl17-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50197
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl18-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50198
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            },
            {
              "name": "myctl19-frdev",
              "matches": {
                "ietf-mud:mud": {
                  "my-controller": [
                    null
                  ]
                },
                "ipv4": {
                  "protocol": 17
                },
                "udp": {
                  "destination-port": {
                    "operator": "eq",
                    "port": 50199
                  }
                }
              },
              "actions": {
                "forwarding": "accept"
              }
            }
          ]
        }
      }
    ]
  }
}'

---

From: Michael Richardson <[email-masked]>
Date: Wed, 04 Mar 2020 09:32:39 -0500

Eliot Lear <lear=[email-masked]> wrote:
    >  If you have a MUD file and want to get an HTMLized prettyprinted
    >  version in some freeware code, there’s a new project at
    >  https://www.github.com/iot-onboarding/mudpp
    >  <https://www.github.com/iot-onboarding/mudpp>.  That’s the back end of
    >  all of this.

Can I feed a URL of the mud file in, rather than upload it?

--
Michael Richardson <[email-masked]>, Sandelman Software Works
 -= IPv6 IoT consulting =-

---

From: Eliot Lear <[email-masked]>
Date: Wed, 4 Mar 2020 15:34:27 +0100

> On 4 Mar 2020, at 15:32, Michael Richardson <[email-masked]> wrote:
> 

To date, no.  Is that important?

Eliot

---

From: Eliot Lear <[email-masked]>
Date: Thu, 5 Mar 2020 17:58:12 +0100

> Can I feed a URL of the mud file in, rather than upload it?

And now that works as well (I would hope).

Eliot

---

From: Michael Richardson <[email-masked]>
Date: Thu, 05 Mar 2020 14:33:53 -0500

> To date, no.  Is that important?

If I had a URL like mudmaker.org/nice?http://example.com/foo.json, then I
could feed that into a system like "followthatpage.com", and it would tell me
if the manufacturer made meaningful changes to the MUD file.