OIDC for AWS
What is AWS OIDC
OIDC (OpenID Connect) authentication in AWS allows users to securely access AWS resources using OIDC-compatible identity providers. Built on top of OAuth 2.0 protocol, it enables clients to verify user identity based on server-based authorization.
As an alternative to access token authorization, Buddy web application provides OIDC support for pipeline integration with Amazon cloud services, and SSO login.
In this guide you will learn how to configure OIDC for your identity in the Amazon management console.
OIDC provider configuration
- Sign in to your AWS account and open the AWS Identity and Access Management (IAM) dashboard.
- Go to Access Management → Identity providers.
- Click Add provider.
Switch the type to OpenID Connect and fill in the details:
- Provider URL →
https://oidc.buddyusercontent.com
(US accounts) orhttps://eu-oidc.buddyusercontent.com
(EU accounts) - Audience →
https://app.buddy.works/WORKSPACE_URL_HANDLE
or custom
- Provider URL →
Image loading...
- Click Add provider to continue.
Adding new role
- Navigate to Access Management → Roles and click Create Role.
- Switch the type to Web identity, and select the created identity provider and audience:
Image loading...
- Proceed to the next step and define the permission policies.
- Proceed to the next step and define the role's name, description and tags.
- Click Create to add the role, then go to its details and copy the role's ARN.
Image loading...
Buddy configuration
- Sign in to your Buddy account and go to Integrations.
- Click New integration and select AWS.
Define the integration details:
- enter the name and define the sharing scope
- switch the authorization method to OIDC
- paste the ARN from the AWS role
- paste the audience from the OIDC provider →
https://app.buddy.works/WORKSPACE_URL_HANDLE
or custom
Image loading...
- Click the button to finish configuration.
Restricting role to integration
Warning
To ensure that your AWS role is restricted exclusively to this integration, you must define additional conditions for it.
- Go to the created integration in Buddy and copy the Subject.
- Switch to AWS and go to the role details.
- Switch to the Trust relationships and click Edit trust policy.
- Change the condition to the following:
json"Condition": { "StringEquals": { "oidc.buddyusercontent.com:aud": "https://app.buddy.works/WORKSPACE_URL_HANDLE", "oidc.buddyusercontent.com:sub": "AWS_INTEGRATION_SUBJECT" } }
Image loading...
Last modified on Sep 23, 2024