feat: Support GitHub Audit Log OIDC Provider #130
+117
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
↪️ Pull Request: Feature/Enhanced GitHub OIDC Provider Configuration
📒 Description
This pull request introduces support for multiple GitHub OIDC provider types ("actions" and "audit-log") and enhances the IAM role's trust policy conditions for more granular control. It allows users to configure the module for both standard GitHub Actions OIDC integration and GitHub Enterprise Audit Log streaming OIDC.
🕶️ Types of changes
🤯 List of changes
github_provider
input variable ("actions"
or"audit-log"
).github_provider
.thumbprint_list
usescoalesce(var.github_thumbprint, local.github_oidc_providers[var.github_provider].thumbprint)
for override capability.${provider_url}:aud
equalssts.amazonaws.com
.github_provider = "actions"
: Condition restricts${actions_provider_url}:sub
tovar.repositories
.github_provider = "audit-log"
: Condition (requiresvar.enterprise_name
) restricts${audit_log_provider_url}:sub
tohttps://github.com/${var.enterprise_name}
.github_provider
(string, default:"actions"
)enterprise_name
(string, default:null
, required for "audit-log" provider)README.md
) Updates:terraform-docs
.👫 Relationships
#129
🔎 Review hints
var.github_provider
andvar.github_thumbprint
.var.repositories
andvar.enterprise_name
.README.md
accurately reflects the new functionality and input variables.🚨 Test instructions
github_provider
(or set to"actions"
).repositories
.https://token.actions.githubusercontent.com
.token.actions.githubusercontent.com:aud
should bests.amazonaws.com
.token.actions.githubusercontent.com:sub
should useStringLike
and reference the providedrepositories
.var.github_thumbprint
.github_provider = "audit-log"
.enterprise_name
to a test enterprise name.https://oidc-configuration.audit-log.githubusercontent.com
.oidc-configuration.audit-log.githubusercontent.com:aud
should bests.amazonaws.com
.oidc-configuration.audit-log.githubusercontent.com:sub
should useStringEquals
and referencehttps://github.com/YOUR_ENTERPRISE_NAME
.enterprise_name
is not provided whengithub_provider
is "audit-log" (if validation for this is in place, or consider adding it).Checklist