bchavez / RethinkDb.Driver

:headphones: A NoSQL C#/.NET RethinkDB database driver with 100% ReQL API coverage.
http://rethinkdb.com/api/java
Other
384 stars 134 forks source link

Support for SSL/TLS in RethinkDB C# Driver #110

Closed bchavez closed 7 years ago

bchavez commented 7 years ago

This pull request establishes support for SSL/TLS endpoints to RethinkDB Server (and consequently permits connections to compose.io).

However, the new SSL/TLS features in the C# driver require a commercial subscription license for use. The subscription cost is $8.00 per month. Licenses can be purchased here: https://www.bitarmory.com/payments/rethinkdb

The SSL/TLS features are locked until a licenseTo and licenseKey are supplied:

var conn = R.Connection()
    .Hostname("ssl.server.com")
    .EnableSsl(
        new SslContext{ .... },
        licenseTo: "Some Company",
        licenseKey: "encrypted_key"
    )

licenseKeys are emailed after a subscription has been purchased at the link above. Additionally, revoked or terminated subscriptions can be blocked from future NuGet updates, so there's an incentive to keep the subscription on-going.

I decided to license the SSL/TLS code under a commercial license for a few reasons:

  1. It gives me an incentive to continue providing ongoing maintenance:
    • Tooling updates (VS 2015 -> 2017 RTM .NET Core tooling)
    • Triaging GitHub issues and Slack questions
    • Third-party library compatibility (ie: Newtonsoft)
  2. To give assurance to corporate users that someone will be around to maintain the C# driver for the foreseeable future.

Additionally, the RethinkDB binaries are now digitally signed with a strong name to cover scenarios in large corporate environments that have policies of running only signed assemblies.

R:\>sn -Tp RethinkDb.Driver.dll

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Public key (hash algorithm: sha1):
002400000480000094000000060200000024000052534131000400000100010017e43087df41ac
39c7ffe05198e07a2012e3365581cf9bb4fce8e2b0364835c6259e362cc7cb2fe148583d21f746
ef8a899b6cc26af8ebde5d42b897f7d9e5c6a99de7247011f1b28a37ae145c4a5d62ea6b7a06ff
dc8922dbd7478769b34be50e5342c945db0bc08c39bce7f4c330ed3c1eabeea0501601879ed1b8
6c7a5db9

Public key token is 289e75d5145ae4e6

R:\>sn -vf RethinkDb.Driver.dll

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly 'RethinkDb.Driver.dll' is valid

Related: https://github.com/bchavez/RethinkDb.Driver/issues/50

:watch: :city_sunset: "I just can't wait... I just can't wait... for saturday night..."