Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,143
Community Members
 
Community Events
176
Community Groups

OIDC Pipelines do not working (Not authorized to perform sts:AssumeRoleWithWebIdentity)

Pipelines deployment is failing when trying to connect to AWS through OIDC.

I assume it's not a permission issue, as even adding AdministratorAccess Policy to the OIDC Role, the authentication does not work.

 


WARNING: Refreshing temporary credentials failed during mandatory refresh period.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/botocore/credentials.py", line 529, in _protected_refresh
metadata = self._refresh_using()
File "/usr/local/lib/python3.9/site-packages/botocore/credentials.py", line 670, in fetch_credentials
return self._get_cached_credentials()
File "/usr/local/lib/python3.9/site-packages/botocore/credentials.py", line 680, in _get_cached_credentials
response = self._get_credentials()
File "/usr/local/lib/python3.9/site-packages/botocore/credentials.py", line 890, in _get_credentials
return client.assume_role_with_web_identity(**kwargs)
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 386, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.9/site-packages/botocore/client.py", line 705, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the AssumeRoleWithWebIdentity operation: Not authorized to perform sts:AssumeRoleWithWebIdentity

2 answers

The problem was that I had a conditional policy in my OIDC Role Trus Relationship that allowed a specific range of IPs from Bitbucket.

I took those IPs from this documentation: https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/


I don't know why Bitbucket Pipelines was using another IP to connect to my AWS OIDC.

 

So now, I merged another IP list from this documentation: https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/#Outgoing-Connections

 

And now it's working again.

@Marco Tanaka 

Thanks for knowledge sharing and contributing to the community!

0 votes

Hi @Marco Tanaka

Thank you for your question!

Make sure that you setup properly OIDC access on AWS according to the Deploy on AWS using Bitbucket Pipelines OpenID Connect guide.

 

Best regards,
Oleksandr

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events