aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
235 stars 77 forks source link

Add support for IAM Identity Center (SSO) authentication #332

Closed dbaileyut closed 3 months ago

dbaileyut commented 10 months ago

Describe the feature

Implement native PowerShell features to bring feature parity from the AWS command line tools around IAM Identity Center (SSO) authentication/profiles to AWS.Tools PowerShell modules.

Use Case

I'm frustrated by having to copy and paste IAM Identity Center (SSO) credentials or having to use 3rd party scripts to update after SSO tokens expire.

Proposed Solution

Other Information

No response

Acknowledgements

AWS Tools for PowerShell version used

4.1.396

PowerShell version used

PSVersion 7.3.6 PSEdition Core GitCommitId 7.3.6 OS Microsoft Windows 10.0.22621 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Operating System and version

Windows 11

ashishdhingra commented 10 months ago

Needs review with the team.

@dbaileyut Are you looking for something like Get-SSOLogin since AWS CLI also needs to manually execute aws sso login for next steps to be completed in web browser?

Thanks, Ashish

dbaileyut commented 10 months ago

Maybe Connect-AWSSSO would align with PowerShell conventions better? It's fine (and expected) to complete steps in a browser, I just want PowerShell to have the same experience the command line tools have with respect to SSO token refresh and configuration.

I.e., implement this experience in PowerShell: https://docs.aws.amazon.com/cli/latest/userguide/sso-configure-profile-token.html

afroz429 commented 3 months ago

Happy to announce that the following new cmdlets were added starting from version 4.1.538 of AWS.Tools.Common module. Thanks for the feature request.

Initialize-AWSSSOConfiguration similar to aws configure sso Invoke-AWSSSOLogin similar to aws sso login Invoke-AWSSSOLogout similar to aws sso logout Set-AWSSSOSessionConfiguration similar to aws configure sso-session

User guide: https://docs.aws.amazon.com/powershell/latest/userguide/creds-idc.html

github-actions[bot] commented 3 months ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.