Skip to content

Add SecureString option for AZAccessToken in Azure plugin #618

@Viehwoidler

Description

@Viehwoidler

Starting with Az.Accounts version 5.0.0 and Az version 14.0.0, Microsoft changed the default output of Get-AzAccessToken.Token to SecureString, see https://learn.microsoft.com/en-us/powershell/azure/protect-secrets?view=azps-14.1.0#transition-from-strings-to-securestrings
Providing such a Token in PluginArgs to Posh-ACME leads to the following error in Azure.ConvertFrom-AccessToken:
Conversion from JSON failed with error: Unexpected end when reading JSON. Path '', line 1, position 6.
It's possible to convert the token back to plain string, which is strongly discouraged, see https://learn.microsoft.com/en-us/powershell/azure/faq?view=azps-14.1.0#how-can-i-convert-a-securestring-to-plain-text-in-powershell-

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions