Closed joshuacollins-deloitte closed 5 months ago
@joshuacollins-deloitte so as far as I understand it, you want to use the spCertificate with saml_signed_request_enabled and not with slo, correct?
OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-740374
@duytiennguyen-okta - yes that's correct. I'm also a bit unclear on what settings can be managed through app_settings_json
- does it map to a particular object/field in the Apps API?
Community Note
Terraform Version
Terraform 1.8.5 on linux_amd64
Affected Resource(s)
Terraform Configuration Files
Output
Expected Behavior
I have provided a certificate in
app_settings_json
, however Okta rejects the request. I think the cause is that the provider is not passing the certificate through in the request.If the
app_settings_json
block is removed, andsaml_signed_request_enabled
is set to false, the app creation succeeds.If I'm reading this correctly, it looks like the
signOn
block is not passed through to the API: https://github.com/okta/terraform-provider-okta/blob/master/okta/resource_okta_app_saml.go#L621 The app_settings_json is saved in line 618, but sign-on settings are set separately on line 621.Additionally, the code in the provider currently assumes that the only reason a certificate is required is for SLO requests, however
spCertificate
is used for both request signing and SLO requests - either option being enabled should cause the provider to save a certificate.It looks like currently to set a certificate, we would need to enable SLO. https://github.com/okta/terraform-provider-okta/blob/master/okta/resource_okta_app_saml.go#L646
If I attempt to set the
single_logout_certificate
parameter without enabling SSO, we get the following warning:Can this be done in the Admin UI?
Yes
Can this be done in the actual API call?
Yes
Steps to Reproduce
terraform apply
with code block above.Important Factoids
Classic engine, but hoping that is not relevant here
References