Skip to content

Commit

Permalink
Change trust policies for bors app
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Jun 29, 2024
1 parent 77efa8a commit dcd6e13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions terragrunt/accounts/bors-prod/app/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ include {
inputs = {
domain = "bors-prod.rust-lang.net"
gh_app_id = "278306"
trusted_sub = "repo:rust-lang/bors:environment:production"
}
1 change: 1 addition & 0 deletions terragrunt/accounts/bors-staging/app/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ include {
inputs = {
domain = "bors-staging.rust-lang.net"
gh_app_id = "343095"
trusted_sub = "repo:rust-lang/bors:environment:staging"
}
6 changes: 5 additions & 1 deletion terragrunt/modules/bors/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "aws_iam_role" "gha" {
}
Condition = {
StringLike = {
"token.actions.githubusercontent.com:sub" : "repo:rust-lang/bors:ref:refs/heads/main"
"token.actions.githubusercontent.com:sub" : "${var.trusted_sub}"
}
StringEquals = {
"token.actions.githubusercontent.com:aud" : "sts.amazonaws.com"
Expand Down Expand Up @@ -498,3 +498,7 @@ variable "domain" {
variable "gh_app_id" {
description = "GitHub App ID"
}

variable "trusted_sub" {
description = "GitHub OIDC claim"
}

0 comments on commit dcd6e13

Please sign in to comment.