Skip to content

Conversation

@webalexeu
Copy link
Contributor

@webalexeu webalexeu commented May 16, 2025

Pull Request (PR) description

Current xService resource always return user running the service as builtInAccount
Evaluating of type was not done to avoid call to AD to determine if user running the service is a gMSA
Evaluation is now done based on format as gMSA is always structured in the same format contoso\mygmsauser$

This Pull Request (PR) fixes the following issues

Fixes #759

Task list

  • Added an entry to the change log under the Unreleased section of the
    file CHANGELOG.md. Entry should say what was changed and how that
    affects users (if applicable), and reference the issue being resolved
    (if applicable).
  • Resource documentation added/updated in README.md.
  • Resource parameter descriptions added/updated in README.md, schema.mof
    and comment-based help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@webalexeu webalexeu marked this pull request as draft May 16, 2025 21:16
@webalexeu
Copy link
Contributor Author

Hello @johlju ,
Can you please have a look at this PR ?
Thank you

@johlju
Copy link
Member

johlju commented Jun 17, 2025

We should not return those proposed values from Get-function. Suggest to make a helper function that can return the type of credential that can be used in Get-, Test-, and Set-function as needed. For example Get-CredentialType that returns the type of credential. 🤔 Could also be Test-IsManagedServiceAccount, etc..
Preferably such commands should be added to DscResource.Common so they can be reused 🤔

@webalexeu
Copy link
Contributor Author

We should not return those proposed values from Get-function. Suggest to make a helper function that can return the type of credential that can be used in Get-, Test-, and Set-function as needed. For example Get-CredentialType that returns the type of credential. 🤔 Could also be Test-IsManagedServiceAccount, etc.. Preferably such commands should be added to DscResource.Common so they can be reused 🤔

We should not return those proposed values from Get-function. Suggest to make a helper function that can return the type of credential that can be used in Get-, Test-, and Set-function as needed. For example Get-CredentialType that returns the type of credential. 🤔 Could also be Test-IsManagedServiceAccount, etc.. Preferably such commands should be added to DscResource.Common so they can be reused 🤔

I will adapt accordingly. Thanks for the review

@johlju johlju added the waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. label Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In dsc_xservice while specifying the runsAsAccount thorough dsc_credentials getting warning about dsc_builtinaccount.

2 participants