-
Notifications
You must be signed in to change notification settings - Fork 127
CSPL-4201 use OIDC in GitHub pipelines #1630
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
base: develop
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 19897319256Details
💛 - Coveralls |
…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.
Switch to newest LTS version
…ons [added for debug]
e6dd841 to
bf1129a
Compare
16523c5 to
85bb593
Compare
| - name: Run Integration test | ||
| timeout-minutes: 240 | ||
| env: | ||
| TEST_S3_ACCESS_KEY_ID: ${{ vars.TEST_S3_ACCESS_KEY_ID }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why access key is used from vars, not from secrets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it's not a secret, it's a variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the same thing originally. The secret access key is setup as a secret. This is just the key id as a variable.
| export PLATFORMS=linux/arm64,linux/amd64 | ||
| export BASE_IMAGE=ubuntu | ||
| export BASE_IMAGE_VERSION=24.10 | ||
| export BASE_IMAGE_VERSION=24.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you decrease it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
24.04 is LTS (Long Term Support) release. The next LTS will be 26.04.
24.10 is not supported anymore (non-LTS are supported for 9 months)
more info: https://ubuntu.com/about/release-cycle
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)
aws-actions/configure-aws-credentials@v5id-token: writepermissionTEST_S3_ACCESS_KEY_ID,TEST_S3_SECRET_ACCESS_KEY)Test Infrastructure
test/testenv/testcaseenv.goto support new credential sources (with fallback)Security Benefits
Testing
All workflows tested with OIDC authentication:
ARM Workflows:
Main Workflows:
Required Setup
GitHub Variables:
AWS_ROLE_ARNAWS_REGIONAWS_ROLE_DURATION_SECONDSTEST_S3_ACCESS_KEY_IDGitHub Secrets:
TEST_S3_SECRET_ACCESS_KEYPost-Merge
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) after 1 week