-
Notifications
You must be signed in to change notification settings - Fork 55
win_psDscAdapter and psDscAdapter PScredentials fix for passing username and password #1308
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
Open
mimachniak
wants to merge
25
commits into
PowerShell:main
Choose a base branch
from
mimachniak:win_psDscAdapter-PSCredentials-fix-ScriptDSC
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
61f4b85
Add to win_psDscAdapter function for extraxting string from PSCredent…
mimachniak cd5df41
Add to win_psDscAdapter for ScriptBase resources PSCredentails fix co…
mimachniak 98e7099
Merge branch 'PowerShell:main' into win_psDscAdapter-PSCredentials-fi…
mimachniak 0a7c6aa
Fix win_psDscAdapter for ScriptBase resources PSCredentails fix conve…
mimachniak 82aeec4
psDscAdapter for ClassBase resources PSCredentails fix convert to Sys…
mimachniak 506ba9f
Add for testClass testing yaml with secureObject - main file and para…
mimachniak 49c381c
Fix win_psDscAdapter for ClassBase resources PSCredentails fix conver…
mimachniak 403e6b5
Fix win_psDscAdapter for ClassBase resources PSCredentails fix conver…
mimachniak 352dd69
Ad unit test for credentaials in powershellgroup.config.tests.ps1 - v…
mimachniak 4af004e
Ad unit test for credentaials in win_powershellgroup.tests.ps1 - vali…
mimachniak dd7425e
Ad unit test for credentaials in win_powershellgroup.tests.ps1 - vali…
mimachniak b8cff4a
Add script base DSC resources for testing credentials
mimachniak 63cd935
Add script base DSC resources for testing credentials and fix win_PsD…
mimachniak 73dacde
Script base yaml DSC resources for credential valid
mimachniak 34b6b73
Add script base resource test in win_powershellgroup.tests.ps1
mimachniak 877ee8b
Add to win_psDscAdapter.psm1 support for secure object and test value…
mimachniak 7984d06
Add to psDscAdapter.psm1 support for secure object and test value par…
mimachniak 661259b
Change faild test win_powershellgroup.tests it false
mimachniak f6b366e
Add to psDscAdapter.psm1 remove output of credntials
mimachniak 6763c23
Remove spaces
mimachniak 779e259
Add to psDscAdapter.psm1 remove output of credntials
mimachniak 2d10057
Add to unit test for PowerShell adapter in verions 5.1
mimachniak 3c57cf8
Fix test file parsing
mimachniak 3542591
Fix DSC - test and class path creation for subfolder
mimachniak 4400c8f
Run test
mimachniak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
adapters/powershell/Tests/win_powershell_script_resources.dsc.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
|
|
||
| $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json | ||
| parameters: | ||
| SafemodeAdministratorPassword: | ||
| type: string | ||
| showSecrets: | ||
| type: bool | ||
| defaultValue: true | ||
| cred: | ||
| type: secureObject | ||
| metadata: | ||
| Microsoft.DSC: | ||
| requiredSecurityContext: elevated # this is the default and just used as an example indicating this config works for admins and non-admins | ||
| resources: | ||
| - name: Use class PowerShell resources | ||
| type: Microsoft.Windows/WindowsPowerShell | ||
| properties: | ||
| resources: | ||
| - name: Windows Features Install ADS | ||
| type: PSDesiredStateConfiguration/WindowsFeature | ||
| properties: | ||
| ensure: Present | ||
| name: AD-Domain-Services | ||
| - name: Windows Features Install ADS RSAT | ||
| type: PSDesiredStateConfiguration/WindowsFeature | ||
| properties: | ||
| ensure: Present | ||
| name: RSAT-AD-PowerShell | ||
| dependsOn: | ||
| - "[resourceId('PSDesiredStateConfiguration/WindowsFeature','Windows Features Install ADS')]" | ||
| - name: Active Directory Forest | ||
| type: ActiveDirectoryDsc/ADDomain | ||
| properties: | ||
| DomainName: contoso.com | ||
| Credential: | ||
| Username: "[parameters('cred').username]" | ||
| Password: "[parameters('cred').password]" | ||
| SafemodeAdministratorPassword: | ||
| Username: "[parameters('cred').username]" | ||
| Password: "[parameters('cred').password]" | ||
| ForestMode: WinThreshold | ||
| - name: secureObject | ||
| type: Microsoft.DSC.Debug/Echo | ||
| properties: | ||
| output: "[parameters('cred')]" | ||
| showSecrets: "[parameters('showSecrets')]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.