Skip to content
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

[Feature]: Get-AzAccessToken - Option to return token as secure string #24190

Closed
o-l-a-v opened this issue Feb 21, 2024 · 2 comments · Fixed by #24355
Closed

[Feature]: Get-AzAccessToken - Option to return token as secure string #24190

o-l-a-v opened this issue Feb 21, 2024 · 2 comments · Fixed by #24355
Labels
Azure PS Team customer-reported feature-request This issue requires a new behavior in the product in order be resolved. Tracking We will track status and follow internally

Comments

@o-l-a-v
Copy link

o-l-a-v commented Feb 21, 2024

Description of the new feature

Would be great with an option to return access token as secure string with the Get-AzAccessToken cmdlet.

One use case why?

One more reason why?

  • Security best practice: Keep secrets from being plain text if possible.

Proposed implementation details (optional)

Get-AzAccessToken -AsSecureString

@o-l-a-v o-l-a-v added feature-request This issue requires a new behavior in the product in order be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 21, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 21, 2024
@isra-fel
Copy link
Member

Thanks for the feedback. Let me add some notes:
Option 1: securestring by default, -AsPlainText, but this is a breaking change.
Option 2: plain text by default, -AsSecureString.

@isra-fel isra-fel added this to the Az 11.5.0 (2024-04-02) milestone Mar 1, 2024
@isra-fel
Copy link
Member

isra-fel commented Mar 1, 2024

Target Az 11.5.0: add -AsSecureString
Target Az 13.0.0: change the default output to SecureString while keeping the -AsSecureString parameter.

@isra-fel isra-fel added Azure PS Team Tracking We will track status and follow internally and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Mar 1, 2024
msJinLei added a commit to msJinLei/azure-powershell that referenced this issue Mar 13, 2024
vidai-msft added a commit that referenced this issue Mar 13, 2024
… to SecureString (#24355)

* Add AsSecureString to Get-AzAccessToken to convert the returned token to SecureString

Fix #24190

* Update src/Accounts/Accounts/ChangeLog.md

Co-authored-by: Vincent Dai <[email protected]>

* Update src/Accounts/Accounts/Token/GetAzureRmAccessToken.cs

Co-authored-by: Vincent Dai <[email protected]>

* Address review comments

---------

Co-authored-by: Vincent Dai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure PS Team customer-reported feature-request This issue requires a new behavior in the product in order be resolved. Tracking We will track status and follow internally
Projects
None yet
2 participants