-
Notifications
You must be signed in to change notification settings - Fork 49
feat: Workload identity federation support for Fabric using STS #908
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #908 +/- ##
===========================================
+ Coverage 29.30% 59.14% +29.83%
===========================================
Files 242 245 +3
Lines 28101 28297 +196
===========================================
+ Hits 8236 16737 +8501
+ Misses 19715 10698 -9017
- Partials 150 862 +712 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replaces direct token value with environment variable name for STS source token in provider configuration and documentation. Clarifies usage and updates parameter descriptions to reflect this change.
TestAccPreCheck now checks both custom and default STS source token environment variables, allowing authentication to succeed if either is set. This improves flexibility in environment configuration.
Corrected inconsistent indentation in the error handling block of TestAccPreCheck for improved code readability and maintainability.
Refactors provider configuration, environment variables, and documentation to replace 'sts_auth_scope' and related STS fields with 'token_exchange_scope' and corresponding token exchange fields. Updates code, examples, and docs to reflect the new naming and clarify usage of token exchange subject tokens for authentication. This improves clarity and aligns terminology with current Equinix authentication features.
Replaces EQUINIX_TOKEN_EXCHANGE_SCOPE_PFCR with EQUINIX_STS_AUTH_SCOPE_PFCR in the fabric_acctest GitHub Actions workflow to use the correct secret for token exchange.
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.
Looks good to me! Acceptance test workflow results demonstrate that the introduction of token exchange support has not impacted existing usage of the provider. I appreciate the introduction of multiple acceptance test jobs to exercise different provider configurations! Long-term, we should enact/adopt that pattern more broadly across the provider.
|
This PR is included in version 4.7.0 🎉 |
This pull request introduces support for Workload Identity Federation (WIF) using Equinix STS, along with updates to documentation, provider configuration, and acceptance testing. The changes enable authentication via OIDC tokens, enhance the Equinix Terraform provider, and improve testing capabilities.
Workload Identity Federation (WIF) Support:
docs/guides/sts_wif_setup.md: Added a comprehensive guide for setting up Workload Identity Federation using Equinix STS, including steps for obtaining authentication tokens, establishing trust with an identity provider, and authorizing workloads.docs/index.md: Updated documentation to include details about using Workload Identity Tokens for authentication with Equinix Fabric, including alpha feature limitations and configuration examples. [1] [2] [3]examples/example_4.tf: Added an example Terraform configuration demonstrating the use of Workload Identity Federation withsts_auth_scopeandsts_source_token.Provider Enhancements:
equinix/provider.go: Added new provider arguments (sts_auth_scope,sts_endpoint,sts_source_token) for configuring STS authentication. Updated theconfigureProviderfunction to support STS-based authentication. [1] [2]internal/config/config.go: Introduced STS-related environment variables and default values. Enhanced theConfigstruct and authentication logic to support STS tokens. Refactored client creation methods for improved modularity. [1] [2] [3] [4] [5] [6] [7] [8]Acceptance Testing Improvements:
internal/acceptance/acceptance.go: Updated acceptance testing utilities to include checks for STS authentication credentials. Enhanced pre-check methods to validate STS setup alongside existing authentication mechanisms. [1] [2] [3] [4]Dependency Updates:
go.mod: Upgradedgithub.com/equinix/equinix-sdk-goto versionv0.54.0to support new STS features. Removed unused dependencies.Documentation Improvements:
internal/provider/provider.go: Added package-level documentation for the Terraform provider implementation.