jabbera / my-vsts-tasks

20 stars 18 forks source link

Unable to use GMSA Account #34

Closed collinprice closed 6 years ago

collinprice commented 6 years ago

GMSA Accounts don't use a password for authentication but the way TopShelf is written a password is required to set the username. This line of code prevents the use of GMSA Accounts.

https://github.com/jabbera/my-vsts-tasks/blob/2d388dd7eb2c14d69073b50239e9b621defdd54b/Extensions/WindowsServiceReleaseTasks/Src/Tasks/InstallTopshelfService/InstallTopshelfService.ps1#L39

jabbera commented 6 years ago

The current version of top shelf should detect the account ending in a $ and not require a password. Is this not working?

https://github.com/Topshelf/Topshelf/blob/956325c8104136af7e8f8fc708b6237668d1c55c/src/Topshelf/Runtime/Windows/WindowsHostEnvironment.cs#L226

collinprice commented 6 years ago

That is correct but the CLI still needs a blank -password to work. This is an open issue with the CLI https://github.com/Topshelf/Topshelf/issues/400.

For example:

This fails myservice.exe install -username:domain\account$

This succeeds myservice.exe install -username:domain\account$ -password

jabbera commented 6 years ago

If possible, please valiadte this change: https://github.com/jabbera/my-vsts-tasks/tree/gmsachange

collinprice commented 6 years ago

CLI requires just -password. I tried -password: and it throws:

Parameter -password: requires an argument.

jabbera commented 6 years ago

Oye. Thanks. We don’t have any setup right now so no easy way for me to test.

Sent from my iPhone.

On May 8, 2018, at 4:59 PM, Collin Price notifications@github.com wrote:

CLI requires just -password. I tried -password: and it throws:

Parameter -password: requires an argument.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jabbera/my-vsts-tasks/issues/34#issuecomment-387540455, or mute the thread https://github.com/notifications/unsubscribe-auth/AASYmDRYchgJoHQccRedM5-h3CfGHgqLks5twgcYgaJpZM4T2q-6 .

jabbera commented 6 years ago

Updated the branch.

jabbera commented 6 years ago

Releasing now under version 8.0