(dsc): Support credentials, `acceptLicense` and PSGallery registration

オープン
#2,049 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, powershell
領域
security, tooling

調査の方向性

Start by tracing the Repository registration flow for Register-PSResourceRepository and the PSResourceList install flow for Install-PSResource. Verify PSGallery parameter-set handling, credentialInfo and acceptLicense support, then check that get, test and export expose only vault and secret names.

索引モデルが issue の本文から書いたものです。

説明

feature_request Needs-Triage
Summary of the new feature / enhancement

The DSC resources cannot express three things that the underlying cmdlets support and that are needed in real deployments:

  1. Credentials. Register-PSResourceRepository -CredentialInfo and Install-PSResource -Credential are not modelled, so a private feed (Azure Artifacts, GitHub Packages, an internal NuGet server) cannot be used from a configuration.
  2. acceptLicense. Install-PSResource -AcceptLicense is not passed, so a module that requires license acceptance fails during set with exit code 4.
  3. PSGallery registration. Register-PSResourceRepository -PSGallery is a separate parameter set. Declaring { name: PSGallery } in a Repository instance on a machine where it was unregistered fails, because the script always calls Register-PSResourceRepository -Name -Uri.

Example of what this could look like:

resources:
- name: Internal feed
  type: Microsoft.PowerShell.PSResourceGet/Repository
  properties:
    name: Internal
    uri: https://pkgs.dev.azure.com/contoso/_packaging/internal/nuget/v3/index.json
    trusted: true
    credentialInfo:
      vaultName: ContosoVault
      secretName: InternalFeedPat
- name: Modules
  type: Microsoft.PowerShell.PSResourceGet/PSResourceList
  properties:
    repositoryName: Internal
    acceptLicense: true
    resources:
    - name: Contoso.Tools
Proposed technical implementation details (optional)
  • Repository: add an optional credentialInfo object (vaultName, secretName) mapped to -CredentialInfo on register and set, and handle name: PSGallery without uri by calling Register-PSResourceRepository -PSGallery.
  • PSResourceList: add an optional acceptLicense boolean passed to Install-PSResource -AcceptLicense, and allow credential via SecretManagement rather than plain text in the configuration.
  • Never emit secrets in get, test or export output; return only the vault and secret names.
主要言語
C#
スター
576
フォーク
114
平均マージ
1日 2時間
マージ済み PR(30日)
7

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/PSResourceGet のほかの issue

PowerShell/PSResourceGet の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。