Skip to content

Commit

Permalink
Merge pull request #1713 from okta/oauth2_guard_internal
Browse files Browse the repository at this point in the history
Missed guard on groups claim in `okta_app_oauth` for OAuth 2.0 authentication
  • Loading branch information
MikeMondragon-okta authored Sep 11, 2023
2 parents 7bad8c2 + c57f4f9 commit 9ed1724
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 4.4.1 (September 11, 2023)

### BUG FIXES

* Missed guard on groups claim in `okta_app_oauth` for OAuth 2.0 authentication [1713](https://github.com/okta/terraform-provider-okta/pull/1713). Thanks, [@monde](https://github.com/monde)!

### IMPROVEMENTS

* Update okta app oauth to clarify we support multiple jwks creation [#1704](https://github.com/okta/terraform-provider-okta/pull/1704). Thanks, [@duytiennguyen-okta](https://github.com/duytiennguyen-okta)!

## 4.4.0 (September 7, 2023)

### NEW - RESOURCES, DATA SOURCES, PROPERTIES, ATTRIBUTES, ENV VARS:
Expand Down
2 changes: 1 addition & 1 deletion okta/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
OktaTerraformProviderVersion = "4.4.0"
OktaTerraformProviderVersion = "4.4.1"
OktaTerraformProviderUserAgent = "okta-terraform/" + OktaTerraformProviderVersion
)

Expand Down
10 changes: 4 additions & 6 deletions okta/resource_okta_app_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,16 +530,14 @@ func resourceAppOAuthRead(ctx context.Context, d *schema.ResourceData, m interfa
_ = d.Set("client_secret", "")
}

gc, err := flattenGroupsClaim(ctx, d, m)
if err != nil {
return diag.FromErr(err)
}

c := m.(*Config)
if c.IsOAuth20Auth() {
logger(m).Warn("reading groups_claim disabled with OAuth 2.0 API authentication")
return nil
} else {
gc, err := flattenGroupsClaim(ctx, d, m)
if err != nil {
return diag.FromErr(err)
}
_ = d.Set("groups_claim", gc)
}

Expand Down

0 comments on commit 9ed1724

Please sign in to comment.