Skip to content

Conversation

@kubabuczak
Copy link
Collaborator

CSPL-4201: Migrate GitHub Actions to OIDC Authenticationa

Overview

Replaces static AWS credentials with OIDC authentication across all GitHub Actions workflows, eliminating long-lived credentials.

Key Changes

GitHub Workflows (24 updated)

  • All workflows now use OIDC role assumption instead of static credentials
  • Updated to aws-actions/configure-aws-credentials@v5
  • Added id-token: write permission
  • Separated S3 test credentials (TEST_S3_ACCESS_KEY_ID, TEST_S3_SECRET_ACCESS_KEY)
  • Added job-level timeouts

Test Infrastructure

  • Updated test/testenv/testcaseenv.go to support new credential sources (with fallback)
  • Updated helm test S3 bucket scripts to use environment variables

Security Benefits

  • ✅ No long-lived credentials in GitHub Secrets
  • ✅ Short-lived tokens (1 hour default)
  • ✅ Repository-restricted access
  • ✅ Least privilege model (OIDC role for CI/CD, limited S3 user for tests)

Testing

All workflows tested with OIDC authentication:

ARM Workflows:

Main Workflows:

Required Setup

GitHub Variables:

  • AWS_ROLE_ARN
  • AWS_REGION
  • AWS_ROLE_DURATION_SECONDS
  • TEST_S3_ACCESS_KEY_ID

GitHub Secrets:

  • TEST_S3_SECRET_ACCESS_KEY

Post-Merge

  1. Configure GitHub variables/secrets
  2. Verify workflows execute successfully
  3. Remove old credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) after 1 week

…of static credentials

- Replaced aws-actions/configure-aws-credentials@v1 with v5 across multiple workflows.
- Updated AWS credential configuration to use role-based access with role-to-assume and role-session-name.
- Added permissions for contents, packages, and pull-requests in several workflows.
…ase branch

- Added CSPL-4201-pipeline-tests-base branch to the trigger conditions for multiple workflows including build-test-push, distroless integration tests, helm tests, and various integration tests for Azure and GCP.
…eout settings

- Added role-duration-seconds parameter to AWS credential configurations across multiple workflows.
- Increased timeout settings for integration and smoke tests to 420 minutes and 360 minutes respectively in various workflows.
- Added 'id-token: write' permission to the build-test-push workflow for enhanced security and access control.
…bserved values

Reduce timeout settings across multiple GitHub Actions workflows for integration and smoke tests from 360/420 minutes to 240 minutes, optimizing resource usage and execution time.
…redentials

- Added environment variables TEST_S3_ACCESS_KEY_ID and TEST_S3_SECRET_ACCESS_KEY to multiple workflows for integration and smoke tests, allowing for optional overrides of AWS credentials.
- Updated test scripts to utilize these environment variables when creating S3 secrets, enhancing flexibility and security in credential management.
…ests

- Changed skipLogOutput from true to false in the S3 copy command for multiple helm test YAML files, ensuring that log output is captured during execution for better debugging and monitoring.
@coveralls
Copy link
Collaborator

coveralls commented Nov 28, 2025

Pull Request Test Coverage Report for Build 19769455144

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.522%

Totals Coverage Status
Change from base Build 19653987646: 0.0%
Covered Lines: 10740
Relevant Lines: 12413

💛 - Coveralls

@kubabuczak kubabuczak changed the title CSPL-4201 use OIDC in GitHub pipelinesde CSPL-4201 use OIDC in GitHub pipelines Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants