dotnet-foundation / project-maturity-model

Proposal/RFC for new .NET library development model.
MIT License
39 stars 8 forks source link

Questions: The Bogus open-source project #8

Open bchavez opened 5 years ago

bchavez commented 5 years ago

Hi everyone,

I think what the .NET Foundation is doing is great with OSS projects and kinda wanted to talk about a few things.

I'm the maintainer and creator of github.com/bchavez/Bogus. NuGet here. Bogus has 2.7M NuGet downloads and 2,279 GitHub stars. Probably somewhere in the top 40 C# projects on GitHub. Also, Microsoft has started taking a dependency on Bogus (see Microsoft Docs here).

The TL;DR; on Bogus is that it's a really cool library that helps generate realistic but fake-looking data. Generally, you use Bogus to test UI or seed databases with test data.

I'm trying to decide if pursuing the Project Maturity Model is right for Bogus. I care very much about my users and that's the main reason I'm here.

Sometime in 2015, I wrote Bogus to test my applications for .NET. Also, I wanted Bogus to fill a huge gap in the .NET ecosystem. Bogus seemed to solve the same problems that many other developers had too; hence the success thus far.

The foreseeable future of Bogus still seems bright because the issues of privacy and protecting personal information are still hot button topics in tech.

I don't want to say I did it alone because I've had some great PRs from absolutely fantastic contributors. But for the most part, the whole operation has been a one-person show; from making all the design decisions to code reviews and releases, etc. I really love maintaining Bogus. I don't suffer from maintainer burn out in any way shape or form.

At some point, I decided to monetize on the success of Bogus by creating Bogus Premium (a closed-source project, not available on GitHub). Premium is a paid yearly subscription that extends Bogus' datasets with industry-specific data like Idc9 medical codes for the health-care industry. Premium also offers some extra tooling making Bogus easier to use. The purpose of Premium was also to establish a sustainable model for the core Bogus project.

Licenses for Bogus Premium are sold by my very small 1-2 person business Bit Armory Inc. So far, I've had customers from governments and corporations to individual developers supporting Bogus through their licenses of Premium. I thank soo much and love each paying customer because they help me eat and pay rent at the end of the day. :heart:

My questions are:

I just wanted to get a sense of the scope of the .NET Foundation's new project maturity model and see if it could strengthen the future for Bogus users. Thank you for your time and congrats on .NET Core 3 :balloon:

Thanks, Brian Chavez

clairernovotny commented 5 years ago

Hi Brian,

Great questions! I'll let some of the others chime in as well, but I had one question about the assembly signing you mention -- do you mean strong naming the assembly or something else? For OSS projects, it's considered a best practice to check in the strong name key to the repo. Strong name keys do not provide any security, it's pretty much just a cryptographic name. They're only verified on .NET Framework, and only in very limited circumstances (installation to the GAC and loading in another AppDomain). It's ignored on any other platform.

For versioning, we still need to work out the details on what reproducible means. I would tend to expect it to be based on a file committed to the repo, like a version.json. Tools like Nerdbank.Gitversioning work very well here, auto versioning based on a seed file so that any commit is reproducible.

I don't see any inherent reason you can't have a core MIT licensed project and then build on that into a closed-source private product. That's perfectly within the scope of the MIT license.

bchavez commented 5 years ago

Hi Oren,

My apologies for the confusion! Thanks for the response!

You're right, I was referring to the strong naming of the Bogus.dll core assembly. The strong name key is available in the Bogus repo named as Bogus.snk.enc; however, the strong name file key is encrypted and can only be decrypted on CI/CD when I've tagged the repository with a version number for a release using my GitHub account.

Users are free to compile Bogus using their own strong name unencrypted .snk file; however, the Premium tools manually inspect the public strong name of Bogus.dll at runtime on their own terms independent of the runtime's verification checks. If the public strong name wasn't created with the decrypted Bogus.snk.enc the Premium tools won't work.

Also, the license verification algo is public and part of the Bogus.dll core assembly. The public is welcome to change the algorithm but doing so and using a different .snk file won't circumvent the licensing for Premium provided the closed-source tools aren't cracked too.

Another reason I prefer to keep the strong name key private is there was a false-positive security incident related to Windows Defender + Bogus back in May. It seemed easier tell users to sn -vf Bogus.dll and provide them with public key info rather than to provide an exhaustive set of SHA256 hashes of specific cross-platform versions of Bogus.dll to ensure nothing had been tampered with.

richlander commented 5 years ago

First, congratulations on building a project that you love and that has enabled you to create a business. That's awesome and I enjoyed reading your story.

Everything you wrote seems compatible with this program. The program is "pro-open source" and is absolutely not "anti-commercial". There are specific call outs in the doc for corporate-backed projects, so that is a good indicator that commercial scenarios are a key part of the story, as long as they are open source.

We'll write more on reproducible builds. I hadn't thought about the issue with keys, so that's a good use case to cover when we write up docs on it.

As @onovotny is kindof suggesting, you may be placing more emphasis on strong name signing than is deserved. That said, the model you have with your premium tools seems fine.

If that's enough, feel free to make a PR to register your project. Otherwise, we can answer more questions.