dsccommunity / dsccommunity/SqlServerDsc

SqlWindowsFirewall: SourceCredential for SourcePath not used

Open
#861 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement good first issue help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

xSQLServerFirewall doesn't pass SourceCredential when it calls Get-TargetResource, so it can't access the setup executable:

https://github.com/PowerShell/xSQLServer/blob/1bbdecaf5f75245c2b16e698579b28bf90bcc240/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1#L384

https://github.com/PowerShell/xSQLServer/blob/1bbdecaf5f75245c2b16e698579b28bf90bcc240/DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1#L606

Also, at a quick glance it seems like the only purpose for SourcePath is to check the SQL Server version. Would this be better done through the Registry?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in DSCResources/MSFT_xSQLServerFirewall/MSFT_xSQLServerFirewall.psm1 at the calls around lines 384 and 606, and trace how Get-TargetResource receives its parameters. Verify how SourceCredential should be passed when SourcePath points to the setup executable, then assess the issue’s question about checking the SQL Server version through the Registry. Done means the resource can access the executable with the supplied credential and the version-check behavior is covered by the agreed approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.