Commit Graph

11 Commits

Author SHA1 Message Date
Nate McMaster fe83e69b1a Add a startup filter which initializes the key ring before the server starts 2017-06-02 11:31:16 -07:00
Nate McMaster 285b973a5c Use IHostingEnvironment to determine application identifier
Reverses changes made in #230
2017-06-02 11:27:25 -07:00
Nate McMaster b706a75e03 Target .NET Standard 2.0
This retargets all data protection libraries to ns2.0. This means .NET
Framework applications will need to upgrade to .NET Framework 4.6.1.
This upgrade makes available API to .NET Core that was previously only
available on .NET Framework, such as encrypting keys at rest with
certificates.

New API for .NET Core users:
- IDataProtectionBuilder.ProtectKeysWithCertificate(string thumbprint)
- CertificateXmlEncryptor
- ICertificateResolver
- DataProtectionProvider
  - .Create(string applicationName, X509Certificate2 certificate)
  - .Create(DirectoryInfo keyDirectory, X509Certificate2 certificate)
  - .Create(DirectoryInfo keyDirectory, Action<IDataProtectionBuilder>
  setupAction, X509Certificate2 certificate

Other minor changes in this commit:
- Fixed samples that were using obsolete logging API
- Remove calls to api-sets, instead using kernel32. .NET Core 2.0 no
longer requires using api-sets as Nano Server now forwards kernel32
calls
- Made minor improvements to the TypeForwardingActivator
- Remove dead code an unused api baselines
- Enable more tests on macOS/Linux that previously only ran on Windows
2017-05-24 09:47:10 -07:00
Nate McMaster 4dad47eeab Ignore assembly version when activating DataProtection types from string name (#223) 2017-04-25 14:29:26 -07:00
Pranav K 91406009d3 Remove net451 as a cross-compile target 2017-03-23 17:20:12 -07:00
Ajay Bhargav Baaskaran 1ce7fc7245 Use TryAdd to add services 2017-03-15 17:57:44 -07:00
Ajay Bhargav Baaskaran cde3b96aa7 [Fixes #134] Refactored DI support
- Refactored builder extensions and service collection extensions
- Refactored Settings/Configuration/Descriptor
- Removed ConfigurationCommon/AuthenticatedEncryptorConfigurationExtensions
- Added IAuthenticatedEncryptorFactory and implementations
- Refactored IKey to have Descriptor instead of CreateEncryptorInstance()
- Handled Repository/Encryptor special logic
- Added samples
- Updated tests
2017-03-14 19:58:46 -07:00
Pavel Krymets 47d3ffdddc Add activator fallback to support rc1 keys 2016-06-03 12:27:17 -07:00
jacalvar aa1495deb0 [Fixes #120, Fixes #121, Fixes #122] Make data protection follow the options model
* Add an IDataProtectionBuilder interface and move methods on DataProtectionConfiguration
  to extension methods on IDataProtectionBuilder.
* Make AddDataProtection return an IDataProtectionBuilder instance for further configuration.
* Make AddDataProtection take in an action with a GlobalConfigurationOptions parameter instead
  of a DataProtectionConfiguration parameter.
* Make DataProtectionProvider static
* Remove ConfigureGlobalOptions
* Change Option suffix in classes that are not actually options to Settings.
* Add extension method for configuring key management options.
* Cleanups.
2016-03-15 15:20:59 -07:00
N. Taylor Mullen 43dfd15a01 Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:32:33 -08:00
N. Taylor Mullen b87a8001fe Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:16:08 -08:00