wellcomecollection / catalogue-api

:crystal_ball: The API for searching the Wellcome Collection catalogue.
https://developers.wellcomecollection.org
MIT License
3 stars 0 forks source link

Use federated OIDC permissions with AWS to read S3 buckets. #766

Closed kenoir closed 4 months ago

kenoir commented 4 months ago

What does this change?

This change uses the aws-actions/configure-aws-credentials GitHub action to assume a role provided by a GitHub OIDC provider set up in AWS (see: https://github.com/wellcomecollection/aws-account-infrastructure/pull/18).

In addition it updates the role assumed to read Scala dependencies from S3 to be a much more restrictive role. This is required as the operation will now run on GitHub actions runners which do not require such far-reaching permissions and are not under our direct ownership.

See https://github.com/wellcomecollection/buildkite-infrastructure/pull/24 for the change required to allow Buildkite to assume the s3 read role which is also a requirement of this change.

How to test

How can we measure success?

Have we considered potential risks?

This change does update the permissions of GitHub actions running in this repository (see discussion here on risks). We believe the scope of the permissions are restrictive enough to be acceptable in this case.

kenoir commented 4 months ago

Part of https://github.com/wellcomecollection/platform-infrastructure/issues/431