fix: Update okta_classic.py to handle scenario when Okta MFA provider with factorType "push" may return no profiles - #497
Merged
Conversation
…profile' attribute in the factor definition
sushraju
approved these changes
Apr 10, 2026
|
@its-mirus-lu you should add a test to test_okta_classic_client.py |
added 2 commits
April 10, 2026 13:09
…factor_name() method
…factor_name() method
Author
|
@gblues thanks, just added one! |
|
@epierce please take a look at this PR |
hercynium
approved these changes
Apr 11, 2026
Member
|
Looks good - thanks for the submission. I'll be releasing v2.9.0 in a week or two |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addressing possible case when Okta Verify App doesn't return a 'profile' attribute in the factor definition
Description
This PR addresses issue #496 by adding additional logic to test for the case when the Okta MFA provider of factorType 'push' is missing 'profile' attribute in factor.
It was discovered that the contents of the Okta 'push' factorType can be missing the 'profile' attribute. This causes the _build_factor_name method to error out with
KeyError: 'profile'.To fix this, this PR adds additional logic to test for the presence of the 'profile' attribute, in the factor array, and output accordingly.
Related Issue
This PR fixes #496
Motivation and Context
This fixes a break that affects users who choose to rely on
force_classicto receive push notifications.How Has This Been Tested?
This was tested by running
gimme-aws-credslocally, which causes the application to run to completion. Running pytest also indicates that the changes do not introduce regression.Screenshots (if appropriate):
Below is a screenshot of the dictionary of the Okta provider with a factorType of 'push' which lacks a "profile" attribute in its dict.
Types of changes
Checklist: