-
Notifications
You must be signed in to change notification settings - Fork 209
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
add default to refresh token #1738
add default to refresh token #1738
Conversation
released in https://github.com/okta/terraform-provider-okta/releases/tag/v4.4.3 which is also listed in the TF registry https://registry.terraform.io/providers/okta/okta/latest/docs |
@duytiennguyen-okta @monde Seems like this needs to be ignored for all
Apps with |
@thatguysimon how does the tf script looks like? because I don't have that issue with type = "service" and token_endpoint_auth_method = "private_key_jwt". From the error it looks like you don't have permission rather than the issue came from the provider |
@duytiennguyen-okta other apps that are not type=service work as expected so I don't think it's a permission issue. resource "okta_app_oauth" "my_service_app" {
client_id = var.my_service_app_id
label = "My service app"
logo = "${path.module}/assets/images/logo.png"
type = "service"
grant_types = ["client_credentials"]
response_types = ["token"]
token_endpoint_auth_method = "private_key_jwt"
login_scopes = []
post_logout_redirect_uris = []
redirect_uris = []
jwks {
kty = var.my_public_jwk.kty
e = var.my_public_jwk.e
kid = var.my_public_jwk.kid
n = var.my_public_jwk.n
}
lifecycle {
ignore_changes = [
logo,
]
}
} Here's an OIDC app that works: resource "okta_app_oauth" "my_oidc_app" {
client_id = var.my_client_id
client_basic_secret = var.my_client_secret
label = "My app"
logo = "${path.module}/assets/images/logo.png"
type = "web"
issuer_mode = "DYNAMIC"
grant_types = [
"authorization_code", "refresh_token"
]
redirect_uris = [
"..."
]
response_types = ["code"]
login_uri = var.my_host_url
lifecycle {
ignore_changes = [
logo,
]
}
} Thanks! |
@thatguysimon I think you should double check your permission. I just successfully run this script with my org
|
@duytiennguyen-okta was there a new Okta API scope that been added along with this feature? Because this was working before the upgrade, no permission issues before. (We're using a private key to authenticate the provider against the Okta tenant btw). |
@thatguysimon I don't know which version you were upgrading from, but the default wouldn't do anything unless you have grant types refresh_token. Since I cannot reproduce this issue, can you provide the log? Just use |
@duytiennguyen-okta it suddenly started working, without making any changes.. one of those voodoo cases I guess 🤷🏻♂️ |
In resource
okta_app_oauth
, setsrefresh_token_rotation
's default argument toSTATIC
, and setsrefresh_token_leeway
's default argument to0
.