pulumi / pulumi-okta

An Okta Pulumi resource package, providing multi-language access to Okta
Apache License 2.0
9 stars 2 forks source link

Can't create okta.policy.RuleMfa without password authenticator #289

Open rodriguesgm opened 1 year ago

rodriguesgm commented 1 year ago

What happened?

@pulumi/okta version: 3.22.0

Getting an error when trying to create an authenticator enrollment policy with only email as required.

Error: failed to create MFA policy: the API returned an error: Api validation failed: mediationPolicy. Causes: errorSummary: At least one of Password or Email authenticator must be set to required.

Code

new okta.policy.Mfa('my-mfa-policy', {
  name: 'MFA policy',
  groupsIncludeds: [everyone],
  status: 'ACTIVE',

  oktaEmail: { enrol: 'REQUIRED' },
  oktaPassword: { enroll: 'NOT_ALLOWED' }, // FIXME - this is not working
  googleOtp: { enroll: 'NOT_ALLOWED' },
  phoneNumber: { enroll: 'NOT_ALLOWED' },
});

Expected Behavior

Based on the doc Unless Org Feature FlagENG_ENABLE_OPTIONAL_PASSWORD_ENROLLMENTis ***disabled***oktaPasswordoroktaEmailmust be present and itsenrollvalue set toREQUIRED. Contact support to have this feature flag ***disabled***. I should be able to create the resource since the oktaEmail is required.

So the expected behavior is to have the authenticator enrollment policy created.

If I go to the UI and change manually, I do achieve the desired result.

image

Steps to reproduce

Output of pulumi about

failed to create MFA policy: the API returned an error: Api validation failed: mediationPolicy. Causes: errorSummary: At least one of Password or Email authenticator must be set to required.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

aq17 commented 1 year ago

Hi @rodriguesgm , this is a known issue in the upstream. Tracking progress in this issue: https://github.com/okta/terraform-provider-okta/issues/1176