RamblingCookieMonster / SecretServer

Secret Server PowerShell Module
MIT License
87 stars 28 forks source link

fixed Get/Set config #18

Open Plork opened 8 years ago

Plork commented 8 years ago

Get/Set config are creating a SecretServer_$($env:USERNAME).xml and the psm1 is looking for SecretServer.xml. If you want to implement a config per user I would store it in ~ \SecretServer

Plork commented 8 years ago

Oke but where during the build do you supply the url to SecretServer? since it will be saved in the xml. I tried to make a new session with passthrough, updateconfig to false and supply the $webproxy but not all functions support this.

And yes I am trying to make this work in a build script and don't like the hardcoded xml in the module. We have a different Secret Server for production and our DTA (dev test .. etc).

Op ma 26 sep. 2016 om 07:02 schreef Joel Bennett notifications@github.com:

@Jaykul commented on this pull request.

I think you've overlooked the fact that this module expects to be built (with the build.ps1 script).

These path changes might be fine if you're running it from source control, but that's not how it's deployed. You can't write in $PSScriptRoot.. because after build that would be the "Modules" folder.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RamblingCookieMonster/SecretServer/pull/18#pullrequestreview-1475073, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBGLw1dZ5lYJOSW_fK2TMhN9erItEGDks5qt1HOgaJpZM4J8IvI .

Jaykul commented 8 years ago

You don't supply the url at build time. Users have have to supply the url.

I guess the confusion is that nobody bothered deleting the .psm1 from source control -- that file does not end up in the module output by the build. The .psm1 is generated by the build script from all the script files.

From the developer point of view, the idea is that you run build.ps1 and the output goes into a version-numbered folder like 1.6.1.0 which contains the module ready for use or release (i.e. via Publish-Module) to the PowerShell gallery. The ReadMe should probably be updated.

Anyway. Users set the URL (using New-SSConnection) after it's installed (using Install-Module)...

Plork commented 8 years ago

Only thing I dont get is why you store it in an XML then when you always need to run New-SSConnection after import / before use. Just keep it in the variable SecretServerConfig at all times.

If you "stored" it you would need to retreive the config with Get-SSconfig before use (which i just as much effort as New-SSconfig if you don't know for sure it's there ;)

Jaykul commented 7 years ago

If I ever get around to doing more work on this ... one of the things I would so is load the config automatically at module import once it's been configured ...

Plork commented 7 years ago

Shouldn't be hard to do, check if xml exist if so bla bla ... will see If I can do that.

Op ma 24 okt. 2016 om 06:01 schreef Joel Bennett notifications@github.com:

If I ever get around to doing more work on this ... one of the things I would so is load the config automatically at module import once it's been configured ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RamblingCookieMonster/SecretServer/pull/18#issuecomment-255643609, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBGL1B6fZbq7pl0G5qeLEkSiE1IRt8rks5q3C2ygaJpZM4J8IvI .