Skip to content

Add support for credential persistence #480

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

Merged
merged 22 commits into from
Jan 14, 2022

Conversation

cansuerdogan
Copy link
Contributor

PR Summary

  • Add an -Authentication parameter to the Register-PSResourceRepository
  • Add an authentication dimension to the PSRespositoryInfo object
  • The -Authentication parameter will take a hashtable which specifies the vault and secret where the credential is stored
  • Detailed error messaging to indicate why authentication failed (SecretManagement wasn't installed, no vault was available, the vault couldn't be reached etc.)
  • Since not all repositories requires authentication (principally PSGallery) PowerShellGet will not take a dependency
    on SecretManagement
  • When <x>-PSResource is called and the prioritized repository is determined, a check will also be made to the Authentication property

PR Context

Add functionality for supporting credential persistence as discussed in issue #330.

PR Checklist

@ghost
Copy link

ghost commented Aug 30, 2021

CLA assistant check
All CLA requirements met.

@alerickson
Copy link
Member

Thanks @cansuerdogan for this PR! It's very thorough and looks good so far, @anamnavi and I are reviewing and will update you shortly. Just adding a couple of small nitpicks right now.

@cansuerdogan
Copy link
Contributor Author

Thank you @alerickson! Please let me know if you have any questions.

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

Just started reviewing the code, and have a few initial comments.

@cansuerdogan cansuerdogan changed the title Add support for credential persistence WIP: Add support for credential persistence Sep 13, 2021
@PaulHigin
Copy link
Contributor

I didn't get to this PR this week, but will make it a high priority to review early next week. Sorry for the delay.

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

Overall I think this is a good start. However, I feel a number of changes should be made and/or considered.

The cmdlet parameter should be -AuthenticationInfo instead of -Authentication. The latter usually refers to authentication type, whereas the former indicates information used for authentication.

The -AuthenticationInfo parameter should take a concrete type (AuthenticationInformation) instead of a hashtable type. This way we don't have to repeatedly check the hashtable for the required name/value pairs. Basic validation can be done at binding (non-null, not-empty values). Also, hashtable syntax can still be used to pass the authentication information, since PowerShell will automatically convert to the concrete type during parameter binding.

# This still works, even though -AuthenticationInfo takes a 'AuthenticationInformation' class type.
Register-PSResourceRepository -Name MyRepo -URL https://MyRepo -AuthenticationInfo @{ VaultName='MyVault'; SecretName='MyRepoCreds' }

I think we should also consider a parameter set option that automatically persists credentials when they are provided. Something like:

Register-PSResourceRepository -Name MyRepo -URL https://MyRepo -ProxyCredential $credentials -PersistCredentials @{ VaultName='MyVault'; SecretName='MyRepoCreds' }

We should be consistent and persist PSCredential type in the SecretManagement vault (since we pass in PSCredential type for -ProxyCredential parameter.

We should use PSCmdlet.InvokeCommand.InvokeScript() API to invoke the SecretManagement Get-Secret, Set-Secret commands. This will run the command in the current cmdlet context and allow the vault to prompt the user for a passkey if needed. For example the SecretStore vault defaults to 'password required' configuration and user prompting for password when needed.

We should try to do AuthenticationInfo validation as early as possible.

We need to make sure reported errors are useful and not confusing, in cases where SecretManagement is not installed/configured correctly.

  • SecretManagement not installed
  • Vault not found
  • Secret not found

Not sure, but we may want to catch errors and wrap them in our own to provide better context.

@cansuerdogan
Copy link
Contributor Author

Thank you @PaulHigin for the feedback! Sorry I was away for a few days but I will try to get your suggestions implemented and pushed hopefully by EOD tomorrow.

  • I already verified PSCmdlet.InvokeCommand.InvokeScript() works last week but I still need to spend some time on error messages.
  • I will rename the parameter and change the type it expects.
  • Just to make sure I'm understanding the -PersistCredential proposal:
    • Have a parameter set for the combination of -ProxyCredential and -PersistCredential
    • If -ProxyCredential is provided by itself, proceed as it is now, i.e. don't save the credential anywhere
    • If both are provided, call SecretManagement\Set-Secret with the credential and authentication info passed in

Is this correct? If so, do we want to maybe take in only the VaultName and use the username from PSCredential as the secret name? Because when it's time to pass credential into the Nuget library call, we are assuming SecretName is the username.

@PaulHigin
Copy link
Contributor

@cansuerdogan
I think we still need to talk through the proposals, and decide on how to proceed. We hope to do this internally (early) next week, and then I think it would be good to have a live chat with you, if you are available. In the mean time it may not be worthwhile to make too many code changes. My aim is to soon have a list of action items that we all agree on.

@cansuerdogan
Copy link
Contributor Author

Hi @alerickson, @anamnavi and @PaulHigin,

It has been a while sorry! I can finally get back to working on this pull request. Do you still have the notes from our meeting by any chance?

Here is what I remember:

  • Parameter name will be changed to CredentialInfo
  • I will be adding a concrete type for CredentialInfo which will have the following:
    • String VaultName
    • String SecretName
    • PSCredential Credential
  • Register-PSResourceRepository will at the very least take VaultName and SecretName as part of CredentialInfo, but optionally, users can also pass in a PSCredential to save the secret in the provided vault
    • If only VaultName and SecretName are passed in, PowerShellGet will NOT print out a warning regarding SecretManagement setup since this can come later
    • If additionally a Credential is passed in and SecretManagement setup is wrong or incomplete, PowerShellGet will throw a terminating error and will not register the repository
  • We will keep the PowerShell Invoker implementation for importing and using SecretManagement as part of PowerShellGet but try to add more meaningful error messages where things may go wrong

Are these accurate? Please let me know if I'm missing anything or misremembering any part.

Thank you!

@alerickson
Copy link
Member

Hi @cansuerdogan just wanted to check in. We are targeting mid December for our next release, with all changes in by the end of the month so we can have a couple weeks to do manual testing and validations. This PR certainly doesn't need to be in by then, but I just wanted to keep you updated.

@cansuerdogan
Copy link
Contributor Author

Hi @alerickson! I had some time off in between so I wasn't able to get back to this PR sorry. Can you please confirm if what I remembered from our discussion (summarized in this comment) was correct? If so I'll get started on those changes and we can sync up after I have them implemented. Thank you!

@SydneyhSmith
Copy link
Collaborator

Thanks @cansuerdogan your notes from the meeting all look correct, thanks for following up! It would be awesome to know when you may have a chance to return to this work--thanks so much!

@cansuerdogan
Copy link
Contributor Author

@SydneyhSmith Sorry for the delay on this! I will try to finish this up by end of next week.

@StevenBucher98
Copy link
Collaborator

StevenBucher98 commented Dec 2, 2021

Thanks for the update @cansuerdogan, we are planning for a new release on Wednesday (12/8, so it would need to be in this week) so we might not be able to fit it in that release but will shoot to include it in the next release earlier in the new year! Thanks so much!

@cansuerdogan
Copy link
Contributor Author

Thank you for the heads-up @StevenBucher98 ! Good luck with the new release!

@cansuerdogan cansuerdogan changed the title WIP: Add support for credential persistence Add support for credential persistence Jan 6, 2022
Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

Sorry for the delay in the review. Thanks for doing this work! Overall changes look good, most comments are just style changes.

Copy link
Contributor

@PaulHigin PaulHigin left a comment

Choose a reason for hiding this comment

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

LGTM. Again, thanks for your contribution!

@alerickson alerickson self-requested a review January 14, 2022 22:18
Copy link
Member

@anamnavi anamnavi left a comment

Choose a reason for hiding this comment

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

had 2 minor nitpicks, but LGTM. Thank you for your contribution, this looks great :)

.gitignore Outdated
@@ -3,3 +3,4 @@ src/code/obj
srcOld/code/bin
srcOld/code/obj
out
result.pester.xml
Copy link
Member

Choose a reason for hiding this comment

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

is this necessary or were you creating this file locally to output the tests to and trying to ignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was running the tests locally to verify and did not want to commit this file that gets generated. I can remove it if you'd like.

Copy link
Member

@anamnavi anamnavi Jan 14, 2022

Choose a reason for hiding this comment

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

That makes sense, if you can remove it though that would be appreciated :)

$credentialInfo.Credential.GetNetworkCredential().Password | Should -Be "password"

}
}
Copy link
Member

Choose a reason for hiding this comment

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

please add a newline; nitpick

@anamnavi anamnavi merged commit 1242151 into PowerShell:master Jan 14, 2022
@cansuerdogan
Copy link
Contributor Author

Thank you all for your guidance and collaboration!

anamnavi pushed a commit that referenced this pull request Sep 7, 2022
add support for credential persistence
PaulHigin added a commit that referenced this pull request Jan 10, 2023
* Create private cancellation token in InstallHelper (#422)

* Remove unneeded PR trigger and enable tests on Linux and macOS platforms (#424)

* Remove unneeded PR trigger

* Enable tests on Linux and macOS

* Update README.md (#423)

* Add updates to complete Tests for Install, Save, Publish, Get-Installed, and Uninstall tests. (#420)

* Ensure URI creation is cross platform compatible (#421)

* change URI creation, and resolve Unix tests

* Add fix for failing unix tests (#426)

* Update cmdlet (#407)

* Set up CI with Azure Pipelines

[skip ci]

* Set up CI with Azure Pipelines

[skip ci]

* Set up CI with Azure Pipelines

[skip ci]

* create new src directory

* create new test directory

* Begin refactoring Install

* Fix bug in GetHelper class related to debug statement

* Major refactors to Install helper

* Update utils class

* incorporate bug fixes

* Add install bug fixes and tests

* Update project to C# 7.2

* Add scope tests

* create new src directory

* made changes to paths created in InstallHelper and use Scope as string

* Incorporate bug fixes for accept license, scripts, and installation paths

* Add more install tests

* remove comments used for debugging earlier

* Clean up code and tests

* remove some files accidentally added

* Change scope to be a an Enum type

* Delete azure-pipelines-1.yml

* Delete azure-pipelines-2.yml

* Delete azure-pipelines.yml

* Address bugs introduced from changing Scope type to enum

* Incorporate review feedback, clean up code a bit

* Remove input object parameter

* Remove string comparison in install helper

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update src/code/PSResourceInfo.cs

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Address some code review suggestions

* Add comments and incorporate other code review changes

* add tests for Update

* Add save functionality

* Update InstallHelper with Save changes

* remove NoClobber as Update parameter

* Update src/code/InstallPSResource.cs

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Incorporate further code review changes

* add IsPRerelease to AdditionalMetadata

* resolve prerelease label issue

* fix merge conflicts in tests

* pull in Install test from master

* pull in PSGetTestUtils form master

* add helper for filtering wildcards that handles *

* fix failing tests

* resolve feedback from PR

* add code to skip if not windows tests

* rename Utils helper method and remove unecessary comments

* add SupportShouldProcess

* fix tests for updating with Scope, and use Get-InstalledPSResource instead of Get-Module

* revert change to TryParseVersionOrVersionRange

* remove cancellationToken

* remove PSGalleryName variable not needed

* update design and help docs for UpdatePSResource

* remove comments from Update tests

* remove call to Register-LocalRepo helper as is not needed

* add test for AcceptLicense paramter

* update test with AcceptLicense

* update Install test for AcceptLicense

* add whatIf test to update

* resolve PR feedback and add skip to Unix AllUsers scope tests

* remove references to NameParameterSet

* add fix for failing MacOS tests

Co-authored-by: alerickson <25858831+alerickson@users.noreply.github.com>
Co-authored-by: Amber Erickson <americks@microsoft.com>
Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Install should implement ShouldProcess (#425)

* Install should impelement ShouldProcess

* Preview tag support (#428)

find prerelease version if version contains tag but prerelease parameter not used

* Find tests (#429)

* add tests for FindPSResource package name with wildcards and version combinations

* add test for invalid wildcard character names

* Temporarily remove unimplemented DestintationPath parameter (#431)

* Wildcard processing (#432)

make wildcard support/error handling consistent across cmdlets

* Update help files for {Update, Find}-PSResource and {Register, Set, Get, Unregister}-PSResourceRepository (#434)

update help docs

* Update help files for {Get-Installed, Install, Publish, Save, and Uninstall}-PSResource (#435)

* Update PSGet documentation link in readme (#437)

* Replace WriteDebug() with WriteVerbose() (#438)

remove WriteDebug()

* Update module version to use new form (#439)

* Update version to new form

* Add missing copyright header

* Change 'APIKey' to 'ApiKey' (#443)

* Update help documentation for minimum inclusive version range (#442)

* update help files with note about minimum inclusive version not being supported according to NuGet version documentation

* Update NuGet libraries to stable version (#445)

* Fix bug with Publish-PSResource not properly adding tags to nuspec (#448)

* add ShouldSupport implementation for Save-PSResource (#447)

* make support for Artifactory more generalized (#446)

* Auto-create PSResourceRepository.xml file if the file does not already exist.  (#450)

* add issue template (#452)

* Update changelog (#453)

* Support Azure Artifacts for PowerShell modules (#449)

PowerShell modules should be supported for Azure Artifacts feeds

* Add clarifying comments to util functions (#454)

* fix minor typo in release yml (#455)

* Command dsc parametersets (#490)

Implement CommandName and DSCResourceName parameter sets

* Tag type paramset (#478)

implement Tag and Type parameter set for Find

* Remove unnecessary .nupkg.metadata from module after installation (#500)

* Fix failing tests on Windows when not an admin (#502)

* Update README.md (#503)

* Add Sbom to release package (#507)

* Fix bug with some modules installing as scripts (#504)

* Value from pipeline cleanup (#511)

Cmdlets should only have ValueFromPipeline and/or ValueFromPipelineByPropertyName attributes per the cases discussed

* Add InputObject parameter sets for appropriate *-PSResource cmdlets, to provide pipeline support (#510)

Add InputObjects for {Install, Save, Uninstall}-PSResource cmdlets.

* Fix CI to use latest ubuntu image (#527)

* Fix test image (#528)

* Add CI notice generator (#529)

* change Find-PSResource tests to not test against production package Carbon (#530)

change Find tests to not test against production package Carbon

* Fix for Install-PSResource always reinstall issue (#525)

* Fix for always reinstall issue and general clean up

* Added restore option for reinstall, in case the install fails

* update error message to mention repo name, also clean up some success/fail messages (#531)

* Uninstall and Get-Installed prerelease support for Version parameter (#523)

implement prerelease versioning search support for Get and Uninstall

* Add -NoClobber functionality to Install-PSResource (#509)

* Implement -DestinationPath parameter for Publish-PSResource (#506)

* Updates for Update-PSResource (#534)

* Changes to UpdatePSResource command

* Add stop processing to UpdatePSResource. Removed multiple instantiations of helper objects.

* Reverting to original source

* Create InstallHelper object only once.

* Fix Publish-PSResource -DestinationPath test failure (#537)

* Fix clobber tests (#539)

* Uri bug fix (#542)

* Use Utils.DeleteDirectory consistently (#544)

* Change all instances of 'Get-InstalledPSResource' to 'Get-PSResource' (#545)

* Code clean up pass (#547)

* Remove unneeded Microsoft.Extensions.Logging (#546)

* Use path separator to split PSModulePath env var (#541)

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* More code clean up for next release (#548)

* Add -SkipDependencyCheck to cmdlets. (#550)

* Add -SkipDependencyCheck to install/save/update cmdlets

* Change -Force to -SkipDependencyCheck

* Fix tests

* Implement Progress Bar for Install (#552)

Add progress bar for install

* Bug fix for Publish-PSResource deleting a temp dir that contains a readonly file (#543)

* Add -PassThru to Install-PSResource, Save-PSResource, and Update-PSResource (#540)

* Add -AsNupkg and -IncludeXML params and test (#538)

* Remove DSCResources from PowerShellGet (#553)

* Add -PassThru support for Unregister-PSResourceRepository (#556)

add PassThru to Unregister-PSResourceRepository cmdlet

* Fix CI after removal of DSC modules (#557)

* Implement -Quiet param for Install and Update -PSResource (#561)

* Update help documentation (#558)

* Install should not silently fail (#554)

install should not fail silently

* Tests and error handling (#564)

clean up tests and add tests for certain errors

* Update change log for beta 12 release (#567)

* Update change log for beta 12 release

* Fix progress bar and test issues

* Fix tests errors being written out to output (#568)

* for errors being written in Save write to a variable

* for Uninstall, fix errors being written

* add more verification that Install step also worked

* Suppress progress bar during testing (#569)

* Add new SBOM parameters (#579)

* Add support for credential persistence (#480)

add support for credential persistence

* rename PSResourceInfo PrereleaseLabel property and variables to Prerelease (#591)

* Implement RequiredResourceFile and RequiredResource parameters (#592)

* Update release build image (#600)

* Fix Write-Error on build failure. (#601)

* Rename params: *url to *uri (#551)

Rename params *url to *uri

* Update tests to use PowerShell pipeline cmdlets (#570)

* Add support for Uninstall-PSResource (#593)

Add support for Uninstall -Prerelease parameter uninstalling only prerelease versions

* Allow .psd1 to be passed into -RequiredResourceFile (#610)

* Refactor tests to use test modules from PSGallery, not PoshTestGallery (#628)

* remove PoshTestGallery from repositories xml file used during tests as it won't be able to search it

* Add -Scope parameter to Get-PSResource and Uninstall-PSResource (#639)

* Change -Repositories param to -Repository in Register-PSResourceRepository (#645)

* Bug fix for publishing modules with RequiredModules specified in .psd1 (#640)

* Update Uninstall-PSResource.md

* Update Get-PSResource.md

* Update Get-PSResource.md

* Update Uninstall-PSResource.md

* Update Update-PSResource.md

* Update Save-PSResource.md

* Update Install-PSResource.md

* Update Set-PSResourceRepository.md

* Update Register-PSResourceRepository.md

* Update tests for Publish-PSResource (#648)

* Publish-PSResource Script publishing support (#642)

support/bugfixes for publishing scripts

* Update Install-PSResource.md

* Update Install-PSResource.md

* Update Install-PSResource.md

* Update Find-PSResource.md

* Update Find-PSResource.md

* Update PowerShellGet.dll-Help.xml

* Update Get-PSResource.md

* Update Get-PSResource.md

* Update Install-PSResource.md

* Update Update-PSResource.md

* Update Install-PSResource.md

* Update Save-PSResource.md

* Update Update-PSResource.md

* Help updates for Preview 13 release (#651)

* add SupportsWildcard attribute for info to appear in help (#658)

* Update changelog and pkg version for 3.0.13-beta release (#659)

* Psresourcerepository file bug (#661)

fix Uri/Url not being null checked

* Update changelog, release notes for version 3.0.14-beta14 (#663)

* Update prerelease tag to 'beta14'

* Add authenticode validation to Install-PSResource (#632)

* Update nuget client dependency packages (#678)

* Update PSData file reader. (#681)

* Add tests for New-PSScriptInfoFIle, Update-PSScriptInfoFile, and Test-PSScriptInfoFIle (#683)

* Add benchmark tests for v3 (and v2) performance (#690)

* 'Update-ModuleManifest' cmdlet implementation (#677)

* Add `.github/fabricbot.json` (#682)

* Add some code clean up changes (#703)

* Some minor code clean up

* Update comments

* Downgrade NuGet client packages to v5.11.2 (#719)

* Script info cmdlets with Line parsing and class implementations (#708)

Script info cmdlets with Line parsing and class implementations

* Add help docs for New,Update,Test-PSScriptFileInfo cmdlets (#689)

* Update PowerShellGet.dll-Help.xml

* Update PowerShellGet.dll-Help.xml

* Script file duplicate keys and parsing help comment block (#726)



Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update Find-PSResource.md

* Update Get-PSResource.md

* Update Install-PSResource.md

* Update New-PSScriptFileInfo.md

* Update Publish-PSResource.md

* Update Register-PSResourceRepository.md

* Update Save-PSResource.md

* Update Set-PSResourceRepository.md

* Update Test-PSScriptFileInfo.md

* Update Uninstall-PSResource.md

* Update Unregister-PSResourceRepository.md

* Update Update-ModuleManifest.md

* Update Update-PSResource.md

* Update Update-PSScriptFileInfo.md

* Update Install-PSResource.md

* Update Find-PSResource.md

* Update PowerShellGet.dll-Help.xml

* Update pkg version, changelog, release notes for 3.0.15-beta15 release (#725)

* Fixes for use of IEnumerable and dependent module re-install issues (#728)

* Remove unneeded IEnumerable interfaces

* Add missing clean up

* Fix always reinstall

* Fix logic error

* Style change

* Minor clean up

* Use count property

* Update NuGet.Packaging to version 6.2.1 (#733)

* updat NuGet.Packaging to version 6.2.1 which depends on Newtonsoft 13.0.1 or higher

* update other NuGet package versions

* Update pkg version and notes for release (#734)

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Copy LICENSE and Notice.txt to build output path (#735)

* Remove ShouldProcess in FindPSResource

* Copy LICENSE and notice.txt to output path in yamls

* Update .ci/ci_auto.yml

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update .ci/ci_auto.yml

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update .ci/ci_release.yml

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update .ci/ci_release.yml

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Update ci_release.yml for Azure Pipelines

* Remove unneeded copy (#736)

* Add error message for failure to install after choosing not to trust repository (#712)

* Remove ShouldProcess from FindPSResource (#710)

* Add OutputType attributes to Get-PSResource and Get-PSResourceRepository (#706)

* Add PSModulePath paths when retrieving resource paths (#700)

* Remove .nupkg.metadata file (#738)

* Change "IncludeXML" to "IncludeXml" (#739)

* Cannot assume PSScriptInfo metadata will have empty lines in between (#744)

* for PSScriptInfo metadata not assume first line will be empty line and can be ignored

* add test scripts without empty lines

* Change ConfirmImpact from Medium to Low

* Change default path to CurrentFileSystemLocation (#742)

* Fix -PassThru to return all properties

* Delete commented code

* Add ValueFromPipelineByPropertyName to Set-PSResourceRepository (#705)

* Fix typo

Co-authored-by: Anam Navied <anam.naviyou@gmail.com>

* Editorial pass on cmdlet ref (#743)

* Check Uri before setting the new value

* refactor updating user uri

* Update priority range for PSResourceRepository to 0-100 (#741)

* Add -Force param to Register-PSResourceRepository and Set-PSResourceRepository (#717)

* Bug fix in Publish-PSResource when creating nuspec (#693)

* add error for failure of Uri creation

* add temporary path parameter to save

* Change error message

* add TemporaryPath parameter to Install and Update

* add parameter attribute

* revert unintendded change

* rename FilePath parameter to Path

* update .md files to Path instead of FilePath

* update test files to use Path instead of FilePath

* Change wording

Co-authored-by: Anam Navied <anam.naviyou@gmail.com>

* Change wording

Co-authored-by: Anam Navied <anam.naviyou@gmail.com>

* remove toString()

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* throw error for wildcard usage and unresolved path

* update .md files to add a new parameter

* Add String and SecureString to acceptable credential types in PSCredentialInfo (#764)

* Expand acceptable Path arguments for Publish-PSResource (#704)

* remove inheritance and fix test

* fix code style

* fix test for UpdatePSResource

* Update test/InstallPSResource.Tests.ps1

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* use should throw instead of try/catch

* Fix RequireModules description & add Find example (#769)

* change path handle

* delete test

* Script file validation and metadata properties population for Publishing, Installing a script. (#781)

* for Publish script validation use validation code from PSScriptFileInfo methods

* for Install, script validation should use PSScriptFileInfo methods and also populate PSResourceInfo with metadata information accessible

* Install-PSResource: Installation path for scripts not included in environment PATH variable (#750)

* when installing script ensure that Script InstallPath is added to env Path variable so script can be invoked without prepending install folder path

* add prompting for setting env var, add scope based env var setting, and pass scope to InstallHelper

* InstallHelper should take ScopeType? param, use Path.PathSeperator for cross platform compat, and add tests

* instead of prompt, use ShouldProcess for modiying user's environment variable

* Update src/code/InstallHelper.cs

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update src/code/InstallHelper.cs

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* detect if Script install path is not in environment PATH for appropriate scope and present warning and revert install tests

* simplify scope based determination of environment PATH variable

Co-authored-by: Paul Higinbotham <paulhi@microsoft.com>

* Update CHANGELOG.md for beta17 (#782)

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Anam Navied <anam.naviyou@gmail.com>

* Release 3.0.17 (#783)

Co-authored-by: Alyssa Vu <alyssavu@microsoft.com>

* Update PowerShellGet.dll-Help.xml (#784)

* replace exposed hardcoded test secrets with random one (#785)

* Missed one case of hardcoded test passwd. (#786)

* Remove unneeded constructor tests (#787)

* Remove unneeded test. (#788)

* Update PSGet module version

Co-authored-by: alerickson <25858831+alerickson@users.noreply.github.com>
Co-authored-by: Anam Navied <anam.naviyou@gmail.com>
Co-authored-by: Amber Erickson <americks@microsoft.com>
Co-authored-by: Steve Lee <slee@microsoft.com>
Co-authored-by: Keith Jackson <8988864+keithallenjackson@users.noreply.github.com>
Co-authored-by: Sydney Smith <43417619+SydneyhSmith@users.noreply.github.com>
Co-authored-by: Cansu Erdogan <cnserd@gmail.com>
Co-authored-by: Freddie Sackur <github@dustyfox.uk>
Co-authored-by: msftbot[bot] <48340428+msftbot[bot]@users.noreply.github.com>
Co-authored-by: Alyssa Vu <alyssavu@microsoft.com>
Co-authored-by: Alyssa Vu <49544763+alyssa1303@users.noreply.github.com>
Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
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.

6 participants