ayende/ravendb — pull request #277 by mj1856 (2013-03-07 17:17:29+00:00)
Title: Added ILicenseProvider plugin

Currently there are only two ways to provide a RavenDB license:

- By dropping a license.xml file into the raven directory.
- With the `Raven/License` setting.

In embedded mode, the `Raven/License` setting can easily be applied when starting the embedded raven instance.

But in server mode, the only place to set `Raven/License` is in the `Raven.Server.exe.config` file, in the `appSettings`.

As an ISV with the "ISV Server" license, when I deploy my application I have to include the RavenDB server and my license. But I don't want the license to be easily found by someone browsing the directory or looking in my config file. They might take that license and use it on another RavenDB server for their own purposes.

This pull request adds a third option - to provide the license via a plugin. I can now write a bundle for my application and include the license as an embedded resource. I could even encrypt that resource string if I wanted to. I can put other things in the bundle that are specific to my application, such as checking that certain documents or index exist, etc. This will keep others from using my license outside of my application.