-
Notifications
You must be signed in to change notification settings - Fork 81
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
Bug: Use-STSRoleWithWebIdentity Returns No Credentials in PowerShell (Only Expiration field is Returned) #362
Comments
Hello @dotNetNaji, Thank you for reporting this issue. It appears that you are using a custom cmdlet
Can you please confirm if you are experiencing similar issue when using the In this case, I am unsure why Regards, |
Hello @bhoradc, I can confirm that I'm facing the same issue with |
Hello @bhoradc, any updates on this ? |
@dotNetNaji I will try to review this tomorrow and discuss with the team accordingly. |
Describe the bug
Issue Description: I am encountering an issue with the Use-STSRoleWithWebIdentity cmdlet in AWS Tools for PowerShell when running it in a Bitbucket Pipeline. The cmdlet returns an object that contains ONLY the
Expiration
value. The AWS CLI, using the same parameters (role ARN, web identity token, session name, etc.), works as expected and returns the full credentials (AccessKeyId
,SecretAccessKey
, andSessionToken
).Regression Issue
Expected Behavior
The Use-STSRoleWithWebIdentity cmdlet should return the full credentials (similar to the AWS CLI), including the
AccessKeyId
,SecretAccessKey
, andSessionToken
.Current Behavior
The
Credentials
object in the response contains only theExpiration
field.No errors or exceptions are thrown, but the complete credentials are missing from the response.
Reproduction Steps
Environment:
Bitbucket Pipeline (using mcr.microsoft.com/dotnet/sdk:8.0 image)
AWS Tools for PowerShell version: 4.1.680
PowerShell version: 7.5.4
AWS region: eu-west-1
PowerShell Code: (Running inside a bitbucket pipeline)
Output :
AWS CLI Command (Works as expected):
CLI output
Possible Solution
No response
Additional Information/Context
Bitbucket Pipelines OIDC is configured correctly as the AWS CLI works without issue.
No errors or exceptions are thrown in PowerShell; it simply returns an object with only Expiration field.
AWS Tools for PowerShell version used
Name : AWS.Tools.Common
Version : 4.1.680
Name : AWS.Tools.SecurityToken
Version : 4.1.680
PowerShell version used
Major : 7
Minor : 4
Patch : 5
PreReleaseLabel :
BuildLabel :
Operating System and version
Ubuntu
The text was updated successfully, but these errors were encountered: