okta-sdk-golang icon indicating copy to clipboard operation
okta-sdk-golang copied to clipboard

Error is thrown if UserIdentifierConditionEvaluatorPattern is empty

Open louiecampagna-okta opened this issue 1 year ago • 2 comments

Describe the bug?

Api validation failed: mediationRule. Causes: errorSummary: The condition 'userIdentifier' must have 'patterns'.

omitempty on UserIdentifierConditionEvaluatorPattern prevents requests being made with a blank pattern value; if a policy rule is retrieved, it can have a blank value for the pattern. If the policy rule is updated, a valid policy rule with a blank pattern will throw an error trying to update.

Updating userIdentifierPolicyRuleCondition.go to remove omitempty resolves the issue

What is expected to happen?

Expected behavior would be for the policy rule to update successfully even with a blank value for the pattern

What is the actual behavior?

Api validation failed: mediationRule. Causes: errorSummary: The condition 'userIdentifier' must have 'patterns'.

Reproduction Steps?

Update a policy rule via golang SDK that has a blank value for the user identifier patterns

Additional Information?

No response

Golang Version

go version go1.19.2 darwin/amd64

SDK Version

2.17

OS version

Darwin C02G12VPML85 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:17 PST 2023; root:xnu-8796.101.5~3/RELEASE_X86_64 x86_64

louiecampagna-okta avatar Jun 15 '23 19:06 louiecampagna-okta

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-620369

duytiennguyen-okta avatar Jun 20 '23 15:06 duytiennguyen-okta

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

github-actions[bot] avatar Jul 05 '23 02:07 github-actions[bot]