Which Open Source License to choose for an ASP.NET MVC 3 OpenId StarterKit

licensingopen source

I've built a ASP.NET MVC 3 (RC at the moment) site that uses OpenID login system. I was still learning about OpenID while implementing this so I commented the code heavily. The result is a site that let's users login/register with OpenID, add other OpenIDs to their account and also remove them. This little project can be then used as a starting point for any new project that would use OpenID login system. It can also be used as a resource for people to learn OpenID with.

I decided to release this project as open source. This will be my first open source project and I need to decided what license to use. I want people to be able to use this for any purpose they wish for. They can learn from it, use it for commercial or non-commercial projects and make their own forks of the code. It would also be nice for others to be able to contribute back to the project with stuff like bug fixes on sites like GitHub. But I'd like to be the copyright owner of the code that is under my control. For example the code that is in my GitHub repository (I'll call this the main code base). I've heard that for this I need to get every contributor, that adds code to this code base, to give me the copyright for their contribution. How exactly does this work?

I also use other licensed (mostly open source) resources in my projects. Here's their list and their licenses:

  • DotNetOpenAuth (Ms-PL)
  • T4MVC (part of MvcContrib which is licesned using Apache License 2.0)
  • ASP.NET MVC (Ms-PL)
  • ADO.NET Entity Framework CTP4 (I couldn't find a license)

I of course want to use the main code base for any type of projects I want. Commercial, non-commercial, open source, …

So I have some very important questions here:

  1. Which license should I use? I think GPL or LGPL is not suitable here. I was looking at Apache 2, New BSD, MIT and Ms-PL. Ms-PL seems to be a good fit as, but I'm not sure.
  2. What restrictions and/or obligations do I have towards the resources I use in this project? I think I read somewhere that I have to add -LICENSE.txt for Ms-PL resources. Is that true? How does this work for Apache 2 and other licenses? What do I have to do if I modify any of these resources' code and then use that in my project?
  3. I'd also really like a "as-is" clause in the license, so people can't sue me if something goes wrong while they're using my code.
  4. Do I need to add anything to my files to make clear what the license is? If so, how do I format that?

Also one last thing. If I decide to make a Visual Studio template out of this samples how do I license that?

Best Answer

Since you're using MS-PL and Apache 2.0 components, you're restricted by the MS-PL license and the Apache 2.0 license. This means you can't use the GPL anyway, since it's incompatible with MS-PL, and version 2 of the GPL is also incompatible with Apache 2.0. Given that, I would suggest releasing your parts either under MS-PL, Apache 2.0, or a BSD-style, so you're not adding requirements.

You can read the licenses to see what you have to do. They aren't long. With MS-PL, you can do pretty much everything as long as everything's released under MS-PL and you include the entire license (which isn't long). With Apache 2.0, it's pretty much the same, except that you need to include any NOTICE file. You do have to include all attributions, etc., and that's pretty standard across OS licenses.

You really can't add to the licenses. You are free to put any disclaimers you want. You can put them in a NOTICE file, which under Apache 2.0 requires them to be preserved.

You should list which files are under which licenses, and you do have to include full copies of MS-PL and Apache 2.0 in the package.

Be careful about ADO.NET Entity Framework CTP4, as you say you can't find a license. If you can't find a license, ordinary copyright law applies, and you can't legally use it. You may want to write to whoever owns that code, and see what license they use.

As far as copyright ownership goes, you can never retract open source licenses for the versions you release under them, but if you own all applicable copyrights you can relicense as you wish. Some companies, like MySQL AB, released what they had under the GPL, and would sell other licenses for money, so that (say) another company could use MySQL as a part of their commercially sold product without having to release under the GPL.

Since you're using components owned by other people, you really can't do that with the entire project, but you could with your portions.

To do that, you'd have to get everybody who contributes to fill out a copyright assignment form, along with some proof that they do own the copyright (and, for example, that it doesn't count as work for hire for an employer). This does tend to diminish user contributions, so you may want to skip it entirely. You might want to look at what the Gnu project does, since they do want complete copyright, and emulate them.

Related Topic