Commit Graph

195 Commits

Author SHA1 Message Date
Pranav K 5abd3bf076 Fix build warnings 2016-05-02 11:27:08 -07:00
Pranav K 5e81b89378 Replace IApplicationEnvironment with IHostingEnvironment 2016-04-25 16:54:35 -07:00
Pranav K 31732c3d91 Removing imports from src projects 2016-04-08 06:48:39 -07:00
Ajay Bhargav Baaskaran 5654310a68 [Fixes #130] Added few DataProtectionProvider.Create overloads 2016-04-06 13:10:55 -07:00
Eilon Lipton 7cace9a7fe Fix package metadata 2016-03-24 23:50:57 -07:00
Pranav K f2a42d1f71 Reacting to CoreCLR package changes 2016-03-23 13:00:46 -07:00
Pranav K 8503e161d0 Reacting to CoreCLR package changes 2016-03-19 11:43:51 -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
Pranav K 3d4e0d41c8 Fixing CI build failure 2016-03-11 13:44:34 -08:00
Brice Lambson 9750924973 Don't reference facades 2016-03-10 13:05:04 -08:00
Ajay Bhargav Baaskaran 078cbb5d78 Added Company, Copyright and Product attributes to AssemblyInfo 2016-03-03 17:32:02 -08:00
Pranav K 73cf5b3f84 Fixing build break 2016-03-02 17:07:03 -08:00
Doug Bunting a424475be7 Remove project name from output path
- aspnet/Coherence-Signed#187
- remove `<RootNamespace>` settings but maintain other unique aspects e.g. `<DnxInvisibleContent ... />`
- in a few cases, standardize on VS version `14.0` and not something more specific
2016-03-02 16:36:52 -08:00
N. Taylor Mullen d33c2ac377 Transition to netstandard.
- dotnet5.X => netstandard1.y (where y = x-1).
- DNXCore50 => netstandardapp1.5.
- Applied the same changes to ifdefs.
2016-03-01 13:31:31 -08:00
Ajay Bhargav Baaskaran 3007398648 Enabled xml doc generation 2016-02-19 15:44:54 -08:00
Pranav K 4e68e8f3ab Reacting to CoreCLR package version changes 2016-02-08 09:33:41 -08:00
N. Taylor Mullen 342676925f Update ASP.NET 5 versions for ASP.NET Core.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:39:12 -08: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
Pranav K c8aa4c2c51 Reacting to CoreCLR version changes 2016-01-20 20:39:57 -08:00
Hao Kung f073d0556b React to OptionsModel => Options 2015-12-21 14:47:58 -08:00
Chris R 3809613618 Add missing System.ComponentModel dependency. 2015-12-17 15:37:20 -08:00
Pranav K 6fabd6f064 Removing unused dependencies 2015-12-07 19:09:28 -08:00
John Luo 79fca22b3b Reacting to verbose rename 2015-12-07 11:58:53 -08:00
Pranav K ca3e4669dc Updating tests to use moq.netcore 2015-11-20 14:40:50 -08:00
Pavel Krymets 09f54d6857 Fix build 2015-11-18 12:38:28 -08:00
Pavel Krymets c48173c948 Add event ids to all log calls 2015-11-18 11:36:15 -08:00
Hao Kung 0b808ca75a ConfigureDP => AddDP 2015-11-17 13:46:52 -08:00
Pranav K d09551af46 Reacting to DependencyInjection changes 2015-11-13 10:30:54 -08:00
Troy Dai 4c97cbb9b2 Update Microsoft.Win32.Registry reference's version 2015-11-12 15:28:21 -08:00
N. Taylor Mullen ca2629c004 Remove System beta tag in project.json for coreclr packages. 2015-11-12 12:22:57 -08:00
Cesar Blum Silveira acd8d3d44d Strong name everything. 2015-11-02 15:32:44 -08:00
Pavel Krymets bc80dab39d Compiles and passes tests 2015-10-22 18:15:32 -07:00
Pranav K 1a40e7254d Switching to using generations TFM 2015-10-21 18:31:51 -07:00
Pranav K 9fc75d395d Replace NotNullAttribute with thrown exceptions 2015-10-07 18:05:26 -07:00
Cesar Blum Silveira 76cbb57f9a Fix build on Linux. 2015-10-07 15:06:50 -07:00
Pranav K ad9d75a599 Renaming Microsoft.Framework.* -> Microsoft.Extensions.* 2015-10-03 15:44:36 -07:00
Pranav K 5bf429d212 Adding NeutralResourcesLanguageAttribute 2015-09-10 16:41:24 -07:00
Hao Kung a4144caedd React to options 2015-08-26 16:05:51 -07:00
Pranav K 4342f25ece Reacting to DI changes 2015-08-11 13:04:40 -07:00
Chris R 9bebd183d7 #396 React to CoreCLR Cryptography package refactoring. Remove transitive dependencies. 2015-08-11 10:34:11 -07:00
Troy Dai 7fe2a43b05 Update CoreCLR versions 2015-08-04 10:15:23 -07:00
Victor Hurdugaci 81e8830c67 React to DNX renames 2015-07-29 00:30:44 -07:00
Pranav K 4103d947f4 Merge remote-tracking branch 'origin/release' into dev 2015-07-16 08:26:01 -07:00
mikary bbd57217f2 React to API change in DependencyInjection 2015-07-07 14:40:20 -07:00
Victor Hurdugaci e332375f0e Add repository information to project files 2015-07-01 19:42:39 -07:00
Troy Dai 430c903f65 Add System.IO to framework assemblies 2015-06-04 10:47:36 -07:00
Pranav K 0d3c29f46a Reacting to CoreCLR package updates 2015-05-15 09:57:18 -07:00
Troy Dai 2f09b07adc Package rename: Microsoft.AspNet.DataProtection.Shared -> Microsoft.AspNet.DataProtection.Sources 2015-05-07 10:16:20 -07:00
Troy Dai fe80a65ffc React to common package name change 2015-05-07 09:36:15 -07:00
N. Taylor Mullen c6416f3520 Update LICENSE.txt and license header on files. 2015-05-01 13:45:56 -07:00
Troy Dai 4a58540bdf React to DNX packages name change 2015-05-01 11:05:09 -07:00
Brennan d578779fa6 Revert Runtime.Abstractions 2015-04-29 23:58:04 -07:00
Brennan a1144274a1 React to Interface package renames 2015-04-29 22:42:00 -07:00
Brennan 7ecbee2f7d Interfaces->Abstractions 2015-04-29 17:21:04 -07:00
Matt Ellis d386e78ee6 Use $HOME as a possible storage location
If LOCALAPPDATA and USERPROFILE are both null (as is the case on
Linux/OSX) use "$HOME/.aspnet" as the root folder for data protection
keys

Fixes #76
2015-04-19 21:52:35 -07:00
Pranav K 8983a03fed Reacting to changes in OptionsModel 2015-04-16 16:57:44 -07:00
N. Taylor Mullen 8b9b809ecd Add serviceable attribute to projects.
aspnet/DNX#1600
2015-04-07 14:41:49 -07:00
Doug Bunting 19567ad39d Update .xproj files for Microsoft.Web.AspNet.* -> Microsoft.DNX.* rename 2015-04-02 13:49:24 -07:00
Praburaj 33fa06a25c Fixing dataprotection on IIS
Fixes: https://github.com/aspnet/DataProtection/issues/73

On IIS where there is no user profile, the code tries to always read the 32bit registry view irrespective of the bitness of the worker process. So in case of 64 bit app pools the registry key is null so it falls back to in memory ephemeral repository. On 32 bit app pool it can find an appropriate registry key, but the keyRepositoryDescriptor is not populated resulting in a null reference exception.

Current behavior:
X86 throws
X64 falls back to in memory ephemeral

With fix:
Both X86 and X64 will use DPAPI.
2015-04-01 11:54:24 -07:00
Levi B d2def94712 Reliability: Tweak comparison in key revocation checks 2015-03-18 15:15:58 -07:00
Levi B fd08325918 Skip registry checks on non-Windows platforms 2015-03-18 10:42:09 -07:00
Levi B ca840d3711 Code cleanup in KeyDerivation
- Rename PRF members to be HMAC functions (which is technically correct)
- Use NotNullAttribute where possible
2015-03-17 22:03:43 -07:00
Levi B 271ec1bd4b Move IApplicationDiscriminator to Infrastructure namespace 2015-03-17 20:56:58 -07:00
Levi B 22927ec289 Add simple file-based provider instantiation APIs 2015-03-17 15:36:58 -07:00
Levi B 84490846b6 Move time-limited data protector to Extensions project 2015-03-17 14:52:15 -07:00
Levi B 94233e76ff Remove experimental .Azure project 2015-03-17 10:45:21 -07:00
Levi B d673df7ef3 Reliability improvements to key ring updates
- Optimistically treat failures as transient and continue to use any existing cached key ring for a short period of time
- Updates to the key ring shouldn't block other threads; they can use the outdated version while waiting for the update
2015-03-17 00:46:24 -07:00
Levi B 612a81d9ce Defer processing <key> descriptors until necessary
- Make CreateNewKey more robust against bad key repositories
- Don't hide key deserialization errors
2015-03-16 23:32:20 -07:00
Levi B 4365b531d8 Use C# 6 string interpolation feature
Provides cleanup in logging and removes calls to String.Format
2015-03-16 21:38:21 -07:00
Levi B 0966e37d94 Doc comment cleanup on GetApplicationUniqueIdentifier 2015-03-14 15:43:39 -07:00
Levi B 82d92064c5 Continued API improvements and refactoring
- Add helpful extension methods to Interfaces project
- Auto heuristic detection now writes default protection settings to the ILogger
- Cleanup dead methods / add useful methods in DataProtectionConfiguration
- Update System.Web compatibility project to allow mapping MachineKey.Protect directly to IDataProtector.Protect
2015-03-14 14:29:39 -07:00
Levi B bf7283697d Flow logging through the AuthenticatedEncryption types 2015-03-12 16:12:17 -07:00
Levi B 7fe33e8159 DataProtectionServices should prefer registry over defaults
Comment cleanup in CNG-GCM ExportToXml
2015-03-12 14:22:45 -07:00
Levi B 4f2288c3da Introduce concept of a "fallback key"
This key is used if there is no preferred default key and the developer has disabled automatic key generation. This will keep the service from falling over if the keys are not rolled and they all expire.
2015-03-11 19:39:41 -07:00
Levi B 58c823bc45 Rename KeyLifetimeOptions -> KeyManagementOptions
Simplify default key resolution logic
Introduce API for disabling automatic key generation
2015-03-11 19:39:35 -07:00
N. Taylor Mullen 8c7a47fb00 Update .kproj => .xproj. 2015-03-11 14:05:01 -07:00
Levi B bb1b49cc1c Fix PoliCheck violations. 2015-03-10 23:40:39 -07:00
Levi B e8cc1106d8 Significant refactorings throughout the data protection stack
- Move IDataProtectionProvider, IDataProtector, and extension methods to their own package
- Simplify the APIs for registering and configuring the system
- Default implementation now auto-detects capabilities of OS
- Use EncryptedXml for X.509 certificate-based encryption
- Add ability to escrow secret material upon key creation
- Use centralized system policy for default algorithm selection
- Simplify System.Web compatibility layer
- Add unit tests, logging, and doc comments throughout solution
2015-03-10 22:43:45 -07:00
N. Taylor Mullen 8f0b9a56b8 Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:52:23 -07:00
N. Taylor Mullen cb5e7d82f9 Update aspnet50/aspnetcore50 => dnx451/dnxcore50. 2015-03-08 12:48:15 -07:00
Brennan 88eb10dcfe DI API changes 2015-03-05 14:21:35 -08:00
Hao Kung 32ff156923 React to DI changes, AddDataProtection no longer takes Config 2015-03-04 16:35:33 -08:00
Levi B bf0f94ce20 Store reg keys in a different folder to mitigate impact of renaming changes 2015-02-26 23:46:02 -08:00
Levi B e4db4b1189 Temporarily store keys in different folder to resolve issues caused by package renaming 2015-02-26 10:35:40 -08:00
Levi B e2ca9fc652 Rename to Microsoft.AspNet.DataProtection
from Microsoft.AspNet.Security.DataProtection
2015-02-25 16:49:33 -08:00
Levi B 544c83812c Add unit tests for WeakReferenceHelpers
Doc comment cleanup on IOptimizedAuthenticatedEncryptor
2015-02-24 18:19:31 -08:00
Levi B ab18f52e98 Add CreateProtector convenience extension method 2015-02-24 17:48:29 -08:00
Levi B 6637cb264f Split KeyDerivation into its own project
Move shared crypto code to a common project
2015-02-24 16:20:10 -08:00
Levi B 8ec6dc3712 Code cleanup
Rename IAuthenticatedEncryptor2 -> IOptimizedAuthenticatedEncryptor
Rename ProtectedMemoryBlob -> Secret
Add some missing doc comments explaining
2015-02-24 15:49:30 -08:00
Pranav K 71a2712c5a Reacting to XDocument verson change 2015-02-19 10:15:18 -08:00
Levi B 04e7bca8bf Normalize .kproj files BOM and line endings 2015-01-20 13:49:29 -08:00
Pranav K 8136affef9 Updating exception filters to use when instead of if 2014-12-16 10:21:48 -08:00
Victor Hurdugaci 0c841f934e Add schema version to kproj files 2014-11-25 10:36:04 -08:00
Hao Kung f3e9381f16 GetServices -> AddDataProtection 2014-11-24 16:40:13 -08:00
Levi B cce11ad2ae Update .kproj files to follow modern conventions 2014-11-05 14:48:56 -08:00
David Fowler e1a88b6503 Merge branch 'release' into dev 2014-10-31 03:04:33 -07:00
David Fowler 1768bfd25f Added package descriptions 2014-10-31 03:00:59 -07:00
Levi B fc4213b1f8 Reliability: Don't compile against 'experimental' language features.
This will help prevent Roslyn changes from breaking us.
2014-10-27 16:18:42 -07:00
Levi B 5899177af2 Merge branch 'release' into dev 2014-10-27 15:31:23 -07:00