Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled password encryption on .NET Core/Windows #813

Merged
merged 1 commit into from
Aug 9, 2016

Conversation

alpaix
Copy link
Contributor

@alpaix alpaix commented Aug 9, 2016

Fixes NuGet/Home#1851

Enabled password encryption of source and proxy credentials on all Windows
frameworks by replacing #if !IS_CORECLR with RuntimeEnvironmentHelper.IsWindows

Updated tests.

Also fixes NuGet/Home#2065

Introduced Platform xUnit trait to be able running OS specific tests.

On Windows:

xunit <test-project> -notrait Platform=Linux -notrait Platform=Darwin

On Linux

xunit <test-project> -notrait Platform=Windows

//cc @emgarten @joelverhagen @rrelyea @rohit21agrawal @drewgil @jainaashish

@@ -55,8 +55,8 @@ do
if grep -q "netcoreapp1.0" "$testProject"; then
pushd $testDir

echo "$DOTNET test $testDir --configuration release --framework netcoreapp1.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't build.sh on Mac have -notrait Platform=Linux? And similar for build.sh on Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! It definitely should.

@joelverhagen
Copy link
Member

How does a user of .NET CLI on Windows create a config file with an encrypted password? Does he have to use nuget.exe?

#else
if (!RuntimeEnvironmentHelper.IsWindows)
{
throw new NotSupportedException("Encryption is not supported on non-Windows platforms");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this to be a resource string.

@alpaix
Copy link
Contributor Author

alpaix commented Aug 9, 2016

That's right the only way for a user to add encrypted credentials is to run nuget sources ...

@emgarten
Copy link
Member

emgarten commented Aug 9, 2016

Add resource string and :shipit:

@joelverhagen
Copy link
Member

That's right the only way for a user to add encrypted credentials is to run nuget sources ...

Let's log an issue to add a test for this. As it stands today, we are lighting up a feature for .NET CLI on Windows without any end-to-end tests covering that feature.

:shipit:

@jainaashish
Copy link
Contributor

LGTM :shipit:

Fixes NuGet/Home#1851

Enabled password encryption of source and proxy credentials on all Windows
frameworks by replacing `#if !IS_CORECLR` with `RuntimeEnvironmentHelper.IsWindows`

Updated tests.

Also fixes NuGet/Home#2065

Introduced `Platform` xUnit trait to be able running OS specific tests.

On Windows:
```
xunit <test-project> -notrait Platform=Linux -notrait Platform=Darwin
```

On Linux
```
xunit <test-project> -notrait Platform=Windows
```
@alpaix alpaix force-pushed the alpanov/encryption branch from 896508d to bb7f380 Compare August 9, 2016 20:39
@alpaix alpaix merged commit bb7f380 into NuGet:dev Aug 9, 2016
@alpaix alpaix deleted the alpanov/encryption branch August 9, 2016 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nuget source password encryption story Add a xUnit trait(s) to indicate platform specific unit-tests
5 participants