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

"Network_access_Remotely_accessible_registry_paths_and_subpaths" Add multiple paths #83

Closed
Stachows opened this Issue Mar 26, 2018 · 11 comments

Comments

Projects
None yet
5 participants
@Stachows
Copy link

Stachows commented Mar 26, 2018

I am relatively new to DSC but have found ALOT of my answers here in the DOCS and on the web.

But, one issue has me stumped.
I need to add MULTIPLE paths to the "Security Option" "Network_access_Remotely_accessible_registry_paths_and_subpaths"

I can add one path, and only 1 path, no matter how I try. I have tried setting using the SecurityPolicyDsc resource (many different ways) and also straight up using the Registry Resource, Which fails miserable because an export of the data is hex, but when using DSC to add it back in, it just adds the hex data to the MultiString key...

I am at a loss.
I would prefer to us the SecurityPolicyDSC resource, but will use registry if that is my only way.

If anyone has figured this out, I would greatly appreciate your input!
Thanks!

@Stachows

This comment has been minimized.

Copy link
Author

Stachows commented Mar 26, 2018

I managed to get it working with the registry, but would rather use the SecurityPolicyDSC resource if at all possible.

@Safetybrick

This comment has been minimized.

Copy link

Safetybrick commented Mar 27, 2018

I have run into a similar issue along with Network_access_Remotely_accessible_registry_paths which I need to apply multiple paths with. No luck in a solution yet.

@johlju

This comment has been minimized.

Copy link
Contributor

johlju commented May 18, 2018

The are not array is the schemo.mof or the code, so that won't work. They have to be changed to a string array and the code changed accordingly to support multiple paths (and array of paths).

[Write] String Network_access_Remotely_accessible_registry_paths;
[Write] String Network_access_Remotely_accessible_registry_paths_and_subpaths;

@heatherdaye

This comment has been minimized.

Copy link

heatherdaye commented May 21, 2018

I was able to set this via SecurityPolicy DSC with a single comma delimited string
Network_access_Remotely_accessible_registry_paths_and_subpaths = "path 1, path 2, path 3"

@johlju

This comment has been minimized.

Copy link
Contributor

johlju commented May 22, 2018

@heatherdaye Glad you found a solution to this!

@jcwalker is this the intended behavior, this property should not support an array? Just a comma separated list?

@jcwalker

This comment has been minimized.

Copy link
Collaborator

jcwalker commented May 22, 2018

If the schema says it's just a string and not an array I guess it is the intended behavior. It's been too long since I wrote it to remember the specifics. I'm always open to change/improve it on what the community agrees is best.

@heatherdaye

This comment has been minimized.

Copy link

heatherdaye commented May 22, 2018

Originally I had assumed it would be an array of strings. When it only took the first string, I began trial and error. I would suggest changing this to an array of strings as that is what would be expected based on other settings in the module.

@johlju

This comment has been minimized.

Copy link
Contributor

johlju commented May 22, 2018

If it is changed to an array, and the resource builds a comma separated string, then both the following would work.

Network_access_Remotely_accessible_registry_paths_and_subpaths = 'path 1, path 2, path 3'
Network_access_Remotely_accessible_registry_paths_and_subpaths = @('path 1', 'path 2', 'path 3')

That means that existing configurations would still work. Although, since it should return an array, it would be a breaking change for users expecting an comma separated string when running Get-DscConfiguration.

@heatherdaye

This comment has been minimized.

Copy link

heatherdaye commented May 24, 2018

After further investigation, the comma separated string works to set the multiple paths, however get-DSCConfiguration only returns the FIRST path. This causes failure when used in Azure DSC. This occurs in both Network_access_Remotely_accessible_registry_paths and Network_access_Remotely_accessible_registry_paths_and_subpaths

@johlju

This comment has been minimized.

Copy link
Contributor

johlju commented May 25, 2018

Okay! Relabelling this as a bug then. 🙂

@johlju johlju added bug and removed enhancement labels May 25, 2018

@jcwalker jcwalker added in progress and removed help wanted labels Dec 1, 2018

@jcwalker

This comment has been minimized.

Copy link
Collaborator

jcwalker commented Jan 21, 2019

Closing this as it was correct it PR#111

@jcwalker jcwalker closed this Jan 21, 2019

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