Skip to content

Commit

Permalink
Merge pull request #72 from jfrog/GH-71-fix-trailing-slash-from-oidc-…
Browse files Browse the repository at this point in the history
…provider-url

Remove trailing slash from GitHub OIDC provider URL
  • Loading branch information
alexhung authored May 6, 2024
2 parents d8825ac + a6a929e commit 5010949
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.7.3 (May 6, 2024)

BUG FIXES:

* resource/platform_oidc_configuration: Remove trailing slash from GitHub provider URL validation. Issue: [#71](https://github.com/jfrog/terraform-provider-platform/issues/71) PR: [#72](https://github.com/jfrog/terraform-provider-platform/pull/72)

## 1.7.2 (May 1, 2024)

BUG FIXES:
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/oidc_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resource "platform_oidc_configuration" "my-generic-oidc-configuration" {

### Required

- `issuer_url` (String) OIDC issuer URL. For GitHub actions, the URL must be https://token.actions.githubusercontent.com/.
- `issuer_url` (String) OIDC issuer URL. For GitHub actions, the URL must be https://token.actions.githubusercontent.com.
- `name` (String) Name of the OIDC provider
- `provider_type` (String) Type of OIDC provider. Can be `generic` or `GitHub`.

Expand Down
2 changes: 1 addition & 1 deletion pkg/platform/resource_oidc_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
gitHubProviderType = "GitHub"
gitHubProviderURL = "https://token.actions.githubusercontent.com/"
gitHubProviderURL = "https://token.actions.githubusercontent.com"
odicConfigurationEndpoint = "/access/api/v1/oidc"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/platform/resource_oidc_configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestAccOIDCConfiguration_full(t *testing.T) {

updatedTestData := map[string]string{
"name": configName,
"issuerURL": "https://token.actions.githubusercontent.com/",
"issuerURL": "https://token.actions.githubusercontent.com",
"providerType": "GitHub",
"audience": "test-audience-2",
}
Expand Down Expand Up @@ -174,7 +174,7 @@ func TestAccOIDCConfiguration_invalid_provider_type_issuer_url(t *testing.T) {
Steps: []resource.TestStep{
{
Config: config,
ExpectError: regexp.MustCompile(`must be set to https:\/\/token\.actions\.githubusercontent\.com\/`),
ExpectError: regexp.MustCompile(`must be set to https:\/\/token\.actions\.githubusercontent\.com[^\/]`),
},
},
})
Expand Down

0 comments on commit 5010949

Please sign in to comment.