Skip to content
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

okta_auth_server_policy_rule with client_credentials option produce crash #202

Closed
SBerda opened this issue Oct 20, 2020 · 2 comments
Closed
Labels

Comments

@SBerda
Copy link

SBerda commented Oct 20, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.20

Affected Resource(s)

  • okta_auth_server_policy_rule
resource "okta_auth_server_policy_rule" "my_photo_agency" {
  count = length(var.env)
  auth_server_id       = okta_auth_server.auth_server[count.index].id
  policy_id            = okta_auth_server_policy.my_photo_agency[count.index].id
  status               = "ACTIVE"
  name                 = "my_photo_agency"
  priority             = 1
  grant_type_whitelist = ["client_credentials"]
}

Panic Output

https://gist.github.com/SBerda/17a7f9d150bc4dda8ac40758eba12598

Expected Behavior

It Should create the okta_auth_server_policy_rule with the client_credential option.

Actual Behavior

Terraform does not create the ressource and crash

Steps to Reproduce

  1. terraform apply with the code provided earlier.
  • #0000
@bogdanprodan-okta
Copy link
Contributor

bogdanprodan-okta commented Dec 17, 2020

Hi @SBerda ! Thanks for creating this issue! I've made an investigation and two things came up:

  1. when providing grant_type_whitelist = ["implicit"] at least user_whitelist or group_whitelist should be present, otherwise, Okta API will return this error:
 Error: failed to update auth server policy rule: The API returned an error: Api validation failed: conditions.people. Causes:
 errorSummary: conditions.people: At least one of ''conditions.people.users.include'' or ''conditions.people.groups.include''
 must contain a valid user or group when ''conditions.grantTypes'' contains one or more of [authorization_code, implicit,
 password].
  1. there is a bug in the code that leads to this panic. I'll fix that in the new v3.7.2 version.

@bogdanprodan-okta
Copy link
Contributor

Hi @SBerda! The issue should be fixed in the latest 3.7.2 version. In case it still exists, please reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants