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 me too comments, 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.
Before submitting a bug report, we ask that you first search existing issues and pull requests to see if someone else may have experienced the same issue or may have already submitted a fix for it.
Python Version & Okta SDK Version(s)
Python v3.11.15
okta 3.4.4
Affected Class/Method(s)
PolicyPlatformOperatingSystemType
Customer Information
Organization Name:
Paid Customer: <yes/no>
Code Snippet
Debug Output / Traceback
/model/policy_platform_operating_system_type.py
Expected Behavior
Reading in auth policies with MacOS as a platform will work
Actual Behavior
Listing any policy rules that are restricted by OS to MacOS will fail.
okta/models/platform_condition_evaluator_platform_operating_system.py", line 107, in from_dict
_obj = cls.model_validate(
^^^^^^^^^^^^^^^^^^^
File "/Users/chaimsanders/src/okta_auth_policies_analysis/venv/lib/python3.11/site-packages/pydantic/main.py", line 732, in model_validate
return cls.__pydantic_validator__.validate_python(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for PlatformConditionEvaluatorPlatformOperatingSystem
type
Input should be 'ANDROID', 'ANY', 'IOS', 'OSX', 'OTHER' or 'WINDOWS' [type=enum, input_value='MACOS', input_type=str]
Reading raw rules JSON it appears the following is valid
"platform": {
"include": [
{
"type": "DESKTOP",
"os": {
"type": "MACOS"
}
}
],
"exclude": []
},
Policy docs also reference MACOS as a valid enum -- https://developer.okta.com/docs/api/openapi/okta-management/management/tags/policy/other/createpolicyrule
Therefore it seems that the package has incorrectly selected OSX as the enum type and should be updated.
Steps to reproduce
- make a policy with rules that are restricted to macos
- try and read rule
References
No response
Community Note
Before submitting a bug report, we ask that you first search existing issues and pull requests to see if someone else may have experienced the same issue or may have already submitted a fix for it.
Python Version & Okta SDK Version(s)
Python v3.11.15
okta 3.4.4
Affected Class/Method(s)
PolicyPlatformOperatingSystemType
Customer Information
Organization Name:
Paid Customer: <yes/no>
Code Snippet
# Your code hereDebug Output / Traceback
/model/policy_platform_operating_system_type.py
Expected Behavior
Reading in auth policies with MacOS as a platform will work
Actual Behavior
Listing any policy rules that are restricted by OS to MacOS will fail.
Reading raw rules JSON it appears the following is valid
Policy docs also reference MACOS as a valid enum -- https://developer.okta.com/docs/api/openapi/okta-management/management/tags/policy/other/createpolicyrule
Therefore it seems that the package has incorrectly selected OSX as the enum type and should be updated.
Steps to reproduce
References
No response