[Oisf-wg-configuration_language] YAML issues.

Jason Ish jason.ish at endace.com
Thu Aug 20 16:59:21 UTC 2009


So while doing some work with YAML we ran into a few issues that I'd like to
bring up here.  They all revolve around defining variables/macros.

With respect to HOME_NET and EXTERNAL_NET equivalents you might want to do
something like:

vars:
  HOME_NET: 172.16.1.0/24
  EXTERNAL_NET: !$HOME_NET

Note: YAML doesn't do the variable expansion for us, that would be the app.

The issue here is that "!" can't be used outside quotes in YAML as it has
special meaning.  The ":" character also has special meaning.  So if we want
Snort like variable definitions, we need to quote everything.  For example:

vars:
  HOME_NET: "172.16.1.0/24"
  EXTERNAL_NET: "!$HOME_NET"
  HTTP_PORTS: "[80, 8080]"
  WINDOWS_HOSTS: "[192.168.0.0/16, ![192.168.45.0/24, 192.168.46.0/24]]"
  PRIV_PORTS: "1:1024"

>From a programming point of view we now have to write our own code to parse
the variable values into something usable, when ideally we'd let the YAML
parser do it for us.

On the other hand YAML does work pretty well for other types of structures,
for example:

---
default-log-dir: /var/log/ids

tcp:
  max-sessions: 256K
  session-on-syn: true
  checksums: yes
---

In comparison, a custom grammar could be tailored exactly to our needs, and
if done write could map well to something like XML should someone desire to
do a converter.

Anyways, the team would like to open this up for a little more comments and
discussion.  Anyone?

Thanks,
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openinfosecfoundation.org/pipermail/oisf-wg-configuration_language/attachments/20090820/c4600ee2/attachment-0002.html>


More information about the Oisf-wg-configuration_language mailing list