snoyberg/keter — pull request #25 by AaronFriel (2013-08-29 01:13:11+00:00)
Title: Wildcard hostname support for Keter

I haven't done much testing on this, but I thought you'd like to have the changes sooner rather than later and based off a recent commit. I have tested it with personal sites but, again, not exhaustively, and I'm not totally confident in this change.

The thing I'm least certain about is the implementation of `notMember` and its semantics, w.r.t. allowing wildcards in applications. As `notMember` is implemented based on the semantics of `lookup`, i.e.: when a `lookup` would fail, then `notMember` returns true. But this is probably the wrong semantics, consider the case that we wish to reserve both of the following hostnames:
* `*.example.com`
* `foo.example.com`

Ideally if we reserve the hostnames in this order for two separate apps, `notMember` should return true for `foo.example.com`. The *specific* host name `foo.example.com` is not a member of the LabelMap. But a `lookup` for `foo.example.com` will return a valid result (due to the wildcard) and thus `notMember` will return false.

So I probably need to fix that, and come up with some tests using a few different keter bundles. Please try out this pull request and let me know if you find any other inconsistencies or issues.