Skip to content

Microsoft.Windows/FirewallRuleList requires unnecessary elevation on Export #1524

Description

@Gijsreyn

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

Whilst writing the docs for Microsoft.Windows/FirewallRuleList, I noticed that export requires elevation through the manifest. Looking at the code bats, both get_rules and export_rules call the exact same FirewallStore::open().

I don't think there's any reason, looking at the code-level, why enumerating all rules would need elevation when reading a named rule doesn't.

Steps to reproduce

N/A.

Expected behavior

Able to export all rules non-elevated

Actual behavior

ERROR Security context: Operation 'export' for resource 'Microsoft.Windows/FirewallRuleList' requires security context 'elevated'

Error details

Environment data

Name                           Value
----                           -----
PSVersion                      7.6.0
PSEdition                      Core
GitCommitId                    7.6.0
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

dsc 3.3.0-preview.1

Visuals

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions