Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent bad device token #408

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

longbowrocks
Copy link
Contributor

@longbowrocks longbowrocks commented Jun 1, 2023

Description

This PR does two things:

  1. It prevents gimme-aws-creds --configure from setting device_token to an invalid value.
  2. It forces device registration for any user that uses clasic okta with an invalid device token set.

Related Issue

#407

Motivation and Context

I was getting double-MFAs. My config file contained device_token=.
After some pondering, I decided the default value for a feature is likely not intended to break said feature.

How Has This Been Tested?

  1. gimme-aws-creds --configure && gimme-aws-creds && gimme-aws-creds without my changes. 2 MFAs on second gimme-creds.
  2. gimme-aws-creds && gimme-aws-creds without my changes. 2 MFAs on second gimme-creds.
  3. gimme-aws-creds --configure && sed -i'.bak' "s/device_token =.*//" ~/.okta_aws_login_config && gimme-aws-creds && gimme-aws-creds without my changes. 1 MFA on second gimme-creds.
  4. gimme-aws-creds --configure && gimme-aws-creds && gimme-aws-creds with my changes. 1 MFA on second gimme-creds.
  5. gimme-aws-creds && gimme-aws-creds with my changes. 1 MFA on second gimme-creds.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@epierce epierce merged commit 4f37919 into Nike-Inc:master Jun 1, 2023
@longbowrocks longbowrocks deleted the prevent_bad_device_token branch June 1, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants